diff options
author | Kenichi Handa <handa@m17n.org> | 2010-02-26 10:22:23 +0900 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2010-02-26 10:22:23 +0900 |
commit | 06aac9016fc074f856a4b374572024a68784e630 (patch) | |
tree | 8f8af86b761b2fa897453ef91e57096008af9f7f | |
parent | 7379cfce157cbd68045970dafa92c6216ced84b3 (diff) | |
parent | cf2fdcfbd30470838239d8199da909a990cdeb3b (diff) | |
download | emacs-06aac9016fc074f856a4b374572024a68784e630.tar.gz |
from trunk
-rw-r--r-- | lisp/ChangeLog | 10 | ||||
-rw-r--r-- | lisp/progmodes/cc-engine.el | 8 | ||||
-rw-r--r-- | lisp/progmodes/cc-mode.el | 16 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/nsfont.m | 4 |
5 files changed, 32 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d0cdaf25a23..59bd441f0d8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 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." (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 @@ 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) '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 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." (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 @@ 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) diff --git a/src/ChangeLog b/src/ChangeLog index 8ad6941a806..36e056b786d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,11 @@ * xdisp.c (reseat_to_string): Fix previous change. +2010-02-26 David Reitter <david.reitter@gmail.com> + + * nsfont.m (nsfont_draw): ns_antialias_text should be a + Lisp_Object (Bug#4736). + 2010-02-25 Kenichi Handa <handa@m17n.org> * xdisp.c (reseat_to_string): Fix previous change (bug#5609). diff --git a/src/nsfont.m b/src/nsfont.m index 97d74a82f2b..59d5ee73db1 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -50,7 +50,7 @@ extern Lisp_Object Qnormal, Qbold, Qitalic, Qcondensed, Qexpanded; static Lisp_Object Vns_reg_to_script; static Lisp_Object Qapple, Qroman, Qmedium; extern Lisp_Object Qappend; -extern int ns_antialias_text; +extern Lisp_Object ns_antialias_text; extern float ns_antialias_threshold; extern int ns_tmp_flags; extern struct nsfont_info *ns_tmp_font; @@ -1231,7 +1231,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, CGContextSetFont (gcontext, font->cgfont); CGContextSetFontSize (gcontext, font->size); - if (ns_antialias_text == Qnil || font->size <= ns_antialias_threshold) + if (NILP (ns_antialias_text) || font->size <= ns_antialias_threshold) CGContextSetShouldAntialias (gcontext, 0); else CGContextSetShouldAntialias (gcontext, 1); |