changeset 108423:1ee7f5caa71f

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 26 Feb 2010 14:26:02 +0000
parents 9976fba4d65d (current diff) 149e318a8b2d (diff)
children a8944be1e493
files
diffstat 23 files changed, 183 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/doc/lispintro/emacs-lisp-intro.texi	Wed Feb 24 13:25:54 2010 +0000
+++ b/doc/lispintro/emacs-lisp-intro.texi	Fri Feb 26 14:26:02 2010 +0000
@@ -4764,7 +4764,7 @@
 @code{M-x visit-tags-table} command and specify a pathname such as
 @file{/usr/local/share/emacs/22.1.1/lisp/TAGS}.  If the tags table
 has not already been created, you will have to create it yourself.  It
-will in a file such as @file{/usr/local/src/emacs/src/TAGS}.
+will be in a file such as @file{/usr/local/src/emacs/src/TAGS}.
 
 @need 1250
 To create a @file{TAGS} file in a specific directory, switch to that
--- a/etc/ChangeLog	Wed Feb 24 13:25:54 2010 +0000
+++ b/etc/ChangeLog	Fri Feb 26 14:26:02 2010 +0000
@@ -1,3 +1,8 @@
+2010-02-26  Glenn Morris  <rgm@gnu.org>
+
+	* tutorials/TUTORIAL.es, tutorials/TUTORIAL.pt_BR:
+	Fix some keybinding typos.
+
 2010-02-14  Chong Yidong  <cyd@stupidchicken.com>
 
 	* etc/images/custom/down-pushed.xpm, etc/images/custom/down.xpm:
--- a/etc/tutorials/TUTORIAL.es	Wed Feb 24 13:25:54 2010 +0000
+++ b/etc/tutorials/TUTORIAL.es	Fri Feb 26 14:26:02 2010 +0000
@@ -152,7 +152,7 @@
 incluyendo los comandos de movimiento por palabra y oración:
 
 	C-f 	Avanzar un carácter
-	C-d 	Retroceder un carácter
+	C-b 	Retroceder un carácter
 
 	M-f 	Avanzar una palabra
 	M-b 	Retroceder una palabra
--- a/etc/tutorials/TUTORIAL.pt_BR	Wed Feb 24 13:25:54 2010 +0000
+++ b/etc/tutorials/TUTORIAL.pt_BR	Fri Feb 26 14:26:02 2010 +0000
@@ -356,7 +356,7 @@
 também. Aqui vai um sumário dos comandos de deleção:
 
         <Delete>     remove o caractere imediatamente antes do cursor
-        M-d          remove o próximo caractere apos o cursor
+        C-d          remove o próximo caractere apos o cursor
 
         M-<Delete>   Mata a palavra imediatamente antes do cursor
         M-d          Mata a próxima palavra depois do cursor
