emacs-devel
[Top][All Lists]
Advanced

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

Re: Help cross reference to source file


From: Stefan Monnier
Subject: Re: Help cross reference to source file
Date: Tue, 11 Jul 2006 08:14:38 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>>>> "Richard" == Richard Stallman <address@hidden> 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




reply via email to

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