Mercurial > emacs
changeset 43985:2fab49a69d94
(pc-selection-mode): Alter the existing global map, don't replace it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 18 Mar 2002 04:31:36 +0000 |
parents | 477ed75a821b |
children | 63aef9a3adbf |
files | lisp/emulation/pc-select.el |
diffstat | 1 files changed, 10 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emulation/pc-select.el Mon Mar 18 04:30:45 2002 +0000 +++ b/lisp/emulation/pc-select.el Mon Mar 18 04:31:36 2002 +0000 @@ -882,9 +882,7 @@ (if pc-selection-mode (if (null pc-select-key-bindings-alist) (progn - (setq pc-select-map (copy-keymap (current-global-map)) - pc-select-saved-global-map (copy-keymap (current-global-map))) - + (setq pc-select-saved-global-map (copy-keymap (current-global-map))) (setq pc-select-key-bindings-alist (append pc-select-default-key-bindings (if pc-select-selection-keys-only @@ -899,14 +897,14 @@ nil pc-select-tty-key-bindings))) - (pc-select-define-keys pc-select-key-bindings-alist pc-select-map) - (use-global-map pc-select-map) + (pc-select-define-keys pc-select-key-bindings-alist + (current-global-map)) (unless (or pc-select-selection-keys-only (eq window-system 'x) (memq system-name '(ms-dos windows-nt))) ;; it is not clear that we need the following line - ;; I hope it doesn't do too much harm to leave it in, though... + ;; I hope it doesn't do too much harm to leave it in, though... (setq pc-select-old-M-delete-binding (lookup-key function-key-map [M-delete])) (define-key function-key-map [M-delete] [?\M-d])) @@ -920,7 +918,7 @@ ;; the original author also had this above: ;; (setq-default normal-erase-is-backspace t) ;; However, the documentation for the variable says that - ;; "setting it with setq has no effect", so I'm removing it. + ;; "setting it with setq has no effect", so I'm removing it. (pc-select-save-and-set-var highlight-nonselected-windows nil) (pc-select-save-and-set-var transient-mark-mode t) @@ -931,14 +929,13 @@ ;; do not clobber the values of the variables that were ;; saved from before pc-selection mode was activated -- ;; just make sure the values are the way we like them. - (setq pc-select-map (copy-keymap (current-global-map))) - (pc-select-define-keys pc-select-key-bindings-alist pc-select-map) - (use-global-map pc-select-map) + (pc-select-define-keys pc-select-key-bindings-alist + (current-global-map)) (unless (or pc-select-selection-keys-only (eq window-system 'x) (memq system-name '(ms-dos windows-nt))) ;; it is not clear that we need the following line - ;; I hope it doesn't do too much harm to leave it in, though... + ;; I hope it doesn't do too much harm to leave it in, though... (define-key function-key-map [M-delete] [?\M-d])) (when (and (not pc-select-selection-keys-only) (or (eq window-system 'x) @@ -956,10 +953,9 @@ (memq system-name '(ms-dos windows-nt)))) (pc-select-restore-mode normal-erase-is-backspace-mode)) - (setq pc-select-map (copy-keymap (current-global-map))) (pc-select-restore-keys - pc-select-key-bindings-alist pc-select-map pc-select-saved-global-map) - (use-global-map pc-select-map) + pc-select-key-bindings-alist (current-global-map) + pc-select-saved-global-map) (pc-select-restore-var highlight-nonselected-windows) (pc-select-restore-var transient-mark-mode)