GNU bug report logs -
#23460
25.1.50; Strange behavior in local variables like start-comment
Previous Next
Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>
Date: Thu, 5 May 2016 20:37:02 UTC
Severity: normal
Merged with 23463
Found in version 25.1.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 23460 <at> debbugs.gnu.org (full text, mbox):
Kaushal Modi <kaushal.modi <at> gmail.com> writes:
> (1) Evaluate the above in emacs -Q
> (2) You would be in *scratch* buffer and that's alright
> (3) Hit F5 couple of times and you should see
> ‘comment-start’ is undefined, it’s value is: ‘nil’
> (4) Now hit F6 (which just prints the value of comment-start variable) and you will see
> ‘comment-start’ = ‘;’
> (5) Isn't that strange?!
Strange, but, unless I misunderstood what your described, expected:
Reverting is a typical case where all local variable definitions are
cleared (intentionally): Unless arg PRESERVE-MODES is non-nil, this
calls `after-find-file' which calls `normal-mode' that (re)sets the
major mode of the buffer. Changing the major mode typically always
kills all buffer local bindings.
So to say, it's a feature: `revert-buffer' also reverts local variable
bindings.
Michael.
This bug report was last modified 9 years and 76 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.