Function: hide-ifdef-undef

hide-ifdef-undef is an interactive and byte-compiled function defined in hideif.el.gz.

Signature

(hide-ifdef-undef START END)

Documentation

Undefine a VAR so that #ifdef VAR would not be included.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/hideif.el.gz
(defun hide-ifdef-undef (start end)
  "Undefine a VAR so that #ifdef VAR would not be included."
  (interactive
   (if (use-region-p)
       (list (region-beginning) (region-end))
     '(nil nil)))
  (let* ((symstr
          (or (and (number-or-marker-p start)
                   (number-or-marker-p end)
                   (buffer-substring-no-properties start end))
              (read-string "Undefine what? " (current-word))))
         (sym (and symstr
                   (intern symstr))))
    (if (zerop (hif-defined sym))
        (message "`%s' not defined, no need to undefine it" symstr)
      (hif-undefine-symbol sym)
      (if hide-ifdef-hiding (hide-ifdefs))
      (message "`%S' undefined" sym))))