1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -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

@ -267,7 +267,7 @@ The current buffer is given by BUFFER."
(with-current-buffer buffer
(auto-save-mode -1)
(setq buffer-file-name nil)
(set (make-local-variable 'write-file-functions) '(erc-save-buffer-in-logs))
(add-hook 'write-file-functions #'erc-save-buffer-in-logs nil t)
(when erc-log-insert-log-on-open
(ignore-errors
(save-excursion