mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
On leaving CC Mode, clean up by removing character properties.
* lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Remove from the buffer all instances of the text properties/extents category, syntax-table, c-is-sws, c-in-sws, c-type, and c-awk-NL-prop.
This commit is contained in:
parent
90c647b97f
commit
7149cc54e7
1 changed files with 12 additions and 1 deletions
|
|
@ -141,7 +141,18 @@
|
|||
;; 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue