emacs-devel
[Top][All Lists]
Advanced

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

Re: About the new frame title


From: Stefan Kangas
Subject: Re: About the new frame title
Date: Thu, 24 Sep 2020 01:57:38 -0700

Eli Zaretskii <eliz@gnu.org> writes:

>>    dpyinfo->name_list_element = Fcons (display_name, Qnil);
>>    if (STRINGP (Vsystem_name))
>>      {
>> -      dpyinfo->w32_id_name = xmalloc (SCHARS (Vinvocation_name)
>> -                                      + SCHARS (Vsystem_name) + 2);
>> -      sprintf (dpyinfo->w32_id_name, "%s@%s",
>> -               SDATA (Vinvocation_name), SDATA (Vsystem_name));
>> +      dpyinfo->w32_id_name = xmalloc (14 + SCHARS (Vsystem_name));
>> +      sprintf (dpyinfo->w32_id_name, "GNU Emacs at %s", SDATA 
>> (Vsystem_name));
>
> Please don't use hard-coded constants, like 14 above, in such cases.
> Instead, use sizeof to compute the correct size at compile time from
> the string used as format specifier.

Thanks.  Does the attached look better?

Attachment: 0001-Make-initial-frame-match-frame-title-format.patch
Description: Text Data


reply via email to

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