Function: semantic-grammar-find-macro-expander
semantic-grammar-find-macro-expander is an interactive and
byte-compiled function defined in grammar.el.gz.
Signature
(semantic-grammar-find-macro-expander MACRO-NAME LIBRARY)
Documentation
Visit the Emacs Lisp library where a grammar macro is implemented.
MACRO-NAME is a symbol that identifies a grammar macro. LIBRARY is the name (sans extension) of the Emacs Lisp library where to start searching the macro implementation. Lookup in included libraries, if necessary. Find a function tag (in current tags table) whose name contains MACRO-NAME. Select the buffer containing the tag's definition, and move point there.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/grammar.el.gz
(defun semantic-grammar-find-macro-expander (macro-name library)
"Visit the Emacs Lisp library where a grammar macro is implemented.
MACRO-NAME is a symbol that identifies a grammar macro.
LIBRARY is the name (sans extension) of the Emacs Lisp library where
to start searching the macro implementation. Lookup in included
libraries, if necessary.
Find a function tag (in current tags table) whose name contains MACRO-NAME.
Select the buffer containing the tag's definition, and move point there."
(interactive
(let* ((dic (semantic--grammar-macro-compl-dict))
(def (assoc (completing-read "Macro: " dic nil 1) dic)))
(or (cdr def) '(nil nil))))
(when (and macro-name library)
(let* ((lib (format "%s.el" library))
(buf (find-file-noselect (or (locate-library lib t) lib)))
(tag (with-current-buffer buf
(semantic--grammar-macro-function-tag
(format "%s-%s" library macro-name)))))
(if tag
(progn
(require 'semantic/decorate)
(pop-to-buffer (semantic-tag-buffer tag))
(goto-char (semantic-tag-start tag))
(semantic-momentary-highlight-tag tag))
(pop-to-buffer buf)
(message "No expander found in library %s for macro %s"
library macro-name)))))