'transient-mark-mode' and 'pc-selection-mode' are deprecated. Emacs 24 default
behavior same as you activate these modes.
--- a/.emacs-my Mon Nov 07 22:42:40 2011 +0200
+++ b/.emacs-my Tue Nov 08 00:42:35 2011 +0200
@@ -540,18 +540,21 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "highlight selected text")
-;; 1/-1, when the mark is active, the region is highlighted.
-(transient-mark-mode 1)
-(delete-selection-mode 1) ; 1/-1
+(delete-selection-mode 1)
+
+(when (<= emacs-major-version 23)
+ ;; 1/-1, when the mark is active, the region is highlighted.
+ (transient-mark-mode 1)
-;; Order of next items is important, (assignment must done before pc-selection-mode enabled).
-(require 'pc-select)
-(setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc.
-(setq pc-select-meta-moves-sexps t)
-(cond
- ((= emacs-major-version 21) (pc-selection-mode))
- ((>= emacs-major-version 22) (pc-selection-mode 1))
- )
+ ;; Order of next items is important, (assignment must done before pc-selection-mode enabled).
+ (require 'pc-select)
+ (setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc.
+ (setq pc-select-meta-moves-sexps t)
+ (cond
+ ((= emacs-major-version 21) (pc-selection-mode))
+ ((>= emacs-major-version 22) (pc-selection-mode 1))
+ )
+ )
(when (eq window-system 'x)
(setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer