From: Kaushal Modi <kaushal.modi@gmail.com>
To: 23460@debbugs.gnu.org, Alan Mackenzie <acm@muc.de>
Subject: bug#23460: 25.1.50; Strange behavior in local variables like start-comment
Date: Thu, 05 May 2016 22:20:27 +0000 [thread overview]
Message-ID: <CAFyQvY1FJeBbU9XhR1gW7n9x39TTqZAAFTaO7WThd0aocFC8-g@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY1ZnGeqvFd+=93MGB9aT4O3XFgW-mOQW3ajzO_wc6SqKQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]
>
>
> I'll keep you posted.
>
>
OK, I was able to get a minimum working example sooner than I thought :)
Please save the below as test.el (or some file name; else revert-buffer
will not work), open it in emacs -Q and evaluate it.
===== test.el =====
(progn
(defun my/print-comment-start-value ()
(interactive)
(message (format "`comment-start' = `%s'" comment-start)))
(defun my/repeat-revert-buffer-noconfirm (count)
(interactive "p")
(dotimes (i count)
(revert-buffer nil :noconfirm)))
(add-hook 'outline-minor-mode-hook #'my/print-comment-start-value)
; (remove-hook 'outline-minor-mode-hook #'my/print-comment-start-value)
(global-set-key (kbd "<f5>") #'my/repeat-revert-buffer-noconfirm))
;; Local Variables:
;; eval: (outline-minor-mode 1)
;; End:
=====
In emacs 25.0.93 (emacs-25 build), after opening test.el, evaluating it and
hitting F5, I get below (which is good, expected):
‘comment-start’ = ‘;’ [2 times]
But in emacs 25.1.50 (master build), after opening test.el, evaluating it
and hitting F5, I get:
‘comment-start’ = ‘;’
‘comment-start’ = ‘nil’ [2 times]
‘comment-start’ = ‘;’
So it looks like the outline-minor-mode-hook is called twice more in the
master branch and also intermittently, the comment-start loses its buffer
local value.
Hope this mini test helps debug this.
> --
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3109 bytes --]
next prev parent reply other threads:[~2016-05-05 22:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 20:35 bug#23460: 25.1.50; Strange behavior in local variables like start-comment Kaushal Modi
2016-05-05 21:40 ` Kaushal Modi
2016-05-05 22:20 ` Kaushal Modi [this message]
2016-05-06 9:37 ` Alan Mackenzie
2016-05-06 14:31 ` Kaushal Modi
2016-05-05 22:22 ` Alan Mackenzie
2016-05-05 22:35 ` Kaushal Modi
2016-05-05 22:29 ` Michael Heerdegen
2016-05-06 19:25 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFyQvY1FJeBbU9XhR1gW7n9x39TTqZAAFTaO7WThd0aocFC8-g@mail.gmail.com \
--to=kaushal.modi@gmail.com \
--cc=23460@debbugs.gnu.org \
--cc=acm@muc.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).