;; derived-mode-ex.el>.
(defun c-leave-cc-mode-mode ()
- (setq c-buffer-is-cc-mode nil))
+ (when c-buffer-is-cc-mode
+ (save-restriction
+ (widen)
+ (c-save-buffer-state ()
+ (c-clear-char-properties (point-min) (point-max) 'category)
+ (c-clear-char-properties (point-min) (point-max) 'syntax-table)
+ (c-clear-char-properties (point-min) (point-max) 'c-is-sws)
+ (c-clear-char-properties (point-min) (point-max) 'c-in-sws)
+ (c-clear-char-properties (point-min) (point-max) 'c-type)
+ (if (c-major-mode-is 'awk-mode)
+ (c-clear-char-properties (point-min) (point-max) 'c-awk-NL-prop))))
+ (setq c-buffer-is-cc-mode nil)))
(defun c-init-language-vars-for (mode)
"Initialize the language variables for one of the language modes