--- a/lisp/ChangeLog	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/ChangeLog	Fri Feb 26 14:26:02 2010 +0000
@@ -1,3 +1,41 @@
+2010-02-26  Kenichi Handa  <handa@m17n.org>
+
+	* language/burmese.el: Fix entries in composition-function-table.
+	(myanmar-composable-pattern): New variable.
+
+	* international/fontset.el (setup-default-fontset): Add an entry
+	for myanmar.
+
+	* international/characters.el (script-list): Add Myanmar
+	Extended-A.
+
+2010-02-26  Glenn Morris  <rgm@gnu.org>
+
+	* custom.el (custom-initialize-delay): Doc fix.
+
+	* 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
+	check safe-local-variable-p (Bug#5636).
+
+2010-02-24  Eduard Wiebe  <usenet@pusto.de>
+
+	* javascript.el (wisent-javascript-jv-expand-tag): Avoid c(ad)ddr
+	and use c(ad)r of cddr (Bug#5640).
+
 2010-02-22  Michael Albinus  <michael.albinus@gmx.de>
 
 	* net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect
--- a/lisp/cedet/semantic/wisent/javascript.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/cedet/semantic/wisent/javascript.el	Fri Feb 26 14:26:02 2010 +0000
@@ -48,8 +48,8 @@
               elts  (cdr elts)
               clone (semantic-tag-clone tag (car elt))
 	      value (car (cdr elt))
-              start (if elts  (caddr elt) (semantic-tag-start tag))
-              end   (if xpand (cdddr elt) (semantic-tag-end   tag))
+	      start (if elts  (car (cddr elt)) (semantic-tag-start tag))
+	      end   (if xpand (cdr (cddr elt)) (semantic-tag-end   tag))
               xpand (cons clone xpand))
 	;; Set the definition of the cloned tag
 	(semantic-tag-put-attribute clone :default-value value)
--- a/lisp/custom.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/custom.el	Fri Feb 26 14:26:02 2010 +0000
@@ -113,10 +113,17 @@
 
 (defun custom-initialize-delay (symbol value)
   "Delay initialization of SYMBOL to the next Emacs start.
-This is used in files that are preloaded, so that the initialization is
-done in the run-time context rather than the build-time context.
-This also has the side-effect that the (delayed) initialization is performed
-with the :setter."
+This is used in files that are preloaded (or for autoloaded
+variables), so that the initialization is done in the run-time
+context rather than the build-time context.  This also has the
+side-effect that the (delayed) initialization is performed with
+the :set function.
+
+For variables in preloaded files, you can simply use this
+function for the :initialize property.  For autoloaded variables,
+you will also need to add an autoload stanza calling this
+function, and another one setting the standard-value property.
+See `send-mail-function' in sendmail.el for an example."
   ;; Until the var is actually initialized, it is kept unbound.
   ;; This seemed to be at least as good as setting it to an arbitrary
   ;; value like nil (evaluating `value' is not an option because it
--- a/lisp/files.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/files.el	Fri Feb 26 14:26:02 2010 +0000
@@ -2981,6 +2981,7 @@
 		 (push elt all-vars)
 		 (or (eq enable-local-eval t)
 		     (hack-one-local-variable-eval-safep (eval (quote val)))
+		     (safe-local-variable-p var val)
 		     (push elt unsafe-vars))))
 	      ;; Ignore duplicates (except `mode') in the present list.
 	      ((and (assq var all-vars) (not (eq var 'mode))) nil)
--- a/lisp/gnus/ChangeLog	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/gnus/ChangeLog	Fri Feb 26 14:26:02 2010 +0000
@@ -1,3 +1,13 @@
+2010-02-26  Glenn Morris  <rgm@gnu.org>
+
+	* message.el (message-send-mail-function): Change the default, so that
+	it inherits from a customized send-mail-function.  (Bug#5643)
+
+2010-02-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* gnus-art.el (gnus-treat-display-x-face): Don't burp if
+	shell-command-to-string signals an error (bug#5299).
+
 2010-02-24  Glenn Morris  <rgm@gnu.org>
 
 	* message.el (message-smtpmail-send-it)
--- a/lisp/gnus/gnus-art.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/gnus/gnus-art.el	Fri Feb 26 14:26:02 2010 +0000
@@ -1422,8 +1422,12 @@
        (gnus-image-type-available-p 'xbm)
        (if (featurep 'xemacs)
 	   (featurep 'xface)
-	 (and (string-match "^0x" (shell-command-to-string "uncompface"))
-	      (executable-find "icontopbm")))
+	 (condition-case nil
+             (and (string-match "^0x" (shell-command-to-string "uncompface"))
+                  (executable-find "icontopbm"))
+           ;; shell-command-to-string may signal an error, e.g. if
+           ;; shell-file-name is not found.
+           (error nil)))
        'head)
   "Display X-Face headers.
 Valid values are nil and `head'.
--- a/lisp/gnus/message.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/gnus/message.el	Fri Feb 26 14:26:02 2010 +0000
@@ -675,7 +675,12 @@
 	   (error "Don't know how to send mail.  Please customize `message-send-mail-function'")))))
 
 ;; Useful to set in site-init.el
