aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-08-03 21:23:30 +0000
committerRichard M. Stallman1994-08-03 21:23:30 +0000
commit0e551775a09bdfbcd9a14ba94063ea1e5f398d49 (patch)
tree10acbd0e1a57e238a2a78d9715010855343d60ce
parentc57ca86e2aae77cc16a58da7ab35dd4c93dab1c7 (diff)
downloademacs-0e551775a09bdfbcd9a14ba94063ea1e5f398d49.tar.gz
emacs-0e551775a09bdfbcd9a14ba94063ea1e5f398d49.zip
(icomplete-prime-minibuffer): Copy the hook lists after making them local.
-rw-r--r--lisp/icomplete.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index a58229588b2..7defbb76a6d 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -75,23 +75,25 @@ non-nil. Set the var back to nil to re-enable icomplete."
75 'icomplete-post-command-hook 'append)) 75 'icomplete-post-command-hook 'append))
76 ((format "icomplete: non v19 emacs, %s - %s" 76 ((format "icomplete: non v19 emacs, %s - %s"
77 emacs-version "try elisp-archive icomplete"))))) 77 emacs-version "try elisp-archive icomplete")))))
78
78;;;_ > icomplete-prime-minibuffer () 79;;;_ > icomplete-prime-minibuffer ()
79(defun icomplete-prime-minibuffer () 80(defun icomplete-prime-minibuffer ()
80
81 "Prep emacs, v 19.18 or later, for icomplete. 81 "Prep emacs, v 19.18 or later, for icomplete.
82
83\(In emacs v19.17 and earlier, and in lemacs, icomplete-prime-session 82\(In emacs v19.17 and earlier, and in lemacs, icomplete-prime-session
84is used, instead to establish global hooks.\) 83is used, instead to establish global hooks.\)
85 84
86Run via minibuffer-setup-hook, adds icomplete pre- and post-command 85Run via `minibuffer-setup-hook', adds icomplete pre- and post-command
87hooks at the start of each minibuffer." 86hooks at the start of each minibuffer."
88 87
89 ;; Append the hooks to avoid as much as posssible interference from 88 ;; Append the hooks to avoid as much as posssible interference from
90 ;; other hooks that foul up minibuffer quit. 89 ;; other hooks that foul up minibuffer quit.
91 (make-local-variable 'pre-command-hook) 90 (make-local-variable 'pre-command-hook)
92 (make-local-variable 'post-command-hook) 91 (make-local-variable 'post-command-hook)
92 (setq pre-command-hook (copy-sequence pre-command-hook))
93 (setq post-command-hook (copy-sequence post-command-hook))
93 (add-hook 'pre-command-hook 'icomplete-pre-command-hook) 94 (add-hook 'pre-command-hook 'icomplete-pre-command-hook)
94 (add-hook 'post-command-hook 'icomplete-post-command-hook)) 95 (add-hook 'post-command-hook 'icomplete-post-command-hook))
96
95;;;_ > icomplete-window-minibuffer-p () 97;;;_ > icomplete-window-minibuffer-p ()
96(defmacro icomplete-window-minibuffer-p () 98(defmacro icomplete-window-minibuffer-p ()
97 99