]> code.delx.au - gnu-emacs/commitdiff
Merge from trunk.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Aug 2011 14:28:36 +0000 (07:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Aug 2011 14:28:36 +0000 (07:28 -0700)
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/minibuffer.el
src/ChangeLog
src/xdisp.c
src/xfaces.c

index 230bd8a6508b01abcd8b3ccc95b07000a2a80cbf..64ac50fe8f058201c8f3bf7f0f170dac777ff960 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-19  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-insert-mime-button, gnus-mime-display-alternative):
+       Make button keymap non-sticky after buttons.
+
 2011-08-18  David Engster  <dengste@eml.cc>
 
        * nnmairix.el (nnmairix-request-set-mark)
index 28c6aca367c41afe9eebfeaa76699b1a4194ebbf..c6e0180dadc3ede5548741a177d87ac8b112461e 100644 (file)
@@ -5700,7 +5700,8 @@ all parts."
              gnus-callback gnus-mm-display-part
              gnus-part ,gnus-tmp-id
              article-type annotation
-             gnus-data ,handle))
+             gnus-data ,handle
+             rear-nonsticky t))
     (setq e (if (bolp)
                ;; Exclude a newline.
                (1- (point))
@@ -6013,7 +6014,8 @@ If displaying \"text/html\" is discouraged \(see
             ,gnus-mouse-face-prop ,gnus-article-mouse-face
             face ,gnus-article-button-face
             gnus-part ,id
-            article-type multipart))
+            article-type multipart
+            rear-nonsticky t))
          (widget-convert-button 'link from (point)
                                 :action 'gnus-widget-press-button
                                 :button-keymap gnus-widget-button-keymap)
@@ -6037,7 +6039,8 @@ If displaying \"text/html\" is discouraged \(see
               ,gnus-mouse-face-prop ,gnus-article-mouse-face
               face ,gnus-article-button-face
               gnus-part ,id
-              gnus-data ,handle))
+              gnus-data ,handle
+              rear-nonsticky t))
            (widget-convert-button 'link from (point)
                                   :action 'gnus-widget-press-button
                                   :button-keymap gnus-widget-button-keymap)
index 313298de97eaf437ce1e4725f2ea6ecfc638b3ff..b82147b97f1ae6d12274165946f9de742854e767 100644 (file)
@@ -1119,13 +1119,27 @@ It also eliminates runs of equal strings."
                                       `(display (space :align-to ,column)))
                  nil))))
             (if (not (consp str))
-                (put-text-property (point) (progn (insert str) (point))
+                (put-text-property (point)
+                                  (progn
+                                    (insert (bidi-string-mark-left-to-right
+                                             str))
+                                    (point))
                                    'mouse-face 'highlight)
-              (put-text-property (point) (progn (insert (car str)) (point))
+              (put-text-property (point)
+                                (progn
+                                  (insert
+                                   (bidi-string-mark-left-to-right
+                                    (car str)))
+                                  (point))
                                  'mouse-face 'highlight)
-              (add-text-properties (point) (progn (insert (cadr str)) (point))
+              (add-text-properties (point)
+                                  (progn
+                                    (insert
+                                     (bidi-string-mark-left-to-right
+                                      (cadr str)))
+                                    (point))
                                    '(mouse-face nil
-                                     face completions-annotations)))
+                                               face completions-annotations)))
            (cond
             ((eq completions-format 'vertical)
              ;; Vertical format
index 1db99549c60a1a83f1b3d598788bba711593f6f3..922a8a33a9c7d14899552666dcedc6b3bf0f28ac 100644 (file)
        (gs_load): Use printmax_t to print the widest integers possible.
        Check for integer overflow when computing image height and width.
 
+2011-08-19  Eli Zaretskii  <eliz@gnu.org>
+
+       * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
+       face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
+       from an Org mode buffer to a Speedbar frame.
+
+       * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
+       a composition, take its buffer position from IT->cmp_it.charpos.
+       Fixes cursor positioning at the beginning of a line that begins
+       with a composed character.
+
 2011-08-18  Eli Zaretskii  <eliz@gnu.org>
 
        * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
index ea70c9167620c2089cf4148af9585a51fe278543..86ad523dfdda9a5ce20d4fba0b30ec6e5957b127 100644 (file)
@@ -18384,15 +18384,22 @@ display_line (struct it *it)
 #define RECORD_MAX_MIN_POS(IT)                                 \
   do                                                           \
     {                                                          \
-      if (IT_CHARPOS (*(IT)) < min_pos)                                \
+      int composition_p = (IT)->what == IT_COMPOSITION;                \
+      EMACS_INT current_pos =                                  \
+       composition_p ? (IT)->cmp_it.charpos                    \
+                     : IT_CHARPOS (*(IT));                     \
+      EMACS_INT current_bpos =                                 \
+       composition_p ? CHAR_TO_BYTE (current_pos)              \
+                     : IT_BYTEPOS (*(IT));                     \
+      if (current_pos < min_pos)                               \
        {                                                       \
-         min_pos = IT_CHARPOS (*(IT));                         \
-         min_bpos = IT_BYTEPOS (*(IT));                        \
+         min_pos = current_pos;                                \
+         min_bpos = current_bpos;                              \
        }                                                       \
-      if (IT_CHARPOS (*(IT)) > max_pos)                                \
+      if (current_pos > max_pos)                               \
        {                                                       \
-         max_pos = IT_CHARPOS (*(IT));                         \
-         max_bpos = IT_BYTEPOS (*(IT));                        \
+         max_pos = current_pos;                                \
+         max_bpos = current_bpos;                              \
        }                                                       \
     }                                                          \
   while (0)
index fee4a6f9d6ad081216411175ade59f344531a5c4..431ca07b8dfe3e428d88181326f79dafba113bac 100644 (file)
@@ -5999,9 +5999,18 @@ face_at_buffer_position (struct window *w, EMACS_INT pos,
 
   *endptr = endpos;
 
-  default_face = FACE_FROM_ID (f, base_face_id >= 0 ? base_face_id
-                              : NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID
-                              : lookup_basic_face (f, DEFAULT_FACE_ID));
+  {
+    int face_id;
+
+    if (base_face_id >= 0)
+      face_id = base_face_id;
+    else if (NILP (Vface_remapping_alist))
+      face_id = DEFAULT_FACE_ID;
+    else
+      face_id = lookup_basic_face (f, DEFAULT_FACE_ID);
+
+    default_face = FACE_FROM_ID (f, face_id);
+  }
 
   /* Optimize common cases where we can use the default face.  */
   if (noverlays == 0