GNU bug report logs - #11606
24.1; Get rid of buffer local hook variables in find-file.el

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sat, 2 Jun 2012 04:48:02 UTC

Severity: minor

Tags: notabug, wontfix

Found in version 24.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 11606 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Leo <sdl.web <at> gmail.com>
Cc: 11606 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#11606: 24.1;
	Get rid of buffer local hook variables in find-file.el
Date: Tue, 5 Jun 2012 18:14:13 +0200
On Sun, Jun 3, 2012 at 6:05 AM, Leo <sdl.web <at> gmail.com> wrote:

> I was thinking that add-hook supports adding local hooks which might be
> better than making those hooks buffer-local.

Most hooks and hook-like variables can be useful as either global or
buffer-local, and for these (add-hook X Y Z t) or (set
(make-local-variable X) Y) is the way to go.

But there are some hooks that make no sense as global variables, or
are never used that way. For these, being automatically buffer-local
is, in fact, less error prone.

A notable example is revert-buffer-function, which strangely we have
not made automatically-buffer local even when the 31 packages in
lisp/** that assign it do convert it to buffer-local first...

    Juanma




This bug report was last modified 11 years and 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.