[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16804: 24.3.50; [PATCH] fix with-silent-modifications
From: |
Leo Liu |
Subject: |
bug#16804: 24.3.50; [PATCH] fix with-silent-modifications |
Date: |
Wed, 19 Feb 2014 23:35:07 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) |
On 2014-02-19 22:28 +0800, Stefan Monnier wrote:
> Yes, that's the general understanding I already had, but the particulars
> are important as well. Could you give details of the problem you
> bump into? Maybe a backtrace showing the sequence of calls that leads
> to using buffer-file-name while it's rebound?
1. Emacs -q and eval the following code
;;;--------------------------------
(setq eldoc-idle-delay 0.2)
(add-hook 'js2-mode-hook #'bug)
(defun bug ()
(setq-local eldoc-documentation-function #'bug-1)
(setq js2-idle-timer-delay 0.2)
(when buffer-file-name
(eldoc-mode 1)))
(defun bug-1 ()
(message "::%S::" buffer-file-name))
;;;--------------------------------
2. open a large javascript file (a few hundred lines) and switch its
mode to js2-mode. For example
backbone.js from git@github.com:jashkenas/backbone.git will do
(sorry github is blocked today by my country so I cannot access it
myself)
3. edit the file and see ::nil:: echoed
This means if function bug-1 needs buffer-file-name, directly or
indirectly, it won't work.
Leo
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Leo Liu, 2014/02/18
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Stefan Monnier, 2014/02/18
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Leo Liu, 2014/02/19
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Stefan Monnier, 2014/02/19
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications,
Leo Liu <=
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Stefan Monnier, 2014/02/19
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Leo Liu, 2014/02/19
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Stefan Monnier, 2014/02/19
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Leo Liu, 2014/02/20
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Stefan Monnier, 2014/02/20
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Leo Liu, 2014/02/20
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Stefan Monnier, 2014/02/20
- bug#16804: 24.3.50; [PATCH] fix with-silent-modifications, Leo Liu, 2014/02/20