[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17311: M-x speedbar-get-focus fails due to a non-symbol argument to

From: Ivan Shmakov
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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])
  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)

        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.


FSF associate member #7257

reply via email to

[Prev in Thread] Current Thread [Next in Thread]