[Top][All Lists]

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

Re: Jump to autoconf macro documentation

From: Andrea Crotti
Subject: Re: Jump to autoconf macro documentation
Date: Sun, 30 Jan 2011 18:31:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin)

> Yes:
> Info-index is an interactive compiled Lisp function in `info.el'.
> (Info-index TOPIC)
> Look up a string TOPIC in the index for this manual and go to that entry.
> If there are no exact matches to the specified topic, this chooses
> the first match which is a case-insensitive substring of a topic.
> Use the , command to see the other matches.
> Give an empty topic name to go to the Index node itself.

Maybe the key chosen is not the best but it works wonderfully :)

--8<---------------cut here---------------start------------->8---
  (setq autoconf-macro-syntax-table (make-syntax-table))
  (modify-syntax-entry ?_ "w" autoconf-macro-syntax-table)
  (defun get-autoconf-macro-definition ()
    "jump to the definition of a macro"
        ((macro (with-syntax-table autoconf-macro-syntax-table (thing-at-point 
      (info "autoconf" (concat "*autconf*<" macro ">"))
      (Info-index macro)))
  (add-hook 'autoconf-mode-hook
            (lambda ()
              (local-set-key "\C-j" 'get-autoconf-macro-definition)))
--8<---------------cut here---------------end--------------->8---

reply via email to

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