From: Ivan Shmakov <ivan@siamics.net>
To: 17311@debbugs.gnu.org
Subject: bug#17311: M-x speedbar-get-focus fails due to a non-symbol argument to run-hooks
Date: Mon, 21 Apr 2014 18:15:14 +0000 [thread overview]
Message-ID: <87mwfeft1p.fsf@violet.siamics.net> (raw)
Package: emacs
As of cff4b64e835d [1], M-x speedbar-get-focus RET (as called
from, say, erc-speedbar-browser) fails with a backtrace like:
Debugger entered--Lisp error: (wrong-type-argument symbolp #[nil … [speedbar-update-flag t speedbar-timer-fn] 1])
run-hooks(#[nil … [speedbar-update-flag t speedbar-timer-fn] 1])
dframe-get-focus(speedbar-frame speedbar-frame-mode #[nil … [speedbar-update-flag t speedbar-timer-fn] 1])
speedbar-get-focus()
call-interactively(speedbar-get-focus record nil)
command-execute(speedbar-get-focus record)
execute-extended-command(nil "speedbar-get-focus")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
The likely cause is that the change made last August as part of
02d1dcff167d [2] was in fact incomplete. Specifically, while
dframe-get-focus was changed to allow only a hook argument (that
is: a hook variable, as accepted by run-hooks):
index 21b5085..6696707 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -616,7 +622,7 @@ (defun dframe-get-focus (frame-var activator &optional hook)
)
(other-frame 0)
;; If updates are off, then refresh the frame (they want it now...)
- (run-hooks 'hook))
+ (run-hooks hook))
(defun dframe-close-frame ()
At least one of its callers – speedbar-get-focus – was /not/
updated accordingly (as of [1]):
1061 (defun speedbar-get-focus ()
…
1067 (dframe-get-focus 'speedbar-frame 'speedbar-frame-mode
1068 (lambda () (let ((speedbar-update-flag t))
1069 (speedbar-timer-fn)))))
I guess employing in speedbar-get-focus something like the
‘conv-hook’ wrapper currently used in dframe-frame-mode will
resolve the issue.
[1] http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/vc/ediff-diff.el?h=trunk&id=cff4b64e835d8a198ada0dcf32e69ab03642ae60
[2] http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/vc/ediff-diff.el?h=trunk&id=02d1dcff167d8ed868df68abd7a46706f8ab5f11
--
FSF associate member #7257
next reply other threads:[~2014-04-21 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 18:15 Ivan Shmakov [this message]
2014-04-21 21:46 ` bug#17311: M-x speedbar-get-focus fails due to a non-symbol argument to run-hooks Stefan Monnier
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=87mwfeft1p.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=17311@debbugs.gnu.org \
/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).