all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <ambrevar@gmail.com>
To: 27502@debbugs.gnu.org
Subject: bug#27502: 25.2; auto-revert adds lambda to find-file-hook
Date: Mon, 26 Jun 2017 20:53:19 +0100	[thread overview]
Message-ID: <20170626195319.GA868@gmail.com> (raw)

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





             reply	other threads:[~2017-06-26 19:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26 19:53 Pierre Neidhardt [this message]
2017-07-02  9:45 ` bug#27502: 25.2; auto-revert adds lambda to find-file-hook Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170626195319.GA868@gmail.com \
    --to=ambrevar@gmail.com \
    --cc=27502@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.