538 (global-font-lock-mode 1) |
538 (global-font-lock-mode 1) |
539 |
539 |
540 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
540 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
541 (message "highlight selected text") |
541 (message "highlight selected text") |
542 |
542 |
543 ;; 1/-1, when the mark is active, the region is highlighted. |
543 (delete-selection-mode 1) |
544 (transient-mark-mode 1) |
544 |
545 (delete-selection-mode 1) ; 1/-1 |
545 (when (<= emacs-major-version 23) |
546 |
546 ;; 1/-1, when the mark is active, the region is highlighted. |
547 ;; Order of next items is important, (assignment must done before pc-selection-mode enabled). |
547 (transient-mark-mode 1) |
548 (require 'pc-select) |
548 |
549 (setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc. |
549 ;; Order of next items is important, (assignment must done before pc-selection-mode enabled). |
550 (setq pc-select-meta-moves-sexps t) |
550 (require 'pc-select) |
551 (cond |
551 (setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc. |
552 ((= emacs-major-version 21) (pc-selection-mode)) |
552 (setq pc-select-meta-moves-sexps t) |
553 ((>= emacs-major-version 22) (pc-selection-mode 1)) |
553 (cond |
554 ) |
554 ((= emacs-major-version 21) (pc-selection-mode)) |
|
555 ((>= emacs-major-version 22) (pc-selection-mode 1)) |
|
556 ) |
|
557 ) |
555 |
558 |
556 (when (eq window-system 'x) |
559 (when (eq window-system 'x) |
557 (setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer |
560 (setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer |
558 ) |
561 ) |
559 |
562 |