From: Alexander Gramiak Date: Sun, 14 Apr 2019 15:27:50 +0000 (-0600) Subject: Backport: * lisp/frame.el (frame--size-history): Fix infloop. (Bug#35272) X-Git-Tag: emacs-26.2.90~104 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e40f39bec34feeec893fb66625f19cc4663cd217;p=emacs.git Backport: * lisp/frame.el (frame--size-history): Fix infloop. (Bug#35272) --- diff --git a/lisp/frame.el b/lisp/frame.el index a0e62e1d69d..30f6ca91ba6 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1446,14 +1446,16 @@ selected frame." (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))) (move-to-column 24 t) (while entry (insert (format " %s" (pop entry)))) - (insert "\n")))))) + (insert "\n"))) + (unless frame-size-history + (insert "Frame size history is nil.\n"))))) (declare-function x-frame-edges "xfns.c" (&optional frame type)) (declare-function w32-frame-edges "w32fns.c" (&optional frame type))