From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#29611: 25.3; help navigation error Date: Thu, 07 Dec 2017 20:32:07 -0500 Message-ID: References: <87r2s6gp31.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1512696790 12978 195.159.176.226 (8 Dec 2017 01:33:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Dec 2017 01:33:10 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) To: 29611-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 08 02:33:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN7XG-0003IH-6W for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Dec 2017 02:33:06 +0100 Original-Received: from localhost ([::1]:35159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN7XN-0001OT-AD for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Dec 2017 20:33:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN7XE-0001NG-OC for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 20:33:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eN7XD-0006wa-RY for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 20:33:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42476) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eN7XD-0006wG-NY for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 20:33:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eN7XD-00087n-Gj for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 20:33:03 -0500 Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Dec 2017 01:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 29611 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Mail-Followup-To: 29611@debbugs.gnu.org, rgm@gnu.org, alex.branham@gmail.com Original-Received: via spool by 29611-done@debbugs.gnu.org id=D29611.151269673731149 (code D ref 29611); Fri, 08 Dec 2017 01:33:03 +0000 Original-Received: (at 29611-done) by debbugs.gnu.org; 8 Dec 2017 01:32:17 +0000 Original-Received: from localhost ([127.0.0.1]:51152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN7WS-00086L-SX for submit@debbugs.gnu.org; Thu, 07 Dec 2017 20:32:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN7WR-000868-7E for 29611-done@debbugs.gnu.org; Thu, 07 Dec 2017 20:32:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eN7WL-00069x-6M for 29611-done@debbugs.gnu.org; Thu, 07 Dec 2017 20:32:10 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN7WL-00069t-1n for 29611-done@debbugs.gnu.org; Thu, 07 Dec 2017 20:32:09 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1eN7WJ-0000kA-FP; Thu, 07 Dec 2017 20:32:07 -0500 X-Spook: AFSPC 9/11 Power outage Phreaking hackers explosion Ebola X-Ran: pg{7lGC1q>Y<.EN7~Mvmw7T[t(RM6]^m?Td{8?Fg/H2yo=gIv*UQp"FtUr5&Ne*L0]C/=h X-Hue: white X-Attribution: GM In-Reply-To: <87r2s6gp31.fsf@gmail.com> (Alex Branham's message of "Thu, 07 Dec 2017 16:17:38 -0600") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:140790 Archived-At: Version: 26.0.91 Thanks; looks like an old bug. commit c0a670a (HEAD, origin/emacs-26, emacs-26) Date: Thu Dec 7 20:30:39 2017 -0500 * lisp/help-mode.el (help-function-def): Allow help-make-xrefs to call with one argument. (Bug#29611) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index a98bce0..8bafa46 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -192,20 +192,24 @@ 'help-customize-face (define-button-type 'help-function-def :supertype 'help-xref - 'help-function (lambda (fun file &optional type) - (require 'find-func) - (when (eq file 'C-source) - (setq file - (help-C-file-name (indirect-function fun) 'fun))) - ;; Don't use find-function-noselect because it follows - ;; aliases (which fails for built-in functions). - (let ((location - (find-function-search-for-symbol fun type file))) - (pop-to-buffer (car location)) - (run-hooks 'find-function-after-hook) - (if (cdr location) - (goto-char (cdr location)) - (message "Unable to find location in file")))) + 'help-function (lambda (fun &optional file type) + (or file + (setq file (find-lisp-object-file-name fun type))) + (if (not file) + (message "Unable to find defining file") + (require 'find-func) + (when (eq file 'C-source) + (setq file + (help-C-file-name (indirect-function fun) 'fun))) + ;; Don't use find-function-noselect because it follows + ;; aliases (which fails for built-in functions). + (let ((location + (find-function-search-for-symbol fun type file))) + (pop-to-buffer (car location)) + (run-hooks 'find-function-after-hook) + (if (cdr location) + (goto-char (cdr location)) + (message "Unable to find location in file"))))) 'help-echo (purecopy "mouse-2, RET: find function's definition")) (define-button-type 'help-function-cmacro ; FIXME: Obsolete since 24.4. @@ -495,12 +499,6 @@ help-make-xrefs (help-xref-button 8 'help-face sym))) ((match-string 6)) ; nothing for `symbol' ((match-string 7) - ;; this used: - ;; #'(lambda (arg) - ;; (let ((location - ;; (find-function-noselect arg))) - ;; (pop-to-buffer (car location)) - ;; (goto-char (cdr location)))) (help-xref-button 8 'help-function-def sym)) ((cl-some (lambda (x) (funcall (nth 1 x) sym)) describe-symbol-backends)