aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/delsel.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 82593985650..eb14bc5ac8e 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -35,7 +35,7 @@
35 35
36;; Commands which will delete the selection need a 'delete-selection 36;; Commands which will delete the selection need a 'delete-selection
37;; property on their symbols; commands which insert text but don't 37;; property on their symbols; commands which insert text but don't
38;; have this property won't delete the selction. It can be one of 38;; have this property won't delete the selection. It can be one of
39;; the values: 39;; the values:
40;; 'yank 40;; 'yank
41;; For commands which do a yank; ensures the region about to be 41;; For commands which do a yank; ensures the region about to be
@@ -147,14 +147,19 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
147(define-key minibuffer-local-must-match-map "\C-g" 'minibuffer-keyboard-quit) 147(define-key minibuffer-local-must-match-map "\C-g" 'minibuffer-keyboard-quit)
148(define-key minibuffer-local-isearch-map "\C-g" 'minibuffer-keyboard-quit) 148(define-key minibuffer-local-isearch-map "\C-g" 'minibuffer-keyboard-quit)
149 149
150(defun delsel-unload-hook () 150(defun delsel-unload-function ()
151 "Unload the Delete Selection library."
151 (define-key minibuffer-local-map "\C-g" 'abort-recursive-edit) 152 (define-key minibuffer-local-map "\C-g" 'abort-recursive-edit)
152 (define-key minibuffer-local-ns-map "\C-g" 'abort-recursive-edit) 153 (define-key minibuffer-local-ns-map "\C-g" 'abort-recursive-edit)
153 (define-key minibuffer-local-completion-map "\C-g" 'abort-recursive-edit) 154 (define-key minibuffer-local-completion-map "\C-g" 'abort-recursive-edit)
154 (define-key minibuffer-local-must-match-map "\C-g" 'abort-recursive-edit) 155 (define-key minibuffer-local-must-match-map "\C-g" 'abort-recursive-edit)
155 (define-key minibuffer-local-isearch-map "\C-g" 'abort-recursive-edit)) 156 (define-key minibuffer-local-isearch-map "\C-g" 'abort-recursive-edit)
156 157 (dolist (sym '(self-insert-command self-insert-iso yank clipboard-yank
157(add-hook 'delsel-unload-hook 'delsel-unload-hook) 158 insert-register delete-backward-char backward-delete-char-untabify
159 delete-char newline-and-indent newline open-line))
160 (remprop sym 'delete-selection))
161 ;; continue standard unloading
162 nil)
158 163
159(provide 'delsel) 164(provide 'delsel)
160 165