Function: srecode-semantic-handle-:texi
srecode-semantic-handle-:texi is an autoloaded and byte-compiled
function defined in texi.el.gz.
Signature
(srecode-semantic-handle-:texi DICT)
Documentation
Add macros into the dictionary DICT based on the current texinfo file.
Adds the following:
LEVEL - chapter, section, subsection, etc
NEXTLEVEL - One below level
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/srecode/texi.el.gz
;;;###autoload
(defun srecode-semantic-handle-:texi (dict)
"Add macros into the dictionary DICT based on the current texinfo file.
Adds the following:
LEVEL - chapter, section, subsection, etc
NEXTLEVEL - One below level"
;; LEVEL and NEXTLEVEL calculation
(semantic-fetch-tags)
(let ((tags (reverse (semantic-find-tag-by-overlay)))
(level nil))
(while (and tags (not (semantic-tag-of-class-p (car tags) 'section)))
(setq tags (cdr tags)))
(when tags
(save-excursion
(goto-char (semantic-tag-start (car tags)))
(when (looking-at "@node")
(forward-line 1)
(beginning-of-line))
(when (looking-at "@\\(\\w+\\)")
(setq level (match-string 1))
)))
(srecode-dictionary-set-value dict "LEVEL" (or level "chapter"))
(let ((nl (assoc level '( ( nil . "top" )
("top" . "chapter")
("chapter" . "section")
("section" . "subsection")
("subsection" . "subsubsection")
("subsubsection" . "subsubsection")
))))
(srecode-dictionary-set-value dict "NEXTLEVEL" (cdr nl))))
)