GNU bug report logs -
#11930
24.1.50; kill-all-local-variables ignores some non-permanent-local vars
Previous Next
Reported by: Chong Yidong <cyd <at> gnu.org>
Date: Fri, 13 Jul 2012 07:50:01 UTC
Severity: normal
Found in version 24.1.50
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11930 in the body.
You can then email your comments to 11930 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11930
; Package
emacs
.
(Fri, 13 Jul 2012 07:50:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chong Yidong <cyd <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 13 Jul 2012 07:50:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The documentation of `kill-all-local-variables' says only that it does
not reset variables marked as `permanent-local'. But it also seems to
ignore certain per-buffer variables that lack the `permanent-local'
property. One such variable is `buffer-read-only':
emacs -Q
M-: (setq buffer-read-only t) RET (or just C-x C-q)
M-: (kill-all-local-variables) RET
C-h v buffer-read-only RET
buffer-read-only is a variable defined in `C source code'.
Its value is t
Local in buffer *scratch*; global value is nil
M-: (get 'buffer-read-only 'permanent-local)
=> nil
The `default-directory' variable also behaves this way. Other
per-buffer variables, like `line-spacing', ARE reset by
`kill-all-local-variables'.
We should assign a non-nil `permanent-local' property to these
variables. Even if the internal code doesn't need the property to work
for these variables, it would be a useful signal for Lisp programmers.
Off the top of my head, I'm guessing the affected variables are those
listed in buffer.c:4961 (with a -1 index in buffer_local_flags).
In GNU Emacs 24.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
of 2012-07-13 on ulysses
Bzr revision: 109067 eggert <at> cs.ucla.edu-20120713035058-5m17bmslw6b9z0s2
Reply sent
to
Chong Yidong <cyd <at> gnu.org>
:
You have taken responsibility.
(Fri, 13 Jul 2012 14:33:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Chong Yidong <cyd <at> gnu.org>
:
bug acknowledged by developer.
(Fri, 13 Jul 2012 14:33:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 11930-done <at> debbugs.gnu.org (full text, mbox):
> We should assign a non-nil `permanent-local' property to these
> variables. Even if the internal code doesn't need the property to work
> for these variables, it would be a useful signal for Lisp programmers.
Done in r109073.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 11 Aug 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 272 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.