summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-defs.el26
-rw-r--r--lisp/progmodes/cc-engine.el4
2 files changed, 16 insertions, 14 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index ab4baa247b9..32b691f43bd 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -375,18 +375,19 @@ to it is returned. This function does not modify the point or the mark."
;; Constant to decide at compilation time whether to use category
;; properties. Currently (2010-03) they're available only on GNU Emacs.
(defconst c-use-category
- (with-temp-buffer
- (let ((parse-sexp-lookup-properties t)
- (lookup-syntax-properties t))
- (set-syntax-table (make-syntax-table))
- (insert "<()>")
- (put-text-property (point-min) (1+ (point-min))
- 'category 'c-<-as-paren-syntax)
- (put-text-property (+ 3 (point-min)) (+ 4 (point-min))
- 'category 'c->-as-paren-syntax)
- (goto-char (point-min))
- (forward-sexp)
- (= (point) (+ 4 (point-min)))))))
+ (and (not (boundp 'literal-cache-hwm))
+ (with-temp-buffer
+ (let ((parse-sexp-lookup-properties t)
+ (lookup-syntax-properties t))
+ (set-syntax-table (make-syntax-table))
+ (insert "<()>")
+ (put-text-property (point-min) (1+ (point-min))
+ 'category 'c-<-as-paren-syntax)
+ (put-text-property (+ 3 (point-min)) (+ 4 (point-min))
+ 'category 'c->-as-paren-syntax)
+ (goto-char (point-min))
+ (forward-sexp)
+ (= (point) (+ 4 (point-min))))))))
(defvar c-use-extents)
@@ -498,6 +499,7 @@ The return value is the value of the last form in BODY."
`(with-silent-modifications (let* ,varlist ,@body))
`(let* ((modified (buffer-modified-p)) (buffer-undo-list t)
(inhibit-read-only t) (inhibit-point-motion-hooks t)
+ (inhibit-modification-hooks t)
before-change-functions after-change-functions
deactivate-mark
buffer-file-name buffer-file-truename ; Prevent primitives checking
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 5a26c0f2770..9a3cb020ff4 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -10155,7 +10155,7 @@ comment at the start of cc-engine.el for more info."
(goto-char res)
(eq (car (c-beginning-of-decl-1 lim)) 'same))
(cons (point) nil) ; Return value.
-
+
(goto-char pos)
;; Checks to do on all sexps before the brace, up to the
;; beginning of the statement.
@@ -11502,7 +11502,7 @@ comment at the start of cc-engine.el for more info."
(cond
((c-backward-over-enum-header)
(setq placeholder (c-point 'boi)))
- ((consp (setq placeholder
+ ((consp (setq placeholder
(c-looking-at-or-maybe-in-bracelist
containing-sexp lim)))
(setq tmpsymbol (and (cdr placeholder) 'topmost-intro-cont))