From: Dave Love Date: Tue, 15 Aug 2000 14:20:14 +0000 (+0000) Subject: (delsel-unload-hook): New function. X-Git-Tag: emacs-pretest-21.0.90~2296 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=23652376ac68456c68d08bf4c3f913a0ca9f5055;p=emacs.git (delsel-unload-hook): New function. --- diff --git a/lisp/delsel.el b/lisp/delsel.el index d2bb43d1487..be13301a1f0 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -134,7 +134,7 @@ use either \\[customize] or the function `delete-selection-mode'." (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 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (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