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

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

Re: Buffer-menu-toggle-files-only should use Buffer-menu-revert, not rev


From: Stefan Monnier
Subject: Re: Buffer-menu-toggle-files-only should use Buffer-menu-revert, not revert-buffer
Date: Sun, 21 Nov 2004 19:41:09 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

>     The user should use setq (or setq-default) in his .emacs and not
>     defvar.  Using `defvar' is a convention for Lisp libraries.
> I won't debate that, even if I disagree.

There is no possible disagreement.  A variable should be *defined* (with
defvar or defconst) at only a single place, typically the library that
"owns" it (makes use of it).  [ It's also incidentally an error to use
make-variable-buffer-local anywhere else than once in the "owner"'s code. ]

> If you like, substitute "Lisp library" for "user and his .emacs" - the
> same problem is there, I think: There is no way to use a defvar to define
> these variables.

The user is of course free to use `defvar' to define his own variables, but
not to set a variable defined in another library.


        Stefan




reply via email to

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