;;; frame.el --- multi-frame management independent of window systems -*- lexical-binding:t -*-
-;; Copyright (C) 1993-1994, 1996-1997, 2000-2015 Free Software
+;; Copyright (C) 1993-1994, 1996-1997, 2000-2016 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
function to this method, which should take an alist of parameters
as its argument.")
-(cl-defmethod frame-creation-function (params
- &context (window-system (eql nil)))
+(cl-generic-define-context-rewriter window-system (value)
+ ;; If `value' is a `consp', it's probably an old-style specializer,
+ ;; so just use it, and anyway `eql' isn't very useful on cons cells.
+ `(window-system ,(if (consp value) value `(eql ,value))))
+
+(cl-defmethod frame-creation-function (params &context (window-system nil))
;; It's tempting to get rid of tty-create-frame-with-faces and turn it into
;; this method (i.e. move this method to faces.el), but faces.el is loaded
;; much earlier from loadup.el (before cl-generic and even before
You can set this in your init file; for example,
(setq initial-frame-alist
- '((top . 1) (left . 1) (width . 80) (height . 55)))
+ \\='((top . 1) (left . 1) (width . 80) (height . 55)))
Parameters specified here supersede the values given in
`default-frame-alist'.
You can set this in your init file; for example,
(setq minibuffer-frame-alist
- '((top . 1) (left . 1) (width . 80) (height . 2)))
+ \\='((top . 1) (left . 1) (width . 80) (height . 2)))
It is not necessary to include (minibuffer . only); that is
appended when the minibuffer frame is created."
(cons (1- (car frame-size-history))
(cons
(list frame-initial-frame
- "frame-notice-user-settings"
+ "FRAME-NOTICE-USER"
nil newparms)
(cdr frame-size-history)))))
(when (numberp (car frame-size-history))
(setq frame-size-history
(cons (1- (car frame-size-history))
- (cons (list frame "make-frame")
+ (cons (list frame "MAKE-FRAME")
(cdr frame-size-history)))))
;; We can run `window-configuration-change-hook' for this frame now.
If you change this without using customize, you should use
`frame-set-background-mode' to update existing frames;
-e.g. (mapc 'frame-set-background-mode (frame-list))."
+e.g. (mapc \\='frame-set-background-mode (frame-list))."
:group 'faces
:set #'(lambda (var value)
(set-default var value)
(cons 'internal-border-width
(frame-parameter frame 'internal-border-width)))))))
+(defun frame--size-history (&optional frame)
+ "Print history of resize operations for FRAME.
+Print prettified version of `frame-size-history' into a buffer
+called *frame-size-history*. Optional argument FRAME denotes the
+frame whose history will be printed. FRAME defaults to the
+selected frame."
+ (let ((history (reverse frame-size-history))
+ entry)
+ (setq frame (window-normalize-frame 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)))
+ (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"))))))
+
(declare-function x-frame-edges "xfns.c" (&optional frame type))
(declare-function w32-frame-edges "w32fns.c" (&optional frame type))
(declare-function ns-frame-edges "nsfns.m" (&optional frame type))
(make-obsolete-variable
'window-system-version "it does not give useful information." "24.3")
+;; Variables which should trigger redisplay of the current buffer.
+(setq redisplay--variables (make-hash-table :test 'eq :size 10))
+(mapc (lambda (var)
+ (puthash var 1 redisplay--variables))
+ '(line-spacing
+ overline-margin
+ line-prefix
+ wrap-prefix
+ truncate-lines
+ bidi-paragraph-direction
+ bidi-display-reordering))
+
(provide 'frame)
;;; frame.el ends here