diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/frame.el | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index bbf0a63c057..b9e63d54107 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -461,7 +461,7 @@ there (in decreasing order of priority)." | |||
| 461 | (cons (1- (car frame-size-history)) | 461 | (cons (1- (car frame-size-history)) |
| 462 | (cons | 462 | (cons |
| 463 | (list frame-initial-frame | 463 | (list frame-initial-frame |
| 464 | "frame-notice-user-settings" | 464 | "FRAME-NOTICE-USER" |
| 465 | nil newparms) | 465 | nil newparms) |
| 466 | (cdr frame-size-history))))) | 466 | (cdr frame-size-history))))) |
| 467 | 467 | ||
| @@ -702,7 +702,7 @@ the new frame according to its own rules." | |||
| 702 | (when (numberp (car frame-size-history)) | 702 | (when (numberp (car frame-size-history)) |
| 703 | (setq frame-size-history | 703 | (setq frame-size-history |
| 704 | (cons (1- (car frame-size-history)) | 704 | (cons (1- (car frame-size-history)) |
| 705 | (cons (list frame "make-frame") | 705 | (cons (list frame "MAKE-FRAME") |
| 706 | (cdr frame-size-history))))) | 706 | (cdr frame-size-history))))) |
| 707 | 707 | ||
| 708 | ;; We can run `window-configuration-change-hook' for this frame now. | 708 | ;; We can run `window-configuration-change-hook' for this frame now. |
| @@ -1382,6 +1382,27 @@ and width values are in pixels. | |||
| 1382 | (cons 'internal-border-width | 1382 | (cons 'internal-border-width |
| 1383 | (frame-parameter frame 'internal-border-width))))))) | 1383 | (frame-parameter frame 'internal-border-width))))))) |
| 1384 | 1384 | ||
| 1385 | (defun frame--size-history (&optional frame) | ||
| 1386 | "Print history of resize operations for FRAME. | ||
| 1387 | Print prettified version of `frame-size-history' into a buffer | ||
| 1388 | called *frame-size-history*. Optional argument FRAME denotes the | ||
| 1389 | frame whose history will be printed. FRAME defaults to the | ||
| 1390 | selected frame." | ||
| 1391 | (let ((history (reverse frame-size-history)) | ||
| 1392 | entry) | ||
| 1393 | (setq frame (window-normalize-frame frame)) | ||
| 1394 | (with-current-buffer (get-buffer-create "*frame-size-history*") | ||
| 1395 | (erase-buffer) | ||
| 1396 | (insert (format "Frame size history of %s\n" frame)) | ||
| 1397 | (while (listp (setq entry (pop history))) | ||
| 1398 | (when (eq (car entry) frame) | ||
| 1399 | (pop entry) | ||
| 1400 | (insert (format "%s" (pop entry))) | ||
| 1401 | (move-to-column 24 t) | ||
| 1402 | (while entry | ||
| 1403 | (insert (format " %s" (pop entry)))) | ||
| 1404 | (insert "\n")))))) | ||
| 1405 | |||
| 1385 | (declare-function x-frame-edges "xfns.c" (&optional frame type)) | 1406 | (declare-function x-frame-edges "xfns.c" (&optional frame type)) |
| 1386 | (declare-function w32-frame-edges "w32fns.c" (&optional frame type)) | 1407 | (declare-function w32-frame-edges "w32fns.c" (&optional frame type)) |
| 1387 | (declare-function ns-frame-edges "nsfns.m" (&optional frame type)) | 1408 | (declare-function ns-frame-edges "nsfns.m" (&optional frame type)) |