Function: cpp-parse-open
cpp-parse-open is a byte-compiled function defined in cpp.el.gz.
Signature
(cpp-parse-open BRANCH EXPR BEGIN END)
Documentation
Push information about conditional-beginning onto cpp-state-stack.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cpp.el.gz
(defun cpp-parse-open (branch expr begin end)
"Push information about conditional-beginning onto `cpp-state-stack'."
;; Discard comments within this line.
(while (string-match "\\b[ \t]*/\\*.*\\*/[ \t]*\\b" expr)
(setq expr (concat (substring expr 0 (match-beginning 0))
(substring expr (match-end 0)))))
;; If a comment starts on this line and continues past, discard it.
(if (string-match "\\b[ \t]*/\\*" expr)
(setq expr (substring expr 0 (match-beginning 0))))
;; Delete any C++ comment from the line.
(if (string-match "\\b[ \t]*\\(//.*\\)?$" expr)
(setq expr (substring expr 0 (match-beginning 0))))
(while (string-match "[ \t]+" expr)
(setq expr (concat (substring expr 0 (match-beginning 0))
(substring expr (match-end 0)))))
(setq cpp-state-stack (cons (list branch expr begin end) cpp-state-stack))
(or (member expr cpp-parse-symbols)
(setq cpp-parse-symbols
(cons expr cpp-parse-symbols)))
(if (assoc expr cpp-edit-list)
(cpp-make-known-overlay begin end)
(cpp-make-unknown-overlay begin end)))