diff options
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 16 |
3 files changed, 25 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d0cdaf25a23..59bd441f0d8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2010-02-25 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | * progmodes/cc-engine.el (c-clear-<-pair-props) | ||
| 4 | (c-clear->-pair-props): Correct to wipe category text props, not | ||
| 5 | syntax-table ones. | ||
| 6 | |||
| 7 | * progmodes/cc-mode.el (c-after-change): Remove any hard | ||
| 8 | syntax-table properties for <, > which, e.g., C-y has | ||
| 9 | inopportunely converted from category properties. | ||
| 10 | |||
| 1 | 2010-02-24 Chong Yidong <cyd@stupidchicken.com> | 11 | 2010-02-24 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 12 | ||
| 3 | * files.el (hack-local-variables-filter): For eval forms, also | 13 | * 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 3b7f6e4ea0a..336e2c39262 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." | |||
| 4929 | (c-go-list-forward)) | 4929 | (c-go-list-forward)) |
| 4930 | (when (equal (c-get-char-property (1- (point)) 'syntax-table) | 4930 | (when (equal (c-get-char-property (1- (point)) 'syntax-table) |
| 4931 | c->-as-paren-syntax) ; should always be true. | 4931 | c->-as-paren-syntax) ; should always be true. |
| 4932 | (c-clear-char-property (1- (point)) 'syntax-table)) | 4932 | (c-clear-char-property (1- (point)) 'category)) |
| 4933 | (c-clear-char-property pos 'syntax-table)))) | 4933 | (c-clear-char-property pos 'category)))) |
| 4934 | 4934 | ||
| 4935 | (defun c-clear->-pair-props (&optional pos) | 4935 | (defun c-clear->-pair-props (&optional pos) |
| 4936 | ;; POS (default point) is at a > character. If it is marked with | 4936 | ;; 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." | |||
| 4946 | (c-go-up-list-backward)) | 4946 | (c-go-up-list-backward)) |
| 4947 | (when (equal (c-get-char-property (point) 'syntax-table) | 4947 | (when (equal (c-get-char-property (point) 'syntax-table) |
| 4948 | c-<-as-paren-syntax) ; should always be true. | 4948 | c-<-as-paren-syntax) ; should always be true. |
| 4949 | (c-clear-char-property (point) 'syntax-table)) | 4949 | (c-clear-char-property (point) 'category)) |
| 4950 | (c-clear-char-property pos 'syntax-table)))) | 4950 | (c-clear-char-property pos 'category)))) |
| 4951 | 4951 | ||
| 4952 | (defun c-clear-<>-pair-props (&optional pos) | 4952 | (defun c-clear-<>-pair-props (&optional pos) |
| 4953 | ;; POS (default point) is at a < or > character. If it has an | 4953 | ;; 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 57f87c04b88..7f9ed6436f4 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -642,11 +642,9 @@ compatible with old code; callers should always specify it." | |||
| 642 | (widen) | 642 | (widen) |
| 643 | (save-excursion | 643 | (save-excursion |
| 644 | (if c-get-state-before-change-functions | 644 | (if c-get-state-before-change-functions |
| 645 | (let ((beg (point-min)) | 645 | (mapc (lambda (fn) |
| 646 | (end (point-max))) | 646 | (funcall fn (point-min) (point-max))) |
| 647 | (mapc (lambda (fn) | 647 | c-get-state-before-change-functions)) |
| 648 | (funcall fn beg end)) | ||
| 649 | c-get-state-before-change-functions))) | ||
| 650 | (if c-before-font-lock-function | 648 | (if c-before-font-lock-function |
| 651 | (funcall c-before-font-lock-function (point-min) (point-max) | 649 | (funcall c-before-font-lock-function (point-min) (point-max) |
| 652 | (- (point-max) (point-min)))))) | 650 | (- (point-max) (point-min)))))) |
| @@ -1042,6 +1040,14 @@ Note that the style variables are always made local to the buffer." | |||
| 1042 | (when (> beg end) | 1040 | (when (> beg end) |
| 1043 | (setq beg end))) | 1041 | (setq beg end))) |
| 1044 | 1042 | ||
| 1043 | ;; C-y is capable of spuriously converting category properties | ||
| 1044 | ;; c-</>-as-paren-syntax into hard syntax-table properties. Remove | ||
| 1045 | ;; these when it happens. | ||
| 1046 | (c-clear-char-property-with-value beg end 'syntax-table | ||
| 1047 | c-<-as-paren-syntax) | ||
| 1048 | (c-clear-char-property-with-value beg end 'syntax-table | ||
| 1049 | c->-as-paren-syntax) | ||
| 1050 | |||
| 1045 | (c-trim-found-types beg end old-len) ; maybe we don't need all of these. | 1051 | (c-trim-found-types beg end old-len) ; maybe we don't need all of these. |
| 1046 | (c-invalidate-sws-region-after beg end) | 1052 | (c-invalidate-sws-region-after beg end) |
| 1047 | (c-invalidate-state-cache beg) | 1053 | (c-invalidate-state-cache beg) |