-(defcustom message-send-mail-function (message-send-mail-function)
+(defcustom message-send-mail-function
+  (cond ((eq send-mail-function 'smtpmail-send-it) 'message-smtpmail-send-it)
+	((eq send-mail-function 'feedmail-send-it) 'feedmail-send-it)
+	((eq send-mail-function 'mailclient-send-it)
+	 'message-send-mail-with-mailclient)
+	(t (message-send-mail-function)))
   "Function to call to send the current buffer as mail.
 The headers should be delimited by a line whose contents match the
 variable `mail-header-separator'.
@@ -698,7 +703,7 @@
 			       :tag "Use Mailclient package")
  		(function :tag "Other"))
   :group 'message-sending
-  :version "23.1" ;; No Gnus
+  :version "23.2"
   :initialize 'custom-initialize-default
   :link '(custom-manual "(message)Mail Variables")
   :group 'message-mail)
--- a/lisp/international/characters.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/international/characters.el	Fri Feb 26 14:26:02 2010 +0000
@@ -1124,7 +1124,7 @@
 	 (#x0E00 #x0E5F thai)
 	 (#x0E80 #x0EDF lao)
 	 (#x0F00 #x0FFF tibetan)
-	 (#x1000 #x105F myanmar)
+	 (#x1000 #x109F myanmar)
 	 (#x10A0 #x10FF georgian)
 	 (#x1100 #x11FF hangul)
 	 (#x1200 #x139F ethiopic)
@@ -1151,6 +1151,7 @@
 	 (#x3400 #x9FAF han)
 	 (#xA000 #xA4CF yi)
 	 (#xAA00 #xAA5F cham)
+	 (#xAA60 #xAA7B myanmar)
 	 (#xAA80 #xAADF tai-viet)
 	 (#xAC00 #xD7AF hangul)
 	 (#xF900 #xFAFF han)
--- a/lisp/international/fontset.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/international/fontset.el	Fri Feb 26 14:26:02 2010 +0000
@@ -415,6 +415,9 @@
      (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn))))
      (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn))))
 
+     (myanmar ,(font-spec :registry "iso10646-1" :otf '(mymr))
+	      ,(font-spec :registry "iso10646-1" :script 'myanmar))
+
      (lao ,(font-spec :registry "iso10646-1" :otf '(lao\  nil nil (mark)))
 	  ,(font-spec :registry "iso10646-1" :script 'lao)
 	  (nil . "MuleLao-1"))
@@ -548,7 +551,6 @@
 		    armenian
 		    syriac
 		    thaana
-		    myanmar
 		    georgian
 		    cherokee
 		    canadian-aboriginal
--- a/lisp/language/burmese.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/language/burmese.el	Fri Feb 26 14:26:02 2010 +0000
@@ -36,7 +36,25 @@
 	     (sample-text . "Burmese (မ္ရန္‌မာ)	မင္â€á€‚လာပာ")
 	     (documentation . t)))
 
-(set-char-table-range composition-function-table '(#x1000 . #x107F)
-		      '(["[\x1000-\x107F\x200C\x200D]+" 0 font-shape-gstring]))
+(defvar myanmar-composable-pattern
+  (let ((table
+	 '(("K" . "[\u1004\u105A]\u103A\u1039") ; KINZI sequence
+	   ("C" . "[\u1000-\u102A\u103F\u1041-\u1049\u104E\u105A-\u105D\u1061\u1065-\u1066\u106E\u1071\u1075\u1081\u108E\uAA60-\uAA6F\uAA71-\uAA76]") ; consonant and vowel letter
+	   ("V" . "\u1039")					   ; VIRAMA
+	   ("A" . "\u103A")					   ; ASAT
+	   ("S" . "[\u1000-\u1019\u101C\u101E\u1020\u1021\u105A]") ; subscript
+	   ("M" . "[\u103B-\u103E\105E-\1060]") ; medial
+	   ("v" . "[\u102B-\u103A\u103C-\u103E\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A\u109C\uAA70]"))) ; vowel sign, etc.
+	(regexp "\\(K\\)?C\\(VS\\)?\\(VS\\)?A?M*v*"))
+    (let ((case-fold-search nil))
+      (dolist (elt table)
+	(setq regexp (replace-regexp-in-string (car elt) (cdr elt)
+					       regexp t t))))
+    regexp))
+
+(let ((elt (list (vector myanmar-composable-pattern 0 'font-shape-gstring)
+		 (vector "." 0 'font-shape-gstring))))
+  (set-char-table-range composition-function-table '(#x1000 . #x107F) elt)
+  (set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt))
 
 ;; arch-tag: 8ba5f4cd-ef89-4008-b784-397edd0cb32e
--- a/lisp/mail/sendmail.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/mail/sendmail.el	Fri Feb 26 14:26:02 2010 +0000
@@ -170,6 +170,8 @@
   :initialize 'custom-initialize-delay
   :group 'sendmail)
 
+;;;###autoload(custom-initialize-delay 'send-mail-function nil)
+
 ;;;###autoload
 (defcustom mail-header-separator (purecopy "--text follows this line--")
   "Line used to separate headers from text in messages being composed."
--- a/lisp/progmodes/cc-engine.el	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/progmodes/cc-engine.el	Fri Feb 26 14:26: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	Wed Feb 24 13:25:54 2010 +0000
+++ b/lisp/progmodes/cc-mode.el	Fri Feb 26 14:26: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	Wed Feb 24 13:25:54 2010 +0000
+++ b/src/ChangeLog	Fri Feb 26 14:26:02 2010 +0000
@@ -1,3 +1,29 @@
+2010-02-26  Kenichi Handa  <handa@m17n.org>
+
+	* ftfont.c (ftfont_get_open_type_spec): Fix parsing of otf_spec.
+
+	* 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).
+
+2010-02-24  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xterm.c (XTflash): Move declarations before statements.
+
+	* gtkutil.c (xg_get_gdk_display): Remove (unused).
+	(xg_get_pixbuf_from_pix_and_mask, xg_create_frame_widgets)
+	(xg_toggle_notify_cb, xg_set_toolkit_scroll_bar_thumb)
+	(xg_create_tool_bar): Remove unused variables.
+	(x_wm_set_size_hint): Move declarations before statements.
+	(xg_create_frame_widgets): Remove variable grav,
+
 2010-02-21  Chong Yidong  <cyd@stupidchicken.com>
 
 	* m/arm.h: Define the LIB_GCC flag to be -lgcc_s (Bug#5518).
--- a/src/ftfont.c	Wed Feb 24 13:25:54 2010 +0000
+++ b/src/ftfont.c	Fri Feb 26 14:26:02 2010 +0000
@@ -663,19 +663,19 @@
   else
     spec->script_tag = 0x44464C54; 	/* "DFLT" */
   otf_spec = XCDR (otf_spec);
-  val = XCAR (otf_spec);
-  if (! NILP (val))
-    OTF_SYM_TAG (val, spec->langsys_tag);
-  else
-    spec->langsys_tag = 0;
+  spec->langsys_tag = 0;
+  if (! NILP (otf_spec))
+    {
+      val = XCAR (otf_spec);
+      if (! NILP (val))
+	OTF_SYM_TAG (val, spec->langsys_tag);
+      otf_spec = XCDR (otf_spec);
+    }
   spec->nfeatures[0] = spec->nfeatures[1] = 0;
-  for (i = 0; i < 2; i++)
+  for (i = 0; i < 2 && ! NILP (otf_spec); i++, otf_spec = XCDR (otf_spec))
     {
       Lisp_Object len;
 
-      otf_spec = XCDR (otf_spec);
-      if (NILP (otf_spec))
-	break;
       val = XCAR (otf_spec);
       if (NILP (val))
 	continue;
--- a/src/gtkutil.c	Wed Feb 24 13:25:54 2010 +0000
+++ b/src/gtkutil.c	Fri Feb 26 14:26:02 2010 +0000
@@ -58,15 +58,6 @@
 
 static GdkDisplay *gdpy_def;
 
-/* Return the GdkDisplay that corresponds to the X display DPY.  */
-
-static GdkDisplay *
-xg_get_gdk_display (dpy)
-     Display *dpy;
-{
-  return gdk_x11_lookup_xdisplay (dpy);
-}
-
 /* When the GTK widget W is to be created on a display for F that
    is not the default display, set the display for W.
    W can be a GtkMenu or a GtkWindow widget.  */
@@ -252,10 +243,8 @@
      GdkPixmap *gmask;
      GdkColormap *cmap;
 {
-  int x, y, width, height, rowstride, mask_rowstride;
+  int width, height;
   GdkPixbuf *icon_buf, *tmp_buf;
-  guchar *pixels;
-  guchar *mask_pixels;
 
   gdk_drawable_get_size (gpix, &width, &height);
   tmp_buf = gdk_pixbuf_get_from_drawable (NULL, gpix, cmap,
@@ -776,7 +765,6 @@
   GtkWidget *wfixed;
   GdkColor bg;
   GtkRcStyle *style;
-  int i;
   char *title = 0;
 
   BLOCK_INPUT;
@@ -844,8 +832,8 @@
      and specify it.
      GTK will itself handle calculating the real position this way.  */
   xg_set_geometry (f);
-  int grav = gtk_window_get_gravity (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
-  f->win_gravity = grav;
+  f->win_gravity
+    = gtk_window_get_gravity (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
 
   gtk_widget_add_events (wfixed,
                          GDK_POINTER_MOTION_MASK
@@ -901,12 +889,6 @@
      long flags;
      int user_position;
 {
-  /* Don't set size hints during initialization; that apparently leads
-     to a race condition.  See the thread at
-     http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html  */
-  if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f))
-    return;
-
   /* Must use GTK routines here, otherwise GTK resets the size hints
      to its own defaults.  */
   GdkGeometry size_hints;
@@ -915,6 +897,12 @@
   int min_rows = 0, min_cols = 0;
   int win_gravity = f->win_gravity;
 
+  /* Don't set size hints during initialization; that apparently leads
+     to a race condition.  See the thread at
+     http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html  */
+  if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f))
+    return;
+
   if (flags)
     {
       memset (&size_hints, 0, sizeof (size_hints));
@@ -1391,7 +1379,6 @@
 
   if (strcmp (arg1->name, "show-hidden") == 0)
     {
-      GtkFileChooser *dialog = GTK_FILE_CHOOSER (gobject);
       GtkWidget *wtoggle = GTK_WIDGET (user_data);
       gboolean visible, toggle_on;
 
@@ -3347,8 +3334,6 @@
 
       if (changed || (int) gtk_range_get_value (GTK_RANGE (wscroll)) != value)
       {
-        GtkWidget *wfixed = f->output_data.x->edit_widget;
-
         BLOCK_INPUT;
 
         /* gtk_range_set_value invokes the callback.  Set
@@ -3801,7 +3786,6 @@
      FRAME_PTR f;
 {
   struct x_output *x = f->output_data.x;
-  GtkRequisition req;
 
   x->toolbar_widget = gtk_toolbar_new ();
   x->toolbar_detached = 0;
--- a/src/nsfont.m	Wed Feb 24 13:25:54 2010 +0000
+++ b/src/nsfont.m	Fri Feb 26 14:26:02 2010 +0000
@@ -50,7 +50,7 @@
 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 @@
 
     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);
--- a/src/xdisp.c	Wed Feb 24 13:25:54 2010 +0000
+++ b/src/xdisp.c	Fri Feb 26 14:26: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 = 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);
 }
 
--- a/src/xterm.c	Wed Feb 24 13:25:54 2010 +0000
+++ b/src/xterm.c	Fri Feb 26 14:26:02 2010 +0000
@@ -3019,13 +3019,14 @@
     /* Use Gdk routines to draw.  This way, we won't draw over scroll bars
        when the scroll bars and the edit widget share the same X window.  */
     GdkGCValues vals;
+    GdkGC *gc;
     vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f)
                              ^ FRAME_BACKGROUND_PIXEL (f));
     vals.function = GDK_XOR;
-    GdkGC *gc = gdk_gc_new_with_values (FRAME_GTK_WIDGET (f)->window,
-                                        &vals,
-                                        GDK_GC_FUNCTION
-                                        | GDK_GC_FOREGROUND);
+    gc = gdk_gc_new_with_values (FRAME_GTK_WIDGET (f)->window,
+                                 &vals,
+                                 GDK_GC_FUNCTION
+                                 | GDK_GC_FOREGROUND);
 #define XFillRectangle(d, win, gc, x, y, w, h) \
     gdk_draw_rectangle (FRAME_GTK_WIDGET (f)->window, \
                         gc, TRUE, x, y, w, h)