Package: emacs;
Reported by: Ergus <spacibba <at> aol.com>
Date: Sat, 2 Nov 2019 21:43:01 UTC
Severity: normal
Found in version 27.0.50
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: Ergus <spacibba <at> aol.com> To: martin rudalics <rudalics <at> gmx.at> Cc: 38038 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, juri <at> linkov.net Subject: bug#38038: 27.0.50; Emacs freezes opening tabs. Date: Tue, 12 Nov 2019 01:39:55 +0100
Hi Martin: Did you pushed this change already? On Sun, Nov 10, 2019 at 10:45:33AM +0100, martin rudalics wrote: >> It doesn't really matter, AFAIK, but BUFFERP is clearer, I think. > >I can offer the attached patch. > >martin >--- a/src/nsterm.m >+++ b/src/nsterm.m >@@ -3435,19 +3435,22 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. > unsigned long descent = s->y + s->height - s->ybase; > unsigned long minimum_offset; > BOOL underline_at_descent_line, use_underline_position_properties; >- Lisp_Object val = buffer_local_value (Qunderline_minimum_offset, >- s->w->contents); >- if (FIXNUMP (val)) >- minimum_offset = XFIXNAT (val); >- else >- minimum_offset = 1; >- val = buffer_local_value (Qx_underline_at_descent_line, >- s->w->contents); >- underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); >- val = buffer_local_value (Qx_use_underline_position_properties, >- s->w->contents); >- use_underline_position_properties = >- !(NILP (val) || EQ (val, Qunbound)); >+ Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qunderline_minimum_offset, s->w)); >+ >+ if (FIXNUMP (val)) >+ minimum_offset = XFIXNAT (val); >+ else >+ minimum_offset = 1; >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_underline_at_descent_line, s->w)); >+ underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_use_underline_position_properties, s->w)); >+ use_underline_position_properties >+ = !(NILP (val) || EQ (val, Qunbound)); > > /* Use underline thickness of font, defaulting to 1. */ > thickness = (font && font->underline_thickness > 0) >diff --git a/src/w32term.c b/src/w32term.c >index 9da0845836..d0537c67e9 100644 >--- a/src/w32term.c >+++ b/src/w32term.c >@@ -2512,20 +2512,21 @@ w32_draw_glyph_string (struct glyph_string *s) > unsigned long minimum_offset; > BOOL underline_at_descent_line; > BOOL use_underline_position_properties; >- Lisp_Object val >- = buffer_local_value (Qunderline_minimum_offset, >- s->w->contents); >+ Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qunderline_minimum_offset, s->w)); >+ > if (FIXNUMP (val)) > minimum_offset = max (0, XFIXNUM (val)); > else > minimum_offset = 1; >- val = buffer_local_value (Qx_underline_at_descent_line, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_underline_at_descent_line, s->w)); > underline_at_descent_line > = !(NILP (val) || EQ (val, Qunbound)); >- val >- = buffer_local_value (Qx_use_underline_position_properties, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_use_underline_position_properties, s->w)); > use_underline_position_properties > = !(NILP (val) || EQ (val, Qunbound)); > >diff --git a/src/window.h b/src/window.h >index 71946a5695..8ea1b9dcf7 100644 >--- a/src/window.h >+++ b/src/window.h >@@ -608,6 +608,13 @@ wset_next_buffers (struct window *w, Lisp_Object val) > ? (W)->contents \ > : Qnil) > >+/* Local value of variable V in window W's buffer. Nil if W has no >+ buffer. */ >+#define WINDOW_BUFFER_LOCAL_VALUE(V, W) \ >+ (BUFFERP ((W)->contents) \ >+ ? buffer_local_value(V, (W)->contents) \ >+ : Qnil) >+ > /* Return the canonical column width of the frame of window W. */ > #define WINDOW_FRAME_COLUMN_WIDTH(W) \ > (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W)))) >@@ -1175,6 +1182,8 @@ extern Lisp_Object Vwindow_list; > > extern Lisp_Object window_list (void); > extern Lisp_Object window_parameter (struct window *, Lisp_Object parameter); >+extern Lisp_Object window_buffer_local_value (struct window *, >+ Lisp_Object variable); > extern struct window *decode_live_window (Lisp_Object); > extern struct window *decode_any_window (Lisp_Object); > extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); >diff --git a/src/xterm.c b/src/xterm.c >index 44fbd27b11..f7005804f0 100644 >--- a/src/xterm.c >+++ b/src/xterm.c >@@ -3847,20 +3847,21 @@ x_draw_glyph_string (struct glyph_string *s) > unsigned long minimum_offset; > bool underline_at_descent_line; > bool use_underline_position_properties; >- Lisp_Object val >- = buffer_local_value (Qunderline_minimum_offset, >- s->w->contents); >+ Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qunderline_minimum_offset, s->w)); >+ > if (FIXNUMP (val)) > minimum_offset = max (0, XFIXNUM (val)); > else > minimum_offset = 1; >- val = buffer_local_value (Qx_underline_at_descent_line, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_underline_at_descent_line, s->w)); > underline_at_descent_line > = !(NILP (val) || EQ (val, Qunbound)); >- val >- = buffer_local_value (Qx_use_underline_position_properties, >- s->w->contents); >+ >+ val = (WINDOW_BUFFER_LOCAL_VALUE >+ (Qx_use_underline_position_properties, s->w)); > use_underline_position_properties > = !(NILP (val) || EQ (val, Qunbound)); > >
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.