[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23460: 25.1.50; Strange behavior in local variables like start-comme
From: |
Michael Heerdegen |
Subject: |
bug#23460: 25.1.50; Strange behavior in local variables like start-comment |
Date: |
Fri, 06 May 2016 00:29:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) |
Kaushal Modi <kaushal.modi@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.