emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 7c7ee1d 4/4: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master 7c7ee1d 4/4: Merge from origin/emacs-26
Date: Mon, 29 Apr 2019 12:13:06 -0400 (EDT)

branch: master
commit 7c7ee1dd52239ecc3665b7542bd5e0ebc9b74795
Merge: 3a903f0 c26d452
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    c26d452 (origin/emacs-26) * src/macfont.m (macfont_shape): Use conven...
    140e7f8 Recommend using font-lock-face over face (Bug#35044)
    7cb5364 Check if mouse_face_overlay was deleted (Bug#35273)
    
    # Conflicts:
    #   src/macfont.m
---
 doc/lispref/modes.texi | 7 ++++++-
 src/macfont.m          | 2 +-
 src/xdisp.c            | 4 +++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 4315b70..97e9be9 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -3238,7 +3238,12 @@ is disabled, @code{font-lock-face} has no effect on the 
display.
   It is ok for a mode to use @code{font-lock-face} for some text and
 also use the normal Font Lock machinery.  But if the mode does not use
 the normal Font Lock machinery, it should not set the variable
address@hidden
address@hidden  In this case the @code{face} property will
+not be overriden, so using the @code{face} property could work too.
+However, using @code{font-lock-face} is generally preferable as it
+allows the user to control the fontification by toggling
address@hidden, and lets the code work regardless of whether
+the mode uses Font Lock machinery or not.
 
 @node Faces for Font Lock
 @subsection Faces for Font Lock
diff --git a/src/macfont.m b/src/macfont.m
index d8e8620..0ade77e 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2991,7 +2991,7 @@ macfont_shape (Lisp_Object lgstring)
 
       if (NILP (lglyph))
         {
-          lglyph = make_nil_vector (LGLYPH_SIZE);
+          lglyph = LGLYPH_NEW ();
           LGSTRING_SET_GLYPH (lgstring, i, lglyph);
         }
 
diff --git a/src/xdisp.c b/src/xdisp.c
index d52d133..95ff851 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -31641,7 +31641,9 @@ note_mouse_highlight (struct frame *f, int x, int y)
             is currently hidden to avoid Bug#30519.  */
          || (!hlinfo->mouse_face_hidden
              && OVERLAYP (hlinfo->mouse_face_overlay)
-             && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
+             /* It's possible the overlay was deleted (Bug#35273).  */
+              && XMARKER (OVERLAY_START (hlinfo->mouse_face_overlay))->buffer
+              && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
        {
          /* Find the highest priority overlay with a mouse-face.  */
          Lisp_Object overlay = Qnil;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]