emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modify parameters on all frames


From: Ehud Karni
Subject: Modify parameters on all frames
Date: Sun, 6 Apr 2003 18:39:02 +0300

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I suggest to add a function to frame.el to change parameters on all
existing and future frames:

(defun modify-all-frames-parameters (alist)
  "modify all current and future frames parameters by changing 
`initial-frame-alist' and `default-frame-alist' and calling 
`modify-frame-parameters' on all existing frames with ALIST.
See help of `modify-frame-parameters' for more information."
  (let ((cframesc (cdr (current-frame-configuration)))
        frames ix fcount   ;; frames - list, index, count
        key val)           ;; key and value for aput
    (while cframesc
      (setq frames (append (list (car (car cframesc))) frames))
      (setq cframesc (cdr cframesc)))
    (setq fcount (length frames))
    (while alist
      (setq val (car alist))
      (setq key (car val))
      (setq val (cdr val))
      (message "key=%s, val=%s" key val)
      (aput 'initial-frame-alist key val) ;; If before initial frame
      (aput 'default-frame-alist key val) ;; for next frames
      (setq ix 0)
      (while (< ix fcount)
        (modify-frame-parameters (nth ix frames) (list (cons key val)))
        (setq ix (1+ ix)))
      (setq alist (cdr 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+kEoVLFvTvpjqOY0RAk6mAJ9e01e2QNYZx8mVKEkeDoTo0nplmwCcCtna
4PiVyDeCfF3aM9kkgM1RMyY=
=oQ5f
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]