Function: senator-previous-tag
senator-previous-tag is an interactive and byte-compiled function
defined in senator.el.gz.
Signature
(senator-previous-tag)
Documentation
Navigate to the previous Semantic tag.
Return the tag or nil if at beginning of buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/senator.el.gz
;;;###autoload
(defun senator-previous-tag ()
"Navigate to the previous Semantic tag.
Return the tag or nil if at beginning of buffer."
(interactive)
(semantic-error-if-unparsed)
(let ((pos (point))
(tag (semantic-current-tag))
where)
(if (and tag
(not (senator-skip-p tag))
(senator-step-at-start-end-p tag)
(or (= pos (semantic-tag-end tag))
(senator-middle-of-tag-p pos tag)))
nil
(if (setq tag (senator-step-at-parent tag))
nil
(setq tag (senator-previous-tag-or-parent pos))
(while (and tag (senator-skip-p tag))
(setq tag (senator-previous-tag-or-parent
(semantic-tag-start tag))))))
(if (not tag)
(progn
(goto-char (point-min))
(message "Beginning of buffer"))
(cond ((or (not (senator-step-at-start-end-p tag))
(= pos (semantic-tag-end tag))
(senator-middle-of-tag-p pos tag))
(setq where "start")
(goto-char (semantic-tag-start tag)))
(t
(setq where "end")
(goto-char (semantic-tag-end tag))))
(senator-momentary-highlight-tag tag)
(message "%S: %s (%s)"
(semantic-tag-class tag)
(semantic-tag-name tag)
where))
tag))