Function: hif-search-ifX-regexp

hif-search-ifX-regexp is a byte-compiled function defined in hideif.el.gz.

Signature

(hif-search-ifX-regexp HIF-REGEXP &optional BACKWARD)

Documentation

Search for a valid ifX regexp defined in hideif.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/hideif.el.gz
(defun hif-search-ifX-regexp (hif-regexp &optional backward)
  "Search for a valid ifX regexp defined in hideif."
  (let ((start (point))
        (re-search-func (if backward
                            #'re-search-backward
                          #'re-search-forward))
        (limit (if backward (point-min) (point-max)))
        found)
    (while (and (setq found
                      (funcall re-search-func hif-regexp limit t))
                (hif-is-in-comment)))
    ;; Jump to the pattern if found
    (if found
        (unless backward
          (setq found
                (goto-char (- (point) (length (match-string 0))))))
      (goto-char start))
    found))