unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27502: 25.2; auto-revert adds lambda to find-file-hook
@ 2017-06-26 19:53 Pierre Neidhardt
  2017-07-02  9:45 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre Neidhardt @ 2017-06-26 19:53 UTC (permalink / raw)
  To: 27502

It seems that autorevert.el:316 adds a lambda to `find-file-hook':

(add-hook 'find-file-hook
	  (lambda ()
	    (setq-local auto-revert-tail-pos
                        (nth 7 (file-attributes buffer-file-name)))))

It's bad practice to add lambdas to hooks as it makes it harder to remove them.
We should use a named function instead.



In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10)
 of 2017-04-22 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:	Arch Linux





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-02  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 19:53 bug#27502: 25.2; auto-revert adds lambda to find-file-hook Pierre Neidhardt
2017-07-02  9:45 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).