[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to
From: |
Stefan Monnier |
Subject: |
bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer' |
Date: |
Sun, 06 Mar 2011 14:53:31 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> ??? This function is bound to the "Close" item in the "File" menu, so
>> it is definitely related to the menu bar.
> Am I right that the time for executing `kill-this-buffer-enabled-p' is
> currently always proportional to the number of live buffers? In that
> case I'd rewrite his function as
> (defun kill-this-buffer-enabled-p ()
> (or (not (menu-bar-non-minibuffer-window-p))
> (let (found-1)
> (catch 'found-2
> (dolist (buffer (buffer-list))
> (unless (string-match-p "^ " (buffer-name buffer))
> (if (not found-1)
> (setq found-1 t)
> (throw 'found-2 t))))))))
Probably a good change, yes. It'd also be good to add a comment
explaining why we do this loop searching for some non-temp buffer.
IIUC this function is used to check whether kill-this-buffer can do its
job, and if (menu-bar-non-minibuffer-window-p) is nil, then we use
abort-recursive-edit, so we need to check if abort-recursive-edit can be
used, which seems related to minibuffer-depth rather than to
non-temp buffers.
Stefan
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer', tlh, 2011/03/06
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer', Eli Zaretskii, 2011/03/06
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer', martin rudalics, 2011/03/06
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer', Drew Adams, 2011/03/06
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer', martin rudalics, 2011/03/06
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer', Drew Adams, 2011/03/06
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer', martin rudalics, 2011/03/07
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer', Drew Adams, 2011/03/07
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer', Johan Bockgård, 2011/03/27
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in callsto `kill-this-buffer', martin rudalics, 2011/03/29
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer',
Stefan Monnier <=
- bug#8184: 23.1.90; `menu-bar-non-minibuffer-window-p' error in calls to `kill-this-buffer', martin rudalics, 2011/03/07