Mercurial > emacs
comparison lisp/frame.el @ 91048:d38543a1c0f9
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 880-885)
- Remove RCS keywords from doc/misc/cc-mode.texi
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-264
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 13 Oct 2007 05:53:03 +0000 |
parents | 14c4a6aac623 f1dea8c68d8d |
children | a0e466c4d599 |
comparison
equal
deleted
inserted
replaced
91047:1cf8ecbaa1dc | 91048:d38543a1c0f9 |
---|---|
671 "Functions to run after a frame's font has been changed.") | 671 "Functions to run after a frame's font has been changed.") |
672 | 672 |
673 ;; Alias, kept temporarily. | 673 ;; Alias, kept temporarily. |
674 (define-obsolete-function-alias 'new-frame 'make-frame "22.1") | 674 (define-obsolete-function-alias 'new-frame 'make-frame "22.1") |
675 | 675 |
676 (defvar frame-inherited-parameters '() | |
677 ;; FIXME: Shouldn't we add `font' here as well? | |
678 "Parameters `make-frame' copies from the `selected-frame' to the new frame.") | |
679 | |
676 (defun make-frame (&optional parameters) | 680 (defun make-frame (&optional parameters) |
677 "Return a newly created frame displaying the current buffer. | 681 "Return a newly created frame displaying the current buffer. |
678 Optional argument PARAMETERS is an alist of parameters for the new frame. | 682 Optional argument PARAMETERS is an alist of parameters for the new frame. |
679 Each element of PARAMETERS should have the form (NAME . VALUE), for example: | 683 Each element of PARAMETERS should have the form (NAME . VALUE), for example: |
680 | 684 |
721 (unless frame-creation-function | 725 (unless frame-creation-function |
722 (error "Don't know how to create a frame on window system %s" w)) | 726 (error "Don't know how to create a frame on window system %s" w)) |
723 (run-hooks 'before-make-frame-hook) | 727 (run-hooks 'before-make-frame-hook) |
724 (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) | 728 (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) |
725 (normal-erase-is-backspace-setup-frame frame) | 729 (normal-erase-is-backspace-setup-frame frame) |
726 ;; Inherit the 'environment and 'client parameters. | 730 ;; Inherit the original frame's parameters. |
727 (let ((env (frame-parameter oldframe 'environment)) | 731 (dolist (param frame-inherited-parameters) |
728 (client (frame-parameter oldframe 'client))) | 732 (unless (assq param parameters) ;Overridden by explicit parameters. |
729 (if (not (framep env)) | 733 (let ((val (frame-parameter oldframe param))) |
730 (setq env oldframe)) | 734 (when val (set-frame-parameter frame param val))))) |
731 (if (and env (not (assq 'environment parameters))) | |
732 (set-frame-parameter frame 'environment env)) | |
733 (if (and client (not (assq 'client parameters))) | |
734 (set-frame-parameter frame 'client client))) | |
735 (run-hook-with-args 'after-make-frame-functions frame) | 735 (run-hook-with-args 'after-make-frame-functions frame) |
736 frame)) | 736 frame)) |
737 | 737 |
738 (defun filtered-frame-list (predicate) | 738 (defun filtered-frame-list (predicate) |
739 "Return a list of all live frames which satisfy PREDICATE." | 739 "Return a list of all live frames which satisfy PREDICATE." |