Function: hide-ifdef-block
hide-ifdef-block is an interactive and byte-compiled function defined
in hideif.el.gz.
Signature
(hide-ifdef-block &optional ARG START END)
Documentation
Hide the ifdef block (true or false part) enclosing or before the cursor.
With optional prefix argument ARG, also hide the #ifdefs themselves.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/hideif.el.gz
(defun hide-ifdef-block (&optional arg start end)
"Hide the ifdef block (true or false part) enclosing or before the cursor.
With optional prefix argument ARG, also hide the #ifdefs themselves."
(interactive "P\nr")
(let ((hide-ifdef-lines arg))
(if (use-region-p)
(let ((hif-recurse-level (1+ hif-recurse-level)))
(hif-recurse-on start end t)
(setq mark-active nil))
(unless hide-ifdef-mode (hide-ifdef-mode 1))
(let ((top-bottom (hif-find-ifdef-block)))
(hide-ifdef-region (car top-bottom) (cdr top-bottom))
(when hide-ifdef-lines
(hif-hide-line (car top-bottom))
(hif-hide-line (1+ (cdr top-bottom))))
(setq hide-ifdef-hiding t))
(setq buffer-read-only
(or hide-ifdef-read-only hif-outside-read-only)))))