bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#35272: [PATCH] * lisp/frame.el (frame--size-history): Fix infloop.


From: Alex Gramiak
Subject: bug#35272: [PATCH] * lisp/frame.el (frame--size-history): Fix infloop.
Date: Sun, 14 Apr 2019 10:25:42 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Alex Gramiak <agrambot@gmail.com>
>> Date: Sun, 14 Apr 2019 09:37:10 -0600
>> 
>> frame-size-history can be nil, which resulted in an infloop.
>> 
>> >From 5695525ed1477e908536d159da670f0f1ab4a369 Mon Sep 17 00:00:00 2001
>> From: Alexander Gramiak <agrambot@gmail.com>
>> Date: Sun, 14 Apr 2019 09:27:50 -0600
>> Subject: [PATCH] * lisp/frame.el (frame--size-history): Fix infloop.
>> 
>> ---
>>  lisp/frame.el | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/lisp/frame.el b/lisp/frame.el
>> index b5c936a51e..6f9e769e16 100644
>> --- a/lisp/frame.el
>> +++ b/lisp/frame.el
>> @@ -1610,7 +1610,7 @@ frame--size-history
>>      (with-current-buffer (get-buffer-create "*frame-size-history*")
>>        (erase-buffer)
>>        (insert (format "Frame size history of %s\n" frame))
>> -      (while (listp (setq entry (pop history)))
>> +      (while (consp (setq entry (pop history)))
>>      (when (eq (car entry) frame)
>>            (pop entry)
>>            (insert (format "%s" (pop entry)))
>
> Thanks.
>
> But wouldn't it be better to special-case the nil value, and display
> something to that effect, instead of just nothing after the header?

I suppose so. Here's a version which does that:

Attachment: 0001-lisp-frame.el-frame-size-history-Fix-infloop.-Bug-35.patch
Description: infloop


reply via email to

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