GNU bug report logs - #17311
M-x speedbar-get-focus fails due to a non-symbol argument to run-hooks

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Mon, 21 Apr 2014 18:16:01 UTC

Severity: normal

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17311 in the body.
You can then email your comments to 17311 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17311; Package emacs. (Mon, 21 Apr 2014 18:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 21 Apr 2014 18:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: M-x speedbar-get-focus fails due to a non-symbol argument to
 run-hooks 
Date: Mon, 21 Apr 2014 18:15:14 +0000
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17311; Package emacs. (Mon, 21 Apr 2014 21:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 17311 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 17311 <at> debbugs.gnu.org
Subject: Re: bug#17311: M-x speedbar-get-focus fails due to a non-symbol
 argument to run-hooks
Date: Mon, 21 Apr 2014 17:46:00 -0400
> 	At least one of its callers – speedbar-get-focus – was /not/
> 	updated accordingly (as of [1]):

Good point, thank you.  I just removed that `hook' argument on the
`emacs-24' branch, since that code can just as well be run by the
caller anyway.


        Stefan




bug marked as fixed in version 24.4, send any further explanations to 17311 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 03 May 2014 01:25:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 31 May 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.