Function: semantic-up-context-emacs-lisp-mode

semantic-up-context-emacs-lisp-mode is a byte-compiled function defined in el.el.gz.

Signature

(semantic-up-context-emacs-lisp-mode &optional POINT BOUNDS-TYPE)

Documentation

Move up one context in an Emacs Lisp function.

A Context in many languages is a block with its own local variables. In Emacs, we will move up lists and stop when one starts with one of the following context specifiers:
  let, let*, defun, with-slots
Returns non-nil it is not possible to go up a context. Override semantic-up-context in emacs-lisp-mode buffers.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/bovine/el.el.gz
;;; Context parsing
;;
;; Emacs Lisp is very different from C,C++ which most context parsing
;; functions are written.  Support them here.
(define-mode-local-override semantic-up-context emacs-lisp-mode
  (&optional _point _bounds-type)
  "Move up one context in an Emacs Lisp function.
A Context in many languages is a block with its own local variables.
In Emacs, we will move up lists and stop when one starts with one of
the following context specifiers:
  `let', `let*', `defun', `with-slots'
Returns non-nil it is not possible to go up a context."
  (let ((last-up (semantic-up-context-default)))
  (while
      (and (not (looking-at
		 "(\\(let\\*?\\|\\(?:cl-\\)?def\\(un\\|method\\|generic\\|\
define-mode-overload\\)\
\\|with-slots\\)"))
	   (not last-up))
    (setq last-up (semantic-up-context-default)))
  last-up))