Function: semantic-grammar-anchored-indentation

semantic-grammar-anchored-indentation is a byte-compiled function defined in grammar.el.gz.

Signature

(semantic-grammar-anchored-indentation)

Documentation

Return indentation based on previous anchor character found.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/grammar.el.gz
(defun semantic-grammar-anchored-indentation ()
  "Return indentation based on previous anchor character found."
  (let (indent)
    (save-excursion
      (while (not indent)
        (semantic-grammar-backward-item)
        (cond
         ((bobp)
          (setq indent 0))
         ((looking-at ":\\(\\s-\\|$\\)")
          (setq indent (current-column))
          (forward-char)
          (skip-syntax-forward "-")
          (if (eolp) (setq indent 2))
          )
         ((and (looking-at "[;%]")
               (not (looking-at "\\<%prec\\>")))
          (setq indent 0)
          ))))
    indent))