bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Juanma Barranquero
Subject: 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 <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]