diff options
| author | Alan Mackenzie | 2010-04-12 14:59:56 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2010-04-12 14:59:56 +0000 |
| commit | e2387bdba28af0022a4d63d024a8f16546001612 (patch) | |
| tree | ebce3210b9d9f2c98ef50474f40dc4a0805c78ea | |
| parent | a1c7301e3195f11f5544288228d53e82f4caeda8 (diff) | |
| download | emacs-e2387bdba28af0022a4d63d024a8f16546001612.tar.gz emacs-e2387bdba28af0022a4d63d024a8f16546001612.zip | |
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/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 16 |
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 @@ | |||
| 358 | * mail/sendmail.el (send-mail-function): Autoload the call | 358 | * mail/sendmail.el (send-mail-function): Autoload the call |
| 359 | to custom-initialize-delay, not otherwise preserved in loaddefs.el. | 359 | to custom-initialize-delay, not otherwise preserved in loaddefs.el. |
| 360 | 360 | ||
| 361 | 2010-02-25 Alan Mackenzie <acm@muc.de> | ||
| 362 | |||
| 363 | * progmodes/cc-engine.el (c-clear-<-pair-props) | ||
| 364 | (c-clear->-pair-props): Correct to wipe category text props, not | ||
| 365 | syntax-table ones. | ||
| 366 | |||
| 367 | * progmodes/cc-mode.el (c-after-change): Remove any hard | ||
| 368 | syntax-table properties for <, > which, e.g., C-y has | ||
| 369 | inopportunely converted from category properties. | ||
| 370 | |||
| 371 | 2010-02-24 Chong Yidong <cyd@stupidchicken.com> | 361 | 2010-02-24 Chong Yidong <cyd@stupidchicken.com> |
| 372 | 362 | ||
| 373 | * files.el (hack-local-variables-filter): For eval forms, also | 363 | * 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." | |||
| 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)) 'category)) | 4932 | (c-clear-char-property (1- (point)) 'syntax-table)) |
| 4933 | (c-clear-char-property pos 'category)))) | 4933 | (c-clear-char-property pos 'syntax-table)))) |
| 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) 'category)) | 4949 | (c-clear-char-property (point) 'syntax-table)) |
| 4950 | (c-clear-char-property pos 'category)))) | 4950 | (c-clear-char-property pos 'syntax-table)))) |
| 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 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." | |||
| 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 | (mapc (lambda (fn) | 645 | (let ((beg (point-min)) |
| 646 | (funcall fn (point-min) (point-max))) | 646 | (end (point-max))) |
| 647 | c-get-state-before-change-functions)) | 647 | (mapc (lambda (fn) |
| 648 | (funcall fn beg end)) | ||
| 649 | c-get-state-before-change-functions))) | ||
| 648 | (if c-before-font-lock-function | 650 | (if c-before-font-lock-function |
| 649 | (funcall c-before-font-lock-function (point-min) (point-max) | 651 | (funcall c-before-font-lock-function (point-min) (point-max) |
| 650 | (- (point-max) (point-min)))))) | 652 | (- (point-max) (point-min)))))) |
| @@ -1040,14 +1042,6 @@ Note that the style variables are always made local to the buffer." | |||
| 1040 | (when (> beg end) | 1042 | (when (> beg end) |
| 1041 | (setq beg end))) | 1043 | (setq beg end))) |
| 1042 | 1044 | ||
| 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 | |||
| 1051 | (c-trim-found-types beg end old-len) ; maybe we don't need all of these. | 1045 | (c-trim-found-types beg end old-len) ; maybe we don't need all of these. |
| 1052 | (c-invalidate-sws-region-after beg end) | 1046 | (c-invalidate-sws-region-after beg end) |
| 1053 | (c-invalidate-state-cache beg) | 1047 | (c-invalidate-state-cache beg) |