changeset 30817:fd8b296712e7

(delsel-unload-hook): New function.
author Dave Love <fx@gnu.org>
date Tue, 15 Aug 2000 14:20:14 +0000
parents e06965792db4
children f5788dd66ab6
files lisp/delsel.el
diffstat 1 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/delsel.el	Tue Aug 15 14:18:18 2000 +0000
+++ b/lisp/delsel.el	Tue Aug 15 14:20:14 2000 +0000
@@ -134,7 +134,7 @@
 
 (put 'insert-parentheses 'delete-selection t)
 
-;; This is very useful for cancelling a selection in the minibuffer without 
+;; This is very useful for cancelling a selection in the minibuffer without
 ;; aborting the minibuffer.
 (defun minibuffer-keyboard-quit ()
   "Abort recursive edit.
@@ -145,15 +145,22 @@
       (setq deactivate-mark t)
     (abort-recursive-edit)))
 
-(define-key minibuffer-local-map "\C-g" 'minibuffer-keyboard-quit) 
-(define-key minibuffer-local-ns-map "\C-g" 'minibuffer-keyboard-quit) 
-(define-key minibuffer-local-completion-map "\C-g" 'minibuffer-keyboard-quit) 
-(define-key minibuffer-local-must-match-map "\C-g" 'minibuffer-keyboard-quit) 
-(define-key minibuffer-local-isearch-map "\C-g" 'minibuffer-keyboard-quit) 
+(define-key minibuffer-local-map "\C-g" 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-ns-map "\C-g" 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-completion-map "\C-g" 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-must-match-map "\C-g" 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-isearch-map "\C-g" 'minibuffer-keyboard-quit)
+
+(defun delsel-unload-hook ()
+  (define-key minibuffer-local-map "\C-g" 'abort-recursive-edit)
+  (define-key minibuffer-local-ns-map "\C-g" 'abort-recursive-edit)
+  (define-key minibuffer-local-completion-map "\C-g" 'abort-recursive-edit)
+  (define-key minibuffer-local-must-match-map "\C-g" 'abort-recursive-edit)
+  (define-key minibuffer-local-isearch-map "\C-g" 'abort-recursive-edit))
 
 (provide 'delsel)
 
-;; This is the standard way mechanism to put the mode into effect
+;; This is the standard way to put the mode into effect
 ;; if delete-selection-mode has already been set to t
 ;; when this file is loaded.
 (when delete-selection-mode