Function: srecode-template-current-context

srecode-template-current-context is a byte-compiled function defined in srt-mode.el.gz.

Signature

(srecode-template-current-context &optional POINT)

Documentation

Calculate the context encompassing POINT.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/srt-mode.el.gz
(defun srecode-template-current-context (&optional point)
  "Calculate the context encompassing POINT."
  (save-excursion
    (when point (goto-char (point)))
    (let ((ct (semantic-current-tag)))
      (when (not ct)
	(setq ct (semantic-find-tag-by-overlay-prev)))

      ;; Loop till we find the context.
      (while (and ct (not (semantic-tag-of-class-p ct 'context)))
	(setq ct (semantic-find-tag-by-overlay-prev
		  (semantic-tag-start ct))))

      (if ct
	  (read (semantic-tag-name ct))
	'declaration))))