Function: sgml--find-<>-backward

sgml--find-<>-backward is a byte-compiled function defined in sgml-mode.el.gz.

Signature

(sgml--find-<>-backward LIMIT)

Documentation

Search backward for a '<' or '>' character.

The character must have open or close syntax. Returns t if found, nil otherwise.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/sgml-mode.el.gz
(defun sgml--find-<>-backward (limit)
  "Search backward for a '<' or '>' character.
The character must have open or close syntax.
Returns t if found, nil otherwise."
  (catch 'found
    (while (re-search-backward "[<>]" limit 'move)
      ;; If this character has "open" or "close" syntax, then we've
      ;; found the one we want.
      (when (and (memq (syntax-class (syntax-after (point))) '(4 5))
                 ;; We want to ignore tags in comments.  We could also
                 ;; check `syntax-ppss', but that can become expensive
                 ;; in a busy loop, so we re-use the face instead.
                 (not (memq (get-text-property (point) 'face)
                            '(font-lock-comment-delimiter-face
                              font-lock-comment-face))))
        (throw 'found t)))))