1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Fix misuses of make-local-variable on hooks

* lisp/vc/smerge-mode.el (smerge-ediff):
* lisp/progmodes/python.el (python-pdbtrack-setup-tracking):
* lisp/net/tramp-smb.el (tramp-smb-call-winexe):
* lisp/net/secrets.el (secrets-mode):
* lisp/mail/rmail.el (rmail-variables):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/erc/erc-log.el (erc-log-setup-logging): Use `add-hook`.

* lisp/eshell/em-unix.el (eshell/diff):
* lisp/eshell/em-hist.el (eshell-hist-initialize): Don't
`make-local-variable` on hooks.
This commit is contained in:
Stefan Monnier 2020-11-04 00:24:45 -05:00
parent 9bcdebd9b7
commit a63d905175
12 changed files with 56 additions and 65 deletions

View file

@ -287,6 +287,9 @@ CREATE-HOOK is a hook to run after creating a frame."
;; Correct use of `temp-buffer-show-function': Bob Weiner
(if (and (boundp 'temp-buffer-show-hook)
(boundp 'temp-buffer-show-function))
;; FIXME: Doesn't this get us into an inf-loop when the
;; `temp-buffer-show-function' runs `temp-buffer-show-hook'
;; (as is normally the case)?
(progn (make-local-variable 'temp-buffer-show-hook)
(setq temp-buffer-show-hook temp-buffer-show-function)))
(make-local-variable 'temp-buffer-show-function)