From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs 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 Message-ID: <87mwfeft1p.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398104181 30803 80.91.229.3 (21 Apr 2014 18:16:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2014 18:16:21 +0000 (UTC) To: 17311@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 21 20:16:16 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WcIlL-0006MO-Jv for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Apr 2014 20:16:15 +0200 Original-Received: from localhost ([::1]:50761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcIlK-0007Tz-SQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Apr 2014 14:16:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcIlD-0007Jj-Sz for bug-gnu-emacs@gnu.org; Mon, 21 Apr 2014 14:16:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcIl9-0002Cr-El for bug-gnu-emacs@gnu.org; Mon, 21 Apr 2014 14:16:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcIl8-0002Ch-Ec for bug-gnu-emacs@gnu.org; Mon, 21 Apr 2014 14:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WcIl8-0005jZ-1n for bug-gnu-emacs@gnu.org; Mon, 21 Apr 2014 14:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Apr 2014 18:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17311 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139810412921974 (code B ref -1); Mon, 21 Apr 2014 18:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Apr 2014 18:15:29 +0000 Original-Received: from localhost ([127.0.0.1]:54356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcIkZ-0005iL-GN for submit@debbugs.gnu.org; Mon, 21 Apr 2014 14:15:28 -0400 Original-Received: from fely.am-1.org ([78.47.74.50]:39098) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WcIkW-0005i9-N8 for submit@debbugs.gnu.org; Mon, 21 Apr 2014 14:15:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=p7Ctb1TJDHcIDnVDjXGkXycmq1q7GY/+VL+Rps40Heg=; b=ECba0aBGAB4Vjw3aK4kuQE2+vcdKpq7DzuAcVtvLJJ/5GfGJ9tQi0LonN9FiXK1QFs8yYAL7TvidUn2Hg7oy3PSzOtrM7gLw/OiUFKDlEPOtfLPLwj6AMqZ6wg3+0jHQLA6a7Q7YyYwTdX2Cq/b7lS6o5hI1pnMlEceeQykSJmg=; Original-Received: from oneingray-1-pt.tunnel.tserv10.par1.ipv6.he.net ([2001:470:1f12:1eb::2] helo=waterlily.siamics.net) by fely.am-1.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1WcIkV-0004EC-8X for submit@debbugs.gnu.org; Mon, 21 Apr 2014 18:15:23 +0000 Original-Received: from violet.siamics.net ([2001:470:1f13:1eb::1:1d]) by waterlily.siamics.net with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WcIkN-0007nt-TO for submit@debbugs.gnu.org; Tue, 22 Apr 2014 01:15:15 +0700 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtp (Exim 4.80) (envelope-from ) id 1WcIkN-0007dE-2P for submit@debbugs.gnu.org; Tue, 22 Apr 2014 01:15:15 +0700 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88194 Archived-At: 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 =E2=80=A6 = [speedbar-update-flag t speedbar-timer-fn] 1]) run-hooks(#[nil =E2=80=A6 [speedbar-update-flag t speedbar-timer-fn] 1]) dframe-get-focus(speedbar-frame speedbar-frame-mode #[nil =E2=80=A6 [spee= dbar-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)) =20 =20 (defun dframe-close-frame () At least one of its callers =E2=80=93 speedbar-get-focus =E2=80=93 was /no= t/ updated accordingly (as of [1]): 1061 (defun speedbar-get-focus () =E2=80=A6 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 =E2=80=98conv-hook=E2=80=99 wrapper currently used in dframe-frame-mode wi= ll resolve the issue. [1] http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/vc/ediff-diff.el= ?h=3Dtrunk&id=3Dcff4b64e835d8a198ada0dcf32e69ab03642ae60 [2] http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/vc/ediff-diff.el= ?h=3Dtrunk&id=3D02d1dcff167d8ed868df68abd7a46706f8ab5f11 --=20 FSF associate member #7257