Function: semantic-stickyfunc-mode
semantic-stickyfunc-mode is an autoloaded, interactive and
byte-compiled function defined in util-modes.el.gz.
Signature
(semantic-stickyfunc-mode &optional ARG)
Documentation
Minor mode to show the title of a tag in the header line.
Enables/disables making the header line of functions sticky.
A function (or other tag class specified by
semantic-stickyfunc-sticky-classes) has a header line, meaning the
first line which describes the rest of the construct. This first
line is what is displayed in the header line.
The minor mode can be turned on only if semantic feature is available and the current buffer was set up for parsing. Return non-nil if the minor mode is enabled.
This is a minor mode. If called interactively, toggle the
Semantic-Stickyfunc mode mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable semantic-stickyfunc-mode(var)/semantic-stickyfunc-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
<header-line> <down-mouse-1> semantic-stickyfunc-menu
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/util-modes.el.gz
;;;###autoload
(define-minor-mode semantic-stickyfunc-mode
"Minor mode to show the title of a tag in the header line.
Enables/disables making the header line of functions sticky.
A function (or other tag class specified by
`semantic-stickyfunc-sticky-classes') has a header line, meaning the
first line which describes the rest of the construct. This first
line is what is displayed in the header line.
The minor mode can be turned on only if semantic feature is
available and the current buffer was set up for parsing. Return
non-nil if the minor mode is enabled."
;; Don't need indicator. It's quite visible
:keymap semantic-stickyfunc-mode-map
(if semantic-stickyfunc-mode
(progn
(unless (and (featurep 'semantic) (semantic-active-p))
;; Disable minor mode if semantic stuff not available
(setq semantic-stickyfunc-mode nil)
(error "Buffer %s was not set up for parsing" (buffer-name)))
;; Enable the mode
;; Save previous buffer local value of header line format.
(when (and (local-variable-p 'header-line-format (current-buffer))
(not (eq header-line-format
semantic-stickyfunc-header-line-format)))
(setq-local semantic-stickyfunc-old-hlf
header-line-format))
(setq header-line-format semantic-stickyfunc-header-line-format))
;; Disable sticky func mode
;; Restore previous buffer local value of header line format if
;; the current one is the sticky func one.
(when (eq header-line-format semantic-stickyfunc-header-line-format)
(kill-local-variable 'header-line-format)
(when (local-variable-p 'semantic-stickyfunc-old-hlf (current-buffer))
(setq header-line-format semantic-stickyfunc-old-hlf)
(kill-local-variable 'semantic-stickyfunc-old-hlf)))))