diff options
author | Glenn Morris <rgm@gnu.org> | 2020-03-04 13:57:58 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2020-03-04 13:57:58 -0800 |
commit | b5474ba1607fdca620cdee40a11cc0120697fc58 (patch) | |
tree | 2a6f3706a050270a01f008355bf11e6d1532e2f5 /lisp/progmodes/cc-mode.el | |
parent | 79f196551a23ec54c6ed67a094aedb4597d36cf5 (diff) | |
parent | a3c2d186eb514b505e61c2a89a1df886dbfcb06b (diff) | |
download | emacs-b5474ba1607fdca620cdee40a11cc0120697fc58.tar.gz emacs-b5474ba1607fdca620cdee40a11cc0120697fc58.tar.bz2 emacs-b5474ba1607fdca620cdee40a11cc0120697fc58.zip |
Merge from origin/emacs-27
a3c2d186eb (origin/emacs-27) CC Mode: Fix the handling of two adjacen...
a1abf73c76 Fix combine-change-calls-1 for when buffer-undo-list is t
db37dd2e84 Don't misinterpret doc string as initial value
40b217c2bf Bump checkdoc-version to match library header
60418a1ab2 Explain how to unset mode bindings (Bug#39802)
7cafbbe964 Fix describe-variable on values with circular syntax (Bug#...
592b1cfee9 Improve documentation of next-error-highlight-no-select (b...
Diffstat (limited to 'lisp/progmodes/cc-mode.el')
-rw-r--r-- | lisp/progmodes/cc-mode.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2a281d4d2aa..a39c50e4138 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1992,17 +1992,16 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".") ;; Note: c-just-done-before-change is nil, t, or 'whole-buffer. (unless (c-called-from-text-property-change-p) - (save-restriction - (widen) - (unless c-just-done-before-change - (c-before-change (point-min) (point-max))) - (unless (eq c-just-done-before-change t) + (unless (eq c-just-done-before-change t) + (save-restriction + (widen) + (when (null c-just-done-before-change) + (c-before-change (point-min) (point-max))) (setq beg (point-min) end (point-max) old-len (- end beg) c-new-BEG (point-min) - c-new-END (point-max))) - (setq c-just-done-before-change nil))) + c-new-END (point-max))))) ;; (c-new-BEG c-new-END) will be the region to fontify. It may become ;; larger than (beg end). |