Function: hif-endif-to-ifdef
hif-endif-to-ifdef is a byte-compiled function defined in
hideif.el.gz.
Signature
(hif-endif-to-ifdef)
Documentation
If positioned at #endif form, skip backward to corresponding #ifX.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/hideif.el.gz
(defun hif-endif-to-ifdef ()
"If positioned at #endif form, skip backward to corresponding #ifX."
;; (message "hif-endif-to-ifdef at %d" (point))
(let ((start (point)))
(hif-find-previous-relevant)
(if (= start (point))
(error "Mismatched #ifdef #endif pair")))
(cond ((hif-looking-at-endif)
(hif-endif-to-ifdef) ; Find beginning of nested if
(hif-endif-to-ifdef)) ; Find beginning of outer if or else
((hif-looking-at-elif)
(hif-endif-to-ifdef))
((hif-looking-at-else)
(hif-endif-to-ifdef))
((hif-looking-at-ifX)
'done)
(t
(error "Mismatched #endif")))) ; never gets here