changeset 8434:36da3d480ccd

(icomplete-prime-minibuffer): Copy the hook lists after making them local.
author Richard M. Stallman <rms@gnu.org>
date Wed, 03 Aug 1994 21:23:30 +0000
parents b14b118e6724
children a1961f8669d3
files lisp/icomplete.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/icomplete.el	Wed Aug 03 20:41:33 1994 +0000
+++ b/lisp/icomplete.el	Wed Aug 03 21:23:30 1994 +0000
@@ -75,23 +75,25 @@
 		     'icomplete-post-command-hook 'append))
 	  ((format "icomplete: non v19 emacs, %s - %s"
 		   emacs-version "try elisp-archive icomplete")))))
+
 ;;;_ > icomplete-prime-minibuffer ()
 (defun icomplete-prime-minibuffer ()
-
   "Prep emacs, v 19.18 or later, for icomplete.
-
 \(In emacs v19.17 and earlier, and in lemacs, icomplete-prime-session
 is used, instead to establish global hooks.\)
 
-Run via minibuffer-setup-hook, adds icomplete pre- and post-command
+Run via `minibuffer-setup-hook', adds icomplete pre- and post-command
 hooks at the start of each minibuffer."
 
   ;; Append the hooks to avoid as much as posssible interference from
   ;; other hooks that foul up minibuffer quit.
   (make-local-variable 'pre-command-hook)
   (make-local-variable 'post-command-hook)
+  (setq pre-command-hook (copy-sequence pre-command-hook))
+  (setq post-command-hook (copy-sequence post-command-hook))
   (add-hook 'pre-command-hook 'icomplete-pre-command-hook)
   (add-hook 'post-command-hook 'icomplete-post-command-hook))
+
 ;;;_ > icomplete-window-minibuffer-p ()
 (defmacro icomplete-window-minibuffer-p ()