[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modify parameters on all frames
From: |
Ehud Karni |
Subject: |
Re: Modify parameters on all frames |
Date: |
Tue, 8 Apr 2003 22:56:01 +0300 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 08 Apr 2003 02:45:45 -0400, Richard Stallman <address@hidden> wrote:
>
> Doc strings are supposed to say what job the function does, not HOW
> the function works. If HOW needs explaining, please do that with
> comments.
>
> Using a counter to loop through the list is ugly--why not loop using
> dolist?
OK. How about this:
(defun modify-all-frames-parameters (alist)
"modify all current and future frames parameters according to ALIST.
This changes `default-frame-alist' and possibly `initial-frame-alist'.
See help of `modify-frame-parameters' for more information."
(let (element) ;; temp
(dolist (frame (frame-list))
(modify-frame-parameters frame alist))
(dolist (pair alist) ;; conses to add/replace
;; initial-frame-alist needs setting only when
;; frame-notice-user-settings is true
(and frame-notice-user-settings
(setq element (assoc (car pair) initial-frame-alist))
(setq initial-frame-alist (delq element initial-frame-alist)))
(and (setq element (assoc (car pair) default-frame-alist))
(setq default-frame-alist (delq element default-frame-alist)))))
(and frame-notice-user-settings
(setq initial-frame-alist (append initial-frame-alist alist)))
(setq default-frame-alist (append default-frame-alist alist)))
Ehud.
- --
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:address@hidden Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)
iD8DBQE+kylRLFvTvpjqOY0RAkQUAJ9lEu+8E0O9Ha0/Iv2QGZoN8vc0sACeOXPX
JZsK5eyQhCp1PszKjg0WxXw=
=WsBI
-----END PGP SIGNATURE-----