From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#38038: 27.0.50; Emacs freezes opening tabs. Date: Tue, 12 Nov 2019 01:39:55 +0100 Message-ID: <20191112003955.mstm6ff7evvkjo3u@Ergus> References: <87pni9yl75.fsf@mail.linkov.net> <83h83fg50h.fsf@gnu.org> <8736ezmhj2.fsf@mail.linkov.net> <5455d765-4954-6bc0-1961-619f6e865f59@gmx.at> <20191108230837.7nlfzo44pu7c5x2o@Ergus> <257306d0-bf1a-2a5f-b98c-8e6ddcf44ea9@gmx.at> <83ftixa1xe.fsf@gnu.org> <83bltl9zai.fsf@gnu.org> <5f00e53b-0306-3548-5cd2-36c4c65e8740@gmx.at> Reply-To: Ergus Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="116809"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38038@debbugs.gnu.org, Eli Zaretskii , juri@linkov.net To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 12 01:41:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iUKFH-000UDT-7b for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Nov 2019 01:41:23 +0100 Original-Received: from localhost ([::1]:58286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUKFF-0007Z9-Ed for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 19:41:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54480) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUKEx-0007Yi-Kl for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 19:41:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUKEw-0005PF-D6 for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 19:41:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47336) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUKEw-0005PB-9g for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 19:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iUKEw-0003rg-6z for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 19:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Nov 2019 00:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38038 X-GNU-PR-Package: emacs Original-Received: via spool by 38038-submit@debbugs.gnu.org id=B38038.157351922414795 (code B ref 38038); Tue, 12 Nov 2019 00:41:02 +0000 Original-Received: (at 38038) by debbugs.gnu.org; 12 Nov 2019 00:40:24 +0000 Original-Received: from localhost ([127.0.0.1]:56156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUKEJ-0003qU-D4 for submit@debbugs.gnu.org; Mon, 11 Nov 2019 19:40:23 -0500 Original-Received: from sonic311-25.consmr.mail.ne1.yahoo.com ([66.163.188.206]:42592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUKEG-0003q7-Lx for 38038@debbugs.gnu.org; Mon, 11 Nov 2019 19:40:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1573519215; bh=uV3GZGtPuMkya5vil+cNZr3k2qF3AmSA2hz317ebgFs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=tdvrocZXLCqSKiHGXruECEkNcblwAu8sSpWCP/YbBl/SemaI8b1IqE6vWxewoOURaRv1Up13mrCH7yglNqUdJRtfwsTtW4kWmEDiBPMcbC1EWCSIUfFvj1bTs4ddO0H/2qWC5oPcgA+nhAXkH5nrAJT4A5x24SfWmB55DNESX14BLsWHTCygQXkcivNpBEnlM5yubuPvbr99OhsGz63MB/9wMZG6rrv6M3t8kixO5p5zDiVbCnGJtTp7lB5XmJ2YeS5Oa7h40ESoHYfA6Osm8fQaZRq0jYLrQfAUKdn7v6mrWvzuRR4lCvX2wcDld9Ewem+vJOpy1d43dvvpO5GobA== X-YMail-OSG: FnUo1TcVM1ll3neUVwxAQof8wJsx74rR2o1gaczcrgu0nCP3r1iKqpida8VSksT VC12vMmU0Kt28P1lW6QQXc3HVnoEj4Rjs9XjvUc5TduZI3N4j34lY7yrM4VBCV28RP1LbK3axJ5x U62N94zsH6jXw.XZHDDJbh3DNBHtxuEVL45V4LUopMi7BCKowZfb6h3Au3v6fk43IwP3bGtaf1.z Y.4qGqPZ1WCAuNcgfa6j4H8rC62VFSme5lHoqNVQfq0jOsbSlLaJUwh1_p67wLd1Y1uT2ZuUKAGL jon6x6CZhIzNuzbgMsrq2tQtLhyXVWBmcd24.6FMxT6.N0epCWfQ5jyOYZ9LYoWpf3XZgdEemaZv km0rXpSml9nwLeWRzf_tudL5CAS7yVfcUmW.hJg1cYk.2xCfW0HcmGSgOyykknO.m369gIb6w7C3 Pe13zH4iLCqSnljWJntImSH3Ti4jLaQFDd27o_Kid1LKAsSf5QKhUeSV8EvKTqU7AmpplFY97uYL bRixGlOgC.ZYtjZqc.FkST9LczVxLyNGZI0RWRnRQbkURR.qFdM_SikVZ7lM5frTvMR2UR_daPNI .iAkriVegHIUOmLMd2Cnkx_BZpN4P0boIYIKYo3kWEkao5xz_eAc8IeLhbOC6z44ZRP.QfVHQa0X rrbW2beX7HJ75CGTjgwL17KVwHCsYU8XGGwqboI_GRw4ATAYTw4mK8Pt1RxRrtoP_pw4NBod9ZfO NiNpToZgHY__71V.vXYV3jkpX1VfSdMqCP9i2eKfPGku0os0CsVMK9ocKLeZhFwKwjg3Msxw6lYX 6CmUo994Tc03qodhKlWj8pEdZlrUG4i.WhqYNuO6Rl Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Tue, 12 Nov 2019 00:40:15 +0000 Original-Received: by smtp421.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 854b40cc134f6602f133b6199e6d439e; Tue, 12 Nov 2019 00:40:12 +0000 (UTC) Content-Disposition: inline In-Reply-To: <5f00e53b-0306-3548-5cd2-36c4c65e8740@gmx.at> X-Mailer: WebService/1.1.14680 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_181) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171442 Archived-At: 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)); > >