emacs-devel
[Top][All Lists]
Advanced

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

default-fill-column


From: Luc Teirlinck
Subject: default-fill-column
Date: Sat, 15 Nov 2003 10:37:55 -0600 (CST)

I use `default-fill-column' as an example, but the remarks below seem to
apply to all variables of the type `default-some-buffer-local-variable'.

Ielm run:

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (local-variable-p 'fill-column)
nil
ELISP> fill-column
70
ELISP> (setq default-fill-column 75)
75
ELISP> fill-column
70
ELISP> (local-variable-p 'fill-column)
nil
ELISP> (default-value 'fill-column)
75
ELISP> (buffer-local-value 'fill-column (current-buffer))
75
ELISP> fill-column
70

Now fill-column has two values in *ielm*:
The updated default-value accessed by `buffer-local-value' and the old
default-value, accessed by ordinary evaluation.

For instance,`describe-variable' which uses `buffer-local-value' says
that the value is 75.

It seems hard to consider this a "feature".  At the very least, the
fact that C-h v returns a value different from the value returned by
evaluation has to be considered a bug.

Again, `fill-column' is just an example.  There are plenty of similar
variables in Emacs and they all seem to behave this way.

Final remark (continuation of Ielm run):

ELISP> (setq-default fill-column (default-value 'fill-column))
75
ELISP> fill-column
75
ELISP> 

Sincerely,

Luc.




reply via email to

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