From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Help cross reference to source file Date: Tue, 11 Jul 2006 08:14:38 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152620089 23031 80.91.229.2 (11 Jul 2006 12:14:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Jul 2006 12:14:49 +0000 (UTC) Cc: drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 11 14:14:41 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G0H8I-0001tq-TB for ged-emacs-devel@m.gmane.org; Tue, 11 Jul 2006 14:14:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0H8H-0007Ch-R6 for ged-emacs-devel@m.gmane.org; Tue, 11 Jul 2006 08:14:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G0H84-0007B3-9r for emacs-devel@gnu.org; Tue, 11 Jul 2006 08:14:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G0H82-00079A-Uj for emacs-devel@gnu.org; Tue, 11 Jul 2006 08:14:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0H82-00078y-Nu for emacs-devel@gnu.org; Tue, 11 Jul 2006 08:14:14 -0400 Original-Received: from [209.226.175.34] (helo=tomts13-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G0H9K-0000gj-44; Tue, 11 Jul 2006 08:15:34 -0400 Original-Received: from localhost ([70.53.195.221]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060711121411.EEHT29052.tomts13-srv.bellnexxia.net@localhost>; Tue, 11 Jul 2006 08:14:12 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 4C1918CDE; Tue, 11 Jul 2006 08:14:38 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Tue, 11 Jul 2006 01:51:32 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56916 Archived-At: >>>>> "Richard" == Richard Stallman writes: >> + (switch-to-buffer (current-buffer)) >> (error "Cannot find definition of `%s' in library `%s'" >> symbol library)))))))) > This burps if the selected window is a minibuffer or dedicated window. > What happens in a dedicated window if the symbol IS found in the file? It is displayed via pop-to-buffer by the following code in help-mode.el: (define-button-type 'help-function-def :supertype 'help-xref 'help-function (lambda (fun 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 nil file))) (pop-to-buffer (car location)) (goto-char (cdr location)))) 'help-echo (purecopy "mouse-2, RET: find function's definition")) -- Stefan