GNU bug report logs -
#39865
28.0.50; Emacs crash
Previous Next
Reported by: Vinicius José Latorre <viniciusjl <at> gmail.com>
Date: Mon, 2 Mar 2020 01:55:02 UTC
Severity: normal
Tags: confirmed
Merged with 23386,
35803,
36835
Found in versions 25.0.95, 28.0.50, 24.1, 25.0.50, 24.5, 26.2, 27.0.50
Fixed in version 27.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39865 in the body.
You can then email your comments to 39865 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Mon, 02 Mar 2020 01:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vinicius José Latorre <viniciusjl <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 02 Mar 2020 01:55:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I've just updated Emacs sources in my local git clone and installed it in
my laptop.
The attached file has all detail about steps that I use and also the
backtrace.
I noticed that when Emacs is called via:
$ ~opt/emacs-repo/bin/emacs
Emacs crashes.
And when called via:
$ ~opt/emacs-repo/bin/emacs -Q
M-x load-file RET
~/.emacs RET
Emacs does not crash.
[Message part 2 (text/html, inline)]
[.ERROR-DDD (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Mon, 02 Mar 2020 08:12:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 39865 <at> debbugs.gnu.org (full text, mbox):
> From: Vinicius José Latorre <viniciusjl <at> gmail.com>
> Date: Sun, 1 Mar 2020 22:39:09 -0300
>
> I've just updated Emacs sources in my local git clone and installed it in my laptop.
Is this the master branch or the emacs-27 branch?
> I noticed that when Emacs is called via:
>
> $ ~opt/emacs-repo/bin/emacs
>
> Emacs crashes.
>
> And when called via:
>
> $ ~opt/emacs-repo/bin/emacs -Q
> M-x load-file RET
> ~/.emacs RET
>
> Emacs does not crash.
That would mean the trigger for the crash is in your .emacs file.
Would it be possible to find the smallest subset of your .emacs which
still causes the crash, and then post it?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Thu, 05 Mar 2020 01:05:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Is this the master branch or the emacs-27 branch?
Yes, the master branch (origin/master).
> Would it be possible to find the smallest subset of your .emacs which
> still causes the crash, and then post it?
I'll try it.
On Mon, Mar 2, 2020 at 5:11 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Vinicius José Latorre <viniciusjl <at> gmail.com>
> > Date: Sun, 1 Mar 2020 22:39:09 -0300
> >
> > I've just updated Emacs sources in my local git clone and installed it
> in my laptop.
>
> Is this the master branch or the emacs-27 branch?
>
> > I noticed that when Emacs is called via:
> >
> > $ ~opt/emacs-repo/bin/emacs
> >
> > Emacs crashes.
> >
> > And when called via:
> >
> > $ ~opt/emacs-repo/bin/emacs -Q
> > M-x load-file RET
> > ~/.emacs RET
> >
> > Emacs does not crash.
>
> That would mean the trigger for the crash is in your .emacs file.
> Would it be possible to find the smallest subset of your .emacs which
> still causes the crash, and then post it?
>
> Thanks.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Thu, 05 Mar 2020 22:22:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I found this line in my ~/.emacs that causes the crash:
(push '(font-backend xft x) default-frame-alist)
On Wed, Mar 4, 2020 at 10:03 PM Vinicius José Latorre <viniciusjl <at> gmail.com>
wrote:
> > Is this the master branch or the emacs-27 branch?
>
> Yes, the master branch (origin/master).
>
> > Would it be possible to find the smallest subset of your .emacs which
> > still causes the crash, and then post it?
>
> I'll try it.
>
>
>
>
> On Mon, Mar 2, 2020 at 5:11 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Vinicius José Latorre <viniciusjl <at> gmail.com>
>> > Date: Sun, 1 Mar 2020 22:39:09 -0300
>> >
>> > I've just updated Emacs sources in my local git clone and installed it
>> in my laptop.
>>
>> Is this the master branch or the emacs-27 branch?
>>
>> > I noticed that when Emacs is called via:
>> >
>> > $ ~opt/emacs-repo/bin/emacs
>> >
>> > Emacs crashes.
>> >
>> > And when called via:
>> >
>> > $ ~opt/emacs-repo/bin/emacs -Q
>> > M-x load-file RET
>> > ~/.emacs RET
>> >
>> > Emacs does not crash.
>>
>> That would mean the trigger for the crash is in your .emacs file.
>> Would it be possible to find the smallest subset of your .emacs which
>> still causes the crash, and then post it?
>>
>> Thanks.
>>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 06 Mar 2020 07:19:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 39865 <at> debbugs.gnu.org (full text, mbox):
> From: Vinicius José Latorre <viniciusjl <at> gmail.com>
> Date: Thu, 5 Mar 2020 19:21:22 -0300
> Cc: 39865 <at> debbugs.gnu.org
>
> I found this line in my ~/.emacs that causes the crash:
>
> (push '(font-backend xft x) default-frame-alist)
OK, then the crash is a known problem: you cannot change the font
backend once the session started, you can only do that in X resources.
Previously, XFT was your original backend, but now it's HarfBuzz.
Why are you doing this? What happens/doesn't work if you remove this
line?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 06 Mar 2020 17:22:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> OK, then the crash is a known problem: you cannot change the font
> backend once the session started, you can only do that in X resources.
> Previously, XFT was your original backend, but now it's HarfBuzz.
I think that emacs should be more robust about this and do not crash for
any bad value.
> Why are you doing this? What happens/doesn't work if you remove this
> line?
Well, I use emacs since 1992, I don't remember why I set this.
Removing this line all works like a charming.
On Fri, Mar 6, 2020 at 4:18 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Vinicius José Latorre <viniciusjl <at> gmail.com>
> > Date: Thu, 5 Mar 2020 19:21:22 -0300
> > Cc: 39865 <at> debbugs.gnu.org
> >
> > I found this line in my ~/.emacs that causes the crash:
> >
> > (push '(font-backend xft x) default-frame-alist)
>
> OK, then the crash is a known problem: you cannot change the font
> backend once the session started, you can only do that in X resources.
> Previously, XFT was your original backend, but now it's HarfBuzz.
>
> Why are you doing this? What happens/doesn't work if you remove this
> line?
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 06 Mar 2020 17:25:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
BTW, emacs 27 does not crash using that lisp line.
On Fri, Mar 6, 2020 at 2:20 PM Vinicius José Latorre <viniciusjl <at> gmail.com>
wrote:
> > OK, then the crash is a known problem: you cannot change the font
> > backend once the session started, you can only do that in X resources.
> > Previously, XFT was your original backend, but now it's HarfBuzz.
>
> I think that emacs should be more robust about this and do not crash for
> any bad value.
>
> > Why are you doing this? What happens/doesn't work if you remove this
> > line?
>
> Well, I use emacs since 1992, I don't remember why I set this.
>
> Removing this line all works like a charming.
>
>
>
> On Fri, Mar 6, 2020 at 4:18 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Vinicius José Latorre <viniciusjl <at> gmail.com>
>> > Date: Thu, 5 Mar 2020 19:21:22 -0300
>> > Cc: 39865 <at> debbugs.gnu.org
>> >
>> > I found this line in my ~/.emacs that causes the crash:
>> >
>> > (push '(font-backend xft x) default-frame-alist)
>>
>> OK, then the crash is a known problem: you cannot change the font
>> backend once the session started, you can only do that in X resources.
>> Previously, XFT was your original backend, but now it's HarfBuzz.
>>
>> Why are you doing this? What happens/doesn't work if you remove this
>> line?
>>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 06 Mar 2020 17:54:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 39865 <at> debbugs.gnu.org (full text, mbox):
> From: Vinicius José Latorre <viniciusjl <at> gmail.com>
> Date: Fri, 6 Mar 2020 14:20:42 -0300
> Cc: 39865 <at> debbugs.gnu.org
>
> > OK, then the crash is a known problem: you cannot change the font
> > backend once the session started, you can only do that in X resources.
> > Previously, XFT was your original backend, but now it's HarfBuzz.
>
> I think that emacs should be more robust about this and do not crash for any bad value.
I agree. It is not a bad value, we just couldn't yet find a way of
switching the font-backend.
> > Why are you doing this? What happens/doesn't work if you remove this
> > line?
>
> Well, I use emacs since 1992, I don't remember why I set this.
>
> Removing this line all works like a charming.
Great, thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 10 Mar 2020 14:30:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Fri, 06 Mar 2020 19:53:32 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>> From: Vinicius José Latorre <viniciusjl <at> gmail.com>
>> Date: Fri, 6 Mar 2020 14:20:42 -0300
>> Cc: 39865 <at> debbugs.gnu.org
>>
>> > OK, then the crash is a known problem: you cannot change the font
>> > backend once the session started, you can only do that in X resources.
>> > Previously, XFT was your original backend, but now it's HarfBuzz.
>>
>> I think that emacs should be more robust about this and do not crash for any bad value.
Eli> I agree. It is not a bad value, we just couldn't yet find a way of
Eli> switching the font-backend.
Eli, would you accept a patch for emacs-27 that signals a user-error
if trying to set a font-backend thatʼs not supported by the running
emacs? Or that ignores it (with a message)?
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 10 Mar 2020 14:53:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 39865 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: Vinicius José Latorre <viniciusjl <at> gmail.com>,
> 39865 <at> debbugs.gnu.org
> Date: Tue, 10 Mar 2020 15:29:44 +0100
>
> >> I think that emacs should be more robust about this and do not crash for any bad value.
>
> Eli> I agree. It is not a bad value, we just couldn't yet find a way of
> Eli> switching the font-backend.
>
> Eli, would you accept a patch for emacs-27 that signals a user-error
> if trying to set a font-backend thatʼs not supported by the running
> emacs? Or that ignores it (with a message)?
In general, yes; but I'd need to see the patch.
AFAIU, the problem in this case wasn't that the backend wasn't
supported, it was that it was changed in the middle of a session.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 10 Mar 2020 14:56:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> AFAIU, the problem in this case wasn't that the backend wasn't
> supported, it was that it was changed in the middle of a session.
Yes, but only at emacs starting (~/.emacs evaluation), after starting there
is no problem to set a font-backend.
On Tue, Mar 10, 2020 at 11:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Robert Pluim <rpluim <at> gmail.com>
> > Cc: Vinicius José Latorre <viniciusjl <at> gmail.com>,
> > 39865 <at> debbugs.gnu.org
> > Date: Tue, 10 Mar 2020 15:29:44 +0100
> >
> > >> I think that emacs should be more robust about this and do not
> crash for any bad value.
> >
> > Eli> I agree. It is not a bad value, we just couldn't yet find a
> way of
> > Eli> switching the font-backend.
> >
> > Eli, would you accept a patch for emacs-27 that signals a user-error
> > if trying to set a font-backend thatʼs not supported by the running
> > emacs? Or that ignores it (with a message)?
>
> In general, yes; but I'd need to see the patch.
>
> AFAIU, the problem in this case wasn't that the backend wasn't
> supported, it was that it was changed in the middle of a session.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 10 Mar 2020 15:16:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Tue, 10 Mar 2020 16:52:04 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Cc: Vinicius José Latorre <viniciusjl <at> gmail.com>,
>> 39865 <at> debbugs.gnu.org
>> Date: Tue, 10 Mar 2020 15:29:44 +0100
>>
>> >> I think that emacs should be more robust about this and do not crash for any bad value.
>>
Eli> I agree. It is not a bad value, we just couldn't yet find a way of
Eli> switching the font-backend.
>>
>> Eli, would you accept a patch for emacs-27 that signals a user-error
>> if trying to set a font-backend thatʼs not supported by the running
>> emacs? Or that ignores it (with a message)?
Eli> In general, yes; but I'd need to see the patch.
diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..3b0174cea9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4090,6 +4090,21 @@ gui_set_frame_parameters (struct frame *f, Lisp_Object alist)
}
else
{
+ if (EQ (prop, Qfont_backend))
+ {
+ Lisp_Object tail = val;
+ Lisp_Object backend;
+ FOR_EACH_TAIL_SAFE (tail)
+ {
+ backend = XCAR (tail);
+ if (! c_symbol_p (XSYMBOL (backend)))
+ {
+ AUTO_STRING (format, "Unsupported font-backend: \"%s\"");
+ xsignal1 (Quser_error, CALLN (Fformat, format, backend));
+ }
+ }
+ }
+
register Lisp_Object param_index, old_value;
old_value = get_frame_param (f, prop);
Eli> AFAIU, the problem in this case wasn't that the backend wasn't
Eli> supported, it was that it was changed in the middle of a session.
Setting font-backend to a supported value with default-frame-alist
in .emacs should work, and does for me in master, at least switching
from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.
Hmm, switching to 'x' also crashes. But I can create a new frame with
'x' as font-backend.
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 10 Mar 2020 15:21:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Tue, 10 Mar 2020 11:54:53 -0300, Vinicius José Latorre <viniciusjl <at> gmail.com> said:
>> AFAIU, the problem in this case wasn't that the backend wasn't
>> supported, it was that it was changed in the middle of a session.
Vinicius> Yes, but only at emacs starting (~/.emacs evaluation), after starting there
Vinicius> is no problem to set a font-backend.
I donʼt remember seeing: was your emacs built with cairo or with xft?
With or without HarfBuzz? Because I canʼt get an xft+hb build to
crash when switching the font-backend to 'xft'.
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 10 Mar 2020 19:04:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> I donʼt remember seeing: was your emacs built with cairo or with xft?
> With or without HarfBuzz? Because I canʼt get an xft+hb build to
> crash when switching the font-backend to 'xft'.
The line below in my ~/.emacs was crashing emacs at start time.
(push '(font-backend xft x) default-frame-alist)
Without the line above, all works right.
If emacs is started with -Q and then loading ~/.emacs with the line above
also works right, the problem is at starting time with that line.
The libharfbuzz* packages are installed in my GNU Debian.
On Tue, Mar 10, 2020 at 12:20 PM Robert Pluim <rpluim <at> gmail.com> wrote:
> >>>>> On Tue, 10 Mar 2020 11:54:53 -0300, Vinicius José Latorre <
> viniciusjl <at> gmail.com> said:
>
> >> AFAIU, the problem in this case wasn't that the backend wasn't
> >> supported, it was that it was changed in the middle of a session.
>
> Vinicius> Yes, but only at emacs starting (~/.emacs evaluation), after
> starting there
> Vinicius> is no problem to set a font-backend.
>
> I donʼt remember seeing: was your emacs built with cairo or with xft?
> With or without HarfBuzz? Because I canʼt get an xft+hb build to
> crash when switching the font-backend to 'xft'.
>
> Robert
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Wed, 11 Mar 2020 07:35:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Tue, 10 Mar 2020 16:03:12 -0300, Vinicius José Latorre <viniciusjl <at> gmail.com> said:
>> I donʼt remember seeing: was your emacs built with cairo or with xft?
>> With or without HarfBuzz? Because I canʼt get an xft+hb build to
>> crash when switching the font-backend to 'xft'.
Vinicius> The line below in my ~/.emacs was crashing emacs at start time.
Vinicius> (push '(font-backend xft x) default-frame-alist)
Vinicius> Without the line above, all works right.
Vinicius> If emacs is started with -Q and then loading ~/.emacs with the line above
Vinicius> also works right, the problem is at starting time with that line.
This we knew, the question is about how your emacs was built. Could
you show us your value of 'system-configuration-features', that will
tell us all we need to know about HarfBuzz etc.
Thanks
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Wed, 11 Mar 2020 16:59:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 39865 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: viniciusjl <at> gmail.com, 39865 <at> debbugs.gnu.org
> Date: Tue, 10 Mar 2020 16:15:09 +0100
>
> + if (EQ (prop, Qfont_backend))
> + {
> + Lisp_Object tail = val;
> + Lisp_Object backend;
> + FOR_EACH_TAIL_SAFE (tail)
> + {
> + backend = XCAR (tail);
> + if (! c_symbol_p (XSYMBOL (backend)))
> + {
> + AUTO_STRING (format, "Unsupported font-backend: \"%s\"");
> + xsignal1 (Quser_error, CALLN (Fformat, format, backend));
> + }
> + }
> + }
> +
This will pass any symbol, it doesn't really verify that the symbol
identifies a font backend, does it? Why not loop over
font_driver_list instead? Or do we need to support here font backends
that were not yet registered?
> Setting font-backend to a supported value with default-frame-alist
> in .emacs should work, and does for me in master, at least switching
> from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.
>
> Hmm, switching to 'x' also crashes.
And the above patch doesn't fix those crashes, does it?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Wed, 11 Mar 2020 20:47:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> This we knew, the question is about how your emacs was built. Could
> you show us your value of 'system-configuration-features', that will
> tell us all we need to know about HarfBuzz etc.
system-configuration-features is a variable defined in ‘C source code’.
Its value is
"XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP"
On Wed, Mar 11, 2020 at 4:34 AM Robert Pluim <rpluim <at> gmail.com> wrote:
> >>>>> On Tue, 10 Mar 2020 16:03:12 -0300, Vinicius José Latorre <
> viniciusjl <at> gmail.com> said:
>
> >> I donʼt remember seeing: was your emacs built with cairo or with
> xft?
> >> With or without HarfBuzz? Because I canʼt get an xft+hb build to
> >> crash when switching the font-backend to 'xft'.
>
> Vinicius> The line below in my ~/.emacs was crashing emacs at start
> time.
>
> Vinicius> (push '(font-backend xft x) default-frame-alist)
>
> Vinicius> Without the line above, all works right.
>
> Vinicius> If emacs is started with -Q and then loading ~/.emacs with
> the line above
> Vinicius> also works right, the problem is at starting time with that
> line.
>
> This we knew, the question is about how your emacs was built. Could
> you show us your value of 'system-configuration-features', that will
> tell us all we need to know about HarfBuzz etc.
>
> Thanks
>
> Robert
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Thu, 12 Mar 2020 09:34:01 GMT)
Full text and
rfc822 format available.
Message #56 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 11 Mar 2020 18:58:41 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
Eli> This will pass any symbol, it doesn't really verify that the symbol
Eli> identifies a font backend, does it? Why not loop over
Eli> font_driver_list instead? Or do we need to support here font backends
Eli> that were not yet registered?
Probably, but this doesnʼt fix everything anyway, see below.
>> Setting font-backend to a supported value with default-frame-alist
>> in .emacs should work, and does for me in master, at least switching
>> from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.
>>
>> Hmm, switching to 'x' also crashes.
Eli> And the above patch doesn't fix those crashes, does it?
It fixes the switch to xft, but not the switch to x.
Of course, what I should do is rebase
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>
Yep, that fixes this for me. Of course it breaks the macOS build,
since that doesnʼt have a gui_default_font_parameter function
(yet :-) ).
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Thu, 12 Mar 2020 09:40:02 GMT)
Full text and
rfc822 format available.
Message #59 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 11 Mar 2020 17:45:44 -0300, Vinicius José Latorre <viniciusjl <at> gmail.com> said:
>> This we knew, the question is about how your emacs was built. Could
>> you show us your value of 'system-configuration-features', that will
>> tell us all we need to know about HarfBuzz etc.
Vinicius> system-configuration-features is a variable defined in ‘C source code’.
Vinicius> Its value is
Vinicius> "XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
Vinicius> INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
Vinicius> ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
Vinicius> PDUMPER LCMS2 GMP"
Thanks for that. So this is the same as
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386>
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Thu, 12 Mar 2020 10:26:01 GMT)
Full text and
rfc822 format available.
Message #64 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Thu, 12 Mar 2020 10:33:00 +0100, Robert Pluim <rpluim <at> gmail.com> said:
Robert> Of course, what I should do is rebase
Robert> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>
Robert> Yep, that fixes this for me. Of course it breaks the macOS build,
Robert> since that doesnʼt have a gui_default_font_parameter function
Robert> (yet :-) ).
Vinicius, the following patch should fix things for you. Iʼll have to
look at what's needed on the macOS side.
diff --git a/src/dispextern.h b/src/dispextern.h
index 6246c7c080..f08231f071 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3726,6 +3726,7 @@ #define IMAGE_BACKGROUND_TRANSPARENT(img, f, mask) \
Lisp_Object, Lisp_Object,
const char *, const char *,
enum resource_types);
+extern void gui_default_font_parameter (struct frame *, Lisp_Object);
#ifndef HAVE_NS /* These both used on W32 and X only. */
extern bool gui_mouse_grabbed (Display_Info *);
diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..45fed8420c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
return;
if (FRAME_FONT (f))
- free_all_realized_faces (Qnil);
+ {
+ Lisp_Object frame;
+ XSETFRAME (frame, f);
+ free_all_realized_faces (frame);
+ }
new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
if (NILP (new_value))
@@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
if (FRAME_FONT (f))
{
- Lisp_Object frame;
-
- XSETFRAME (frame, f);
- gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
+ /* Reconsider default font after backend(s) change (Bug#23386). */
+ gui_default_font_parameter (f, Qnil);
face_change = true;
windows_or_buffers_changed = 18;
}
diff --git a/src/xfns.c b/src/xfns.c
index 5758bb7a18..ab013d85d8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3555,8 +3555,8 @@ do_unwind_create_frame (Lisp_Object frame)
unwind_create_frame (frame);
}
-static void
-x_default_font_parameter (struct frame *f, Lisp_Object parms)
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object font_param = gui_display_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@@ -3894,7 +3894,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
- x_default_font_parameter (f, parms);
+ gui_default_font_parameter (f, parms);
if (!FRAME_FONT (f))
{
delete_frame (frame, Qnoelisp);
@@ -6378,7 +6378,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms)
/* Extract the window parameters from the supplied values that are
needed to determine window geometry. */
- x_default_font_parameter (f, parms);
+ gui_default_font_parameter (f, parms);
gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 13 Mar 2020 00:45:02 GMT)
Full text and
rfc822 format available.
Message #67 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Vinicius, the following patch should fix things for you.
I've just reinstalled with the fix, and I confirm that all works right when
setting font-backend to xft.
On Thu, Mar 12, 2020 at 7:25 AM Robert Pluim <rpluim <at> gmail.com> wrote:
> >>>>> On Thu, 12 Mar 2020 10:33:00 +0100, Robert Pluim <rpluim <at> gmail.com>
> said:
> Robert> Of course, what I should do is rebase
> Robert> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>
>
> Robert> Yep, that fixes this for me. Of course it breaks the macOS
> build,
> Robert> since that doesnʼt have a gui_default_font_parameter function
> Robert> (yet :-) ).
>
> Vinicius, the following patch should fix things for you. Iʼll have to
> look at what's needed on the macOS side.
>
> diff --git a/src/dispextern.h b/src/dispextern.h
> index 6246c7c080..f08231f071 100644
> --- a/src/dispextern.h
> +++ b/src/dispextern.h
> @@ -3726,6 +3726,7 @@ #define IMAGE_BACKGROUND_TRANSPARENT(img, f, mask)
> \
> Lisp_Object, Lisp_Object,
> const char *, const char *,
> enum resource_types);
> +extern void gui_default_font_parameter (struct frame *, Lisp_Object);
>
> #ifndef HAVE_NS /* These both used on W32 and X only. */
> extern bool gui_mouse_grabbed (Display_Info *);
> diff --git a/src/frame.c b/src/frame.c
> index 51fc78ab70..45fed8420c 100644
> --- a/src/frame.c
> +++ b/src/frame.c
> @@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object
> new_value, Lisp_Object old_va
> return;
>
> if (FRAME_FONT (f))
> - free_all_realized_faces (Qnil);
> + {
> + Lisp_Object frame;
> + XSETFRAME (frame, f);
> + free_all_realized_faces (frame);
> + }
>
> new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
> if (NILP (new_value))
> @@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object
> new_value, Lisp_Object old_va
>
> if (FRAME_FONT (f))
> {
> - Lisp_Object frame;
> -
> - XSETFRAME (frame, f);
> - gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
> + /* Reconsider default font after backend(s) change (Bug#23386). */
> + gui_default_font_parameter (f, Qnil);
> face_change = true;
> windows_or_buffers_changed = 18;
> }
> diff --git a/src/xfns.c b/src/xfns.c
> index 5758bb7a18..ab013d85d8 100644
> --- a/src/xfns.c
> +++ b/src/xfns.c
> @@ -3555,8 +3555,8 @@ do_unwind_create_frame (Lisp_Object frame)
> unwind_create_frame (frame);
> }
>
> -static void
> -x_default_font_parameter (struct frame *f, Lisp_Object parms)
> +void
> +gui_default_font_parameter (struct frame *f, Lisp_Object parms)
> {
> struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
> Lisp_Object font_param = gui_display_get_arg (dpyinfo, parms, Qfont,
> NULL, NULL,
> @@ -3894,7 +3894,7 @@ DEFUN ("x-create-frame", Fx_create_frame,
> Sx_create_frame,
>
> /* Extract the window parameters from the supplied values
> that are needed to determine window geometry. */
> - x_default_font_parameter (f, parms);
> + gui_default_font_parameter (f, parms);
> if (!FRAME_FONT (f))
> {
> delete_frame (frame, Qnoelisp);
> @@ -6378,7 +6378,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
> Lisp_Object parms)
>
> /* Extract the window parameters from the supplied values that are
> needed to determine window geometry. */
> - x_default_font_parameter (f, parms);
> + gui_default_font_parameter (f, parms);
>
> gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
> "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 13 Mar 2020 09:36:01 GMT)
Full text and
rfc822 format available.
Message #70 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Thu, 12 Mar 2020 21:44:15 -0300, Vinicius José Latorre <viniciusjl <at> gmail.com> said:
>> Vinicius, the following patch should fix things for you.
Vinicius> I've just reinstalled with the fix, and I confirm that all works right when
Vinicius> setting font-backend to xft.
Thanks for testing.
Eli, the patch as it stands is not suitable for pushing to emacs-27,
since it breaks the macOS build, which doesnʼt have a
gui_default_font_parameter function. As far as I can tell (and have
tested :-) ), we can get away with a dummy one, since there is only
one font backend on macOS. If you agree, this is what the complete
patch looks like:
diff --git a/src/dispextern.h b/src/dispextern.h
index 6246c7c080..f08231f071 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3726,6 +3726,7 @@ #define IMAGE_BACKGROUND_TRANSPARENT(img, f, mask) \
Lisp_Object, Lisp_Object,
const char *, const char *,
enum resource_types);
+extern void gui_default_font_parameter (struct frame *, Lisp_Object);
#ifndef HAVE_NS /* These both used on W32 and X only. */
extern bool gui_mouse_grabbed (Display_Info *);
diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..45fed8420c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
return;
if (FRAME_FONT (f))
- free_all_realized_faces (Qnil);
+ {
+ Lisp_Object frame;
+ XSETFRAME (frame, f);
+ free_all_realized_faces (frame);
+ }
new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
if (NILP (new_value))
@@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
if (FRAME_FONT (f))
{
- Lisp_Object frame;
-
- XSETFRAME (frame, f);
- gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
+ /* Reconsider default font after backend(s) change (Bug#23386). */
+ gui_default_font_parameter (f, Qnil);
face_change = true;
windows_or_buffers_changed = 18;
}
diff --git a/src/nsfns.m b/src/nsfns.m
index cbde93b3f1..b7f6813e4f 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1447,6 +1447,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
return unbind_to (count, frame);
}
+/* This currently does nothing, since it's only really needed when
+ changing the font-backend, but macOS currently only has one
+ possible backend. */
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
+{
+}
+
static BOOL
ns_window_is_ancestor (NSWindow *win, NSWindow *candidate)
/* Test whether CANDIDATE is an ancestor window of WIN. */
diff --git a/src/w32fns.c b/src/w32fns.c
index 61e22e5700..c09e14d354 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5749,8 +5749,8 @@ do_unwind_create_frame (Lisp_Object frame)
unwind_create_frame (frame);
}
-static void
-w32_default_font_parameter (struct frame *f, Lisp_Object parms)
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object font_param = gui_display_get_arg (dpyinfo,
@@ -5978,7 +5978,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
- w32_default_font_parameter (f, parameters);
+ gui_default_font_parameter (f, parameters);
/* Default BorderWidth to 0 to match other platforms. */
gui_default_parameter (f, parameters, Qborder_width, make_fixnum (0),
@@ -7039,7 +7039,7 @@ w32_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms)
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
- w32_default_font_parameter (f, parms);
+ gui_default_font_parameter (f, parms);
gui_default_parameter (f, parms, Qborder_width, make_fixnum (2),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
diff --git a/src/xfns.c b/src/xfns.c
index 5758bb7a18..ab013d85d8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3555,8 +3555,8 @@ do_unwind_create_frame (Lisp_Object frame)
unwind_create_frame (frame);
}
-static void
-x_default_font_parameter (struct frame *f, Lisp_Object parms)
+void
+gui_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object font_param = gui_display_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@@ -3894,7 +3894,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
- x_default_font_parameter (f, parms);
+ gui_default_font_parameter (f, parms);
if (!FRAME_FONT (f))
{
delete_frame (frame, Qnoelisp);
@@ -6378,7 +6378,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms)
/* Extract the window parameters from the supplied values that are
needed to determine window geometry. */
- x_default_font_parameter (f, parms);
+ gui_default_font_parameter (f, parms);
gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 13 Mar 2020 14:11:01 GMT)
Full text and
rfc822 format available.
Message #73 received at 39865 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Pluim <rpluim <at> gmail.com>
> Date: Fri, 13 Mar 2020 10:35:14 +0100
> Cc: 39865 <at> debbugs.gnu.org
>
> Eli, the patch as it stands is not suitable for pushing to emacs-27,
> since it breaks the macOS build, which doesnʼt have a
> gui_default_font_parameter function. As far as I can tell (and have
> tested :-) ), we can get away with a dummy one, since there is only
> one font backend on macOS.
I'm okay with doing that. However, ...
> If you agree, this is what the complete patch looks like:
... this is not how we introduce terminal-dependent methods. We don't
define different versions of gui_SOMETHING functions in each
terminal-specific back-end. Instead, we add a member to 'struct
redisplay_interface', and then assign a different value to it in each
back-end. See how x_redisplay_interface, w32_redisplay_interface,
etc. are defined in the respective *term.[cm] files, and how they are
used via the FRAME_RIF macro.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Fri, 13 Mar 2020 15:10:02 GMT)
Full text and
rfc822 format available.
Message #76 received at 39865 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Fri, 13 Mar 2020 16:09:27 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Date: Fri, 13 Mar 2020 10:35:14 +0100
>> Cc: 39865 <at> debbugs.gnu.org
>>
>> Eli, the patch as it stands is not suitable for pushing to emacs-27,
>> since it breaks the macOS build, which doesnʼt have a
>> gui_default_font_parameter function. As far as I can tell (and have
>> tested :-) ), we can get away with a dummy one, since there is only
>> one font backend on macOS.
Eli> I'm okay with doing that. However, ...
>> If you agree, this is what the complete patch looks like:
Eli> ... this is not how we introduce terminal-dependent methods. We don't
Eli> define different versions of gui_SOMETHING functions in each
Eli> terminal-specific back-end. Instead, we add a member to 'struct
Eli> redisplay_interface', and then assign a different value to it in each
Eli> back-end. See how x_redisplay_interface, w32_redisplay_interface,
Eli> etc. are defined in the respective *term.[cm] files, and how they are
Eli> used via the FRAME_RIF macro.
OK, I can rework it using that.
Robert
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 17 Mar 2020 10:17:01 GMT)
Full text and
rfc822 format available.
Message #79 received at 39865 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>>>>> On Fri, 13 Mar 2020 16:09:25 +0100, Robert Pluim <rpluim <at> gmail.com> said:
Eli> ... this is not how we introduce terminal-dependent methods. We don't
Eli> define different versions of gui_SOMETHING functions in each
Eli> terminal-specific back-end. Instead, we add a member to 'struct
Eli> redisplay_interface', and then assign a different value to it in each
Eli> back-end. See how x_redisplay_interface, w32_redisplay_interface,
Eli> etc. are defined in the respective *term.[cm] files, and how they are
Eli> used via the FRAME_RIF macro.
Robert> OK, I can rework it using that.
The following has been compiled and tested on macOS, GNU/Linux, and
MSWindows. Itʼs against emacs-27, where Iʼd prefer to put it, since
people might start building that with Cairo enabled, which would make
this crash more likely, but I can put it in master if you wish.
Robert
[0001-Recalculate-default-font-when-switching-font-backend.patch (text/x-patch, inline)]
From 6c1062b32f760bf220477230bb1e41a6c7149f2b Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Mon, 16 Mar 2020 17:21:02 +0100
Subject: [PATCH] Recalculate default font when switching font backend
To: emacs-devel <at> gnu.org
This is an updated version of the patch by Dmitry Antipov
<dmantipov <at> yandex.ru> in
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>.
Fixes Bug#23386
* src/dispextern.h (struct redisplay_interface): New member
default_font_parameter.
* src/xterm.h: Add prototype for x_default_font_parameter.
* src/xterm.c (x_redisplay_interface): Initialize
default_font_parameter member.
* src/xfns.c (x_default_font_parameter): Make non-static.
* src/w32term.h: Add prototype for w32_default_font_parameter
* src/w32fns.c (w32_default_font_parameter): Make non-static.
* src/w32term.c (w32_redisplay_interface): Initialize
default_font_parameter member.
* src/nsterm.m (ns_redisplay_interface): Add dummy
ns_default_font_parameter (there is currently only one possible font
backend on macOS). Initialize default_font_parameter member.
* src/frame.c (gui_set_font_backend): Recalculate default font using
RIF default_font_parameter to avoid crash when changing font backend.
---
src/dispextern.h | 3 +++
src/frame.c | 12 +++++++-----
src/nsterm.m | 10 +++++++++-
src/w32fns.c | 2 +-
src/w32term.c | 3 ++-
src/w32term.h | 4 ++++
src/xfns.c | 2 +-
src/xterm.c | 3 ++-
src/xterm.h | 1 +
9 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/src/dispextern.h b/src/dispextern.h
index 6246c7c080..724aad4227 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3003,6 +3003,9 @@ reset_mouse_highlight (Mouse_HLInfo *hlinfo)
/* Cancel hourglass cursor on frame F. */
void (*hide_hourglass) (struct frame *f);
+ /* Called to (re)calculate the default face when changing the font
+ backend. */
+ void (*default_font_parameter) (struct frame *f, Lisp_Object parms);
#endif /* HAVE_WINDOW_SYSTEM */
};
diff --git a/src/frame.c b/src/frame.c
index 88d6f22fc0..ecf175f4f9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4565,7 +4565,11 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
return;
if (FRAME_FONT (f))
- free_all_realized_faces (Qnil);
+ {
+ Lisp_Object frame;
+ XSETFRAME (frame, f);
+ free_all_realized_faces (frame);
+ }
new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
if (NILP (new_value))
@@ -4579,10 +4583,8 @@ gui_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_va
if (FRAME_FONT (f))
{
- Lisp_Object frame;
-
- XSETFRAME (frame, f);
- gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
+ /* Reconsider default font after backend(s) change (Bug#23386). */
+ FRAME_RIF(f)->default_font_parameter (f, Qnil);
face_change = true;
windows_or_buffers_changed = 18;
}
diff --git a/src/nsterm.m b/src/nsterm.m
index ed2d82ceae..e92e3d5a6f 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5132,6 +5132,13 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
reset_mouse_highlight (&dpyinfo->mouse_highlight);
}
+/* This currently does nothing, since it's only really needed when
+ changing the font-backend, but macOS currently only has one
+ possible backend. This may change if we add HarfBuzz support. */
+static void
+ns_default_font_parameter (struct frame *f, Lisp_Object parms)
+{
+}
/* This and next define (many of the) public functions in this file. */
/* gui_* are generic versions in xdisp.c that we, and other terms, get away
@@ -5167,7 +5174,8 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
ns_draw_window_divider,
ns_shift_glyphs_for_insert,
ns_show_hourglass,
- ns_hide_hourglass
+ ns_hide_hourglass,
+ ns_default_font_parameter
};
diff --git a/src/w32fns.c b/src/w32fns.c
index 61e22e5700..2f01fb52e9 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5749,7 +5749,7 @@ do_unwind_create_frame (Lisp_Object frame)
unwind_create_frame (frame);
}
-static void
+void
w32_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
diff --git a/src/w32term.c b/src/w32term.c
index f515f5604d..76cf6bd696 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -7249,7 +7249,8 @@ w32_make_rdb (char *xrm_option)
w32_draw_window_divider,
w32_shift_glyphs_for_insert,
w32_show_hourglass,
- w32_hide_hourglass
+ w32_hide_hourglass,
+ w32_default_font_parameter
};
static void w32_delete_terminal (struct terminal *term);
diff --git a/src/w32term.h b/src/w32term.h
index 737764b894..f8a8a727e8 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -267,6 +267,10 @@ #define CP_DEFAULT 1004
extern const char *w32_get_string_resource (void *v_rdb,
const char *name,
const char *class);
+
+/* w32fns.c */
+extern void w32_default_font_parameter (struct frame* f, Lisp_Object parms);
+
#define PIX_TYPE COLORREF
diff --git a/src/xfns.c b/src/xfns.c
index 276ea1c393..afe1ceef81 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3555,7 +3555,7 @@ do_unwind_create_frame (Lisp_Object frame)
unwind_create_frame (frame);
}
-static void
+void
x_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
diff --git a/src/xterm.c b/src/xterm.c
index 21d99f0c7b..2ba3c00940 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -13374,7 +13374,8 @@ x_activate_timeout_atimer (void)
x_draw_window_divider,
x_shift_glyphs_for_insert, /* Never called; see comment in function. */
x_show_hourglass,
- x_hide_hourglass
+ x_hide_hourglass,
+ x_default_font_parameter
};
diff --git a/src/xterm.h b/src/xterm.h
index 51e75890b6..bc10043c54 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1056,6 +1056,7 @@ #define SELECTION_EVENT_TIME(eventp) \
int *xptr,
int *yptr,
int *outer_border);
+extern void x_default_font_parameter (struct frame* f, Lisp_Object parms);
/* From xrdb.c. */
--
2.25.0.232.gd8437c57fa
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#39865
; Package
emacs
.
(Tue, 17 Mar 2020 15:17:02 GMT)
Full text and
rfc822 format available.
Message #82 received at 39865 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: 39865 <at> debbugs.gnu.org, viniciusjl <at> gmail.com
> Date: Tue, 17 Mar 2020 11:16:34 +0100
>
> The following has been compiled and tested on macOS, GNU/Linux, and
> MSWindows. Itʼs against emacs-27, where Iʼd prefer to put it, since
> people might start building that with Cairo enabled, which would make
> this crash more likely, but I can put it in master if you wish.
SGTM, thanks.
bug Marked as fixed in versions 27.1.
Request was from
Robert Pluim <rpluim <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 17 Mar 2020 16:07:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Robert Pluim <rpluim <at> gmail.com>
:
You have taken responsibility.
(Tue, 17 Mar 2020 16:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Vinicius José Latorre <viniciusjl <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 17 Mar 2020 16:07:02 GMT)
Full text and
rfc822 format available.
Message #89 received at 39865-done <at> debbugs.gnu.org (full text, mbox):
>>>>> On Tue, 17 Mar 2020 17:15:59 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Cc: 39865 <at> debbugs.gnu.org, viniciusjl <at> gmail.com
>> Date: Tue, 17 Mar 2020 11:16:34 +0100
>>
>> The following has been compiled and tested on macOS, GNU/Linux, and
>> MSWindows. Itʼs against emacs-27, where Iʼd prefer to put it, since
>> people might start building that with Cairo enabled, which would make
>> this crash more likely, but I can put it in master if you wish.
Eli> SGTM, thanks.
Pushed to emacs-27 as 5747a59a88
Closing the bug.
Reply sent
to
Robert Pluim <rpluim <at> gmail.com>
:
You have taken responsibility.
(Tue, 17 Mar 2020 16:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
bug acknowledged by developer.
(Tue, 17 Mar 2020 16:07:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Robert Pluim <rpluim <at> gmail.com>
:
You have taken responsibility.
(Tue, 17 Mar 2020 16:07:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Alex Gramiak <agrambot <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 17 Mar 2020 16:07:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Robert Pluim <rpluim <at> gmail.com>
:
You have taken responsibility.
(Tue, 17 Mar 2020 16:07:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Štěpán Němec <stepnem <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 17 Mar 2020 16:07:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 15 Apr 2020 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.