unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ehud Karni" <ehud@unix.mvs.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: Modify parameters on all frames
Date: Tue, 8 Apr 2003 22:56:01 +0300	[thread overview]
Message-ID: <200304081956.h38Ju1H6006224@beta.mvs.co.il> (raw)
In-Reply-To: <E192mrZ-0005qS-00@fencepost.gnu.org> (message from Richard Stallman on Tue, 08 Apr 2003 02:45:45 -0400)

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

On Tue, 08 Apr 2003 02:45:45 -0400, Richard Stallman <rms@gnu.org> 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:ehud@unix.mvs.co.il                  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-----

  reply	other threads:[~2003-04-08 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-06 15:39 Modify parameters on all frames Ehud Karni
2003-04-06 23:07 ` Richard Stallman
2003-04-07 20:39   ` Ehud Karni
2003-04-08  6:45     ` Richard Stallman
2003-04-08 19:56       ` Ehud Karni [this message]
2003-04-09  5:39         ` Richard Stallman
2003-04-09 17:38           ` Ehud Karni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200304081956.h38Ju1H6006224@beta.mvs.co.il \
    --to=ehud@unix.mvs.co.il \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).