help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Relating Symbols


From: Juanma Barranquero
Subject: Re: Relating Symbols
Date: Mon, 30 Nov 2009 12:35:01 +0100

On Mon, Nov 30, 2009 at 10:28, Nordlöw <per.nordlow@gmail.com> wrote:

> I know would like to this information to be displayed (at the end
> preferrably) when I do describe-... on that symbol. Any tips on
> realizing this using hooks or advices to the help functions?

This is a crude first cut at implementing it:

(defadvice describe-function (after related activate compile)
  (let ((related (get (ad-get-arg 0) :related)))
    (when related
      (with-current-buffer (get-buffer "*Help*")
        (let ((buffer-read-only nil)
              (inhibit-changing-match-data t))
          (goto-char (point-max))
          (re-search-backward "\\[back\\]")
          (insert (format "Related: %s\n\n" related)))))))

though, if you want to allow related to be a list, or the inserted
function names to be links, you'll have to dig deeper.

    Juanma




reply via email to

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