Function: sgml-beginning-of-tag

sgml-beginning-of-tag is a byte-compiled function defined in sgml-mode.el.gz.

Signature

(sgml-beginning-of-tag &optional ONLY-IMMEDIATE)

Documentation

Skip to beginning of tag and return its name.

If this can't be done, return nil.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/sgml-mode.el.gz
(defun sgml-beginning-of-tag (&optional only-immediate)
  "Skip to beginning of tag and return its name.
If this can't be done, return nil."
  (let ((context (sgml-lexical-context)))
    (if (eq (car context) 'tag)
	(progn
	  (goto-char (cdr context))
	  (when (looking-at sgml-tag-name-re)
	    (match-string-no-properties 1)))
      (if only-immediate nil
	(when (not (eq (car context) 'text))
	  (goto-char (cdr context))
	  (sgml-beginning-of-tag t))))))