summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2010-04-12 14:59:56 +0000
committerAlan Mackenzie <acm@muc.de>2010-04-12 14:59:56 +0000
commite2387bdba28af0022a4d63d024a8f16546001612 (patch)
treeebce3210b9d9f2c98ef50474f40dc4a0805c78ea
parenta1c7301e3195f11f5544288228d53e82f4caeda8 (diff)
downloademacs-e2387bdba28af0022a4d63d024a8f16546001612.tar.gz
Reverse 2010-02-25T21:21:25Z!acm@muc.de:
" (i) Remove any hard syntax-table properties for <, > inserted by C-y. (ii) Remove category text props, not syntax-table ones in unmarking <, >. ".
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/progmodes/cc-engine.el8
-rw-r--r--lisp/progmodes/cc-mode.el16
3 files changed, 9 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cf685114cde..f155bbee4fc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -358,16 +358,6 @@
* mail/sendmail.el (send-mail-function): Autoload the call
to custom-initialize-delay, not otherwise preserved in loaddefs.el.
-2010-02-25 Alan Mackenzie <acm@muc.de>
-
- * progmodes/cc-engine.el (c-clear-<-pair-props)
- (c-clear->-pair-props): Correct to wipe category text props, not
- syntax-table ones.
-
- * progmodes/cc-mode.el (c-after-change): Remove any hard
- syntax-table properties for <, > which, e.g., C-y has
- inopportunely converted from category properties.
-
2010-02-24 Chong Yidong <cyd@stupidchicken.com>
* files.el (hack-local-variables-filter): For eval forms, also
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 336e2c39262..3b7f6e4ea0a 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -4929,8 +4929,8 @@ comment at the start of cc-engine.el for more info."
(c-go-list-forward))
(when (equal (c-get-char-property (1- (point)) 'syntax-table)
c->-as-paren-syntax) ; should always be true.
- (c-clear-char-property (1- (point)) 'category))
- (c-clear-char-property pos 'category))))
+ (c-clear-char-property (1- (point)) 'syntax-table))
+ (c-clear-char-property pos 'syntax-table))))
(defun c-clear->-pair-props (&optional pos)
;; POS (default point) is at a > character. If it is marked with
@@ -4946,8 +4946,8 @@ comment at the start of cc-engine.el for more info."
(c-go-up-list-backward))
(when (equal (c-get-char-property (point) 'syntax-table)
c-<-as-paren-syntax) ; should always be true.
- (c-clear-char-property (point) 'category))
- (c-clear-char-property pos 'category))))
+ (c-clear-char-property (point) 'syntax-table))
+ (c-clear-char-property pos 'syntax-table))))
(defun c-clear-<>-pair-props (&optional pos)
;; POS (default point) is at a < or > character. If it has an
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 7f9ed6436f4..57f87c04b88 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -642,9 +642,11 @@ compatible with old code; callers should always specify it."
(widen)
(save-excursion
(if c-get-state-before-change-functions
- (mapc (lambda (fn)
- (funcall fn (point-min) (point-max)))
- c-get-state-before-change-functions))
+ (let ((beg (point-min))
+ (end (point-max)))
+ (mapc (lambda (fn)
+ (funcall fn beg end))
+ c-get-state-before-change-functions)))
(if c-before-font-lock-function
(funcall c-before-font-lock-function (point-min) (point-max)
(- (point-max) (point-min))))))
@@ -1040,14 +1042,6 @@ Note that the style variables are always made local to the buffer."
(when (> beg end)
(setq beg end)))
- ;; C-y is capable of spuriously converting category properties
- ;; c-</>-as-paren-syntax into hard syntax-table properties. Remove
- ;; these when it happens.
- (c-clear-char-property-with-value beg end 'syntax-table
- c-<-as-paren-syntax)
- (c-clear-char-property-with-value beg end 'syntax-table
- c->-as-paren-syntax)
-
(c-trim-found-types beg end old-len) ; maybe we don't need all of these.
(c-invalidate-sws-region-after beg end)
(c-invalidate-state-cache beg)