'transient-mark-mode' and 'pc-selection-mode' are deprecated. Emacs 24 default
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 08 Nov 2011 00:42:35 +0200
changeset 776 1e680ded54d1
parent 775 a7253eb62dee
child 777 398db35ab2ca
'transient-mark-mode' and 'pc-selection-mode' are deprecated. Emacs 24 default behavior same as you activate these modes.
.emacs-my
--- 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