Mercurial > emacs
changeset 107291:02da9c6dabe2
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 25 Feb 2010 21:56:02 +0000 |
parents | 832d30d6d067 (current diff) a83491958b95 (diff) |
children | 8d0e1b3eec66 |
files | |
diffstat | 5 files changed, 36 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Feb 25 02:25:29 2010 +0000 +++ b/lisp/ChangeLog Thu Feb 25 21:56:02 2010 +0000 @@ -1,3 +1,13 @@ +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
--- a/lisp/progmodes/cc-engine.el Thu Feb 25 02:25:29 2010 +0000 +++ b/lisp/progmodes/cc-engine.el Thu Feb 25 21:56:02 2010 +0000 @@ -4929,8 +4929,8 @@ (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)) 'syntax-table)) - (c-clear-char-property pos 'syntax-table)))) + (c-clear-char-property (1- (point)) 'category)) + (c-clear-char-property pos 'category)))) (defun c-clear->-pair-props (&optional pos) ;; POS (default point) is at a > character. If it is marked with @@ -4946,8 +4946,8 @@ (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) 'syntax-table)) - (c-clear-char-property pos 'syntax-table)))) + (c-clear-char-property (point) 'category)) + (c-clear-char-property pos 'category)))) (defun c-clear-<>-pair-props (&optional pos) ;; POS (default point) is at a < or > character. If it has an
--- a/lisp/progmodes/cc-mode.el Thu Feb 25 02:25:29 2010 +0000 +++ b/lisp/progmodes/cc-mode.el Thu Feb 25 21:56:02 2010 +0000 @@ -642,11 +642,9 @@ (widen) (save-excursion (if 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))) + (mapc (lambda (fn) + (funcall fn (point-min) (point-max))) + 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)))))) @@ -1042,6 +1040,14 @@ (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)
--- a/src/ChangeLog Thu Feb 25 02:25:29 2010 +0000 +++ b/src/ChangeLog Thu Feb 25 21:56:02 2010 +0000 @@ -1,3 +1,7 @@ +2010-02-25 Kenichi Handa <handa@m17n.org> + + * xdisp.c (reseat_to_string): Fix previous change (bug#5609). + 2010-02-24 Jan Djärv <jan.h.d@swipnet.se> * xterm.c (XTflash): Move declarations before statements.
--- a/src/xdisp.c Thu Feb 25 02:25:29 2010 +0000 +++ b/src/xdisp.c Thu Feb 25 21:56:02 2010 +0000 @@ -5610,8 +5610,13 @@ it->stop_charpos = charpos; if (s == NULL && it->multibyte_p) - composition_compute_stop_pos (&it->cmp_it, charpos, -1, it->end_charpos, - it->string); + { + EMACS_INT endpos = charpos + SCHARS (it->string); + if (endpos > it->end_charpos) + endpos = it->end_charpos; + composition_compute_stop_pos (&it->cmp_it, charpos, -1, endpos, + it->string); + } CHECK_IT (it); }