emacs-devel
[Top][All Lists]
Advanced

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

Re: A plea for sanity from a frustrated hacker.


From: Johan Bockgård
Subject: Re: A plea for sanity from a frustrated hacker.
Date: Sat, 09 Jun 2007 19:59:16 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

> Would somebody help me find this function, please?

  [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))
                       (if (cdr location)
                           (goto-char (cdr location))
                         (message "Unable to find location in file"))))
    'help-echo (purecopy "mouse-2, RET: find function's definition"))

-- 
Johan Bockgård





reply via email to

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