From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.devel Subject: Re: Modify parameters on all frames Date: Tue, 8 Apr 2003 22:56:01 +0300 Organization: Mivtach-Simon Insurance agencies Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200304081956.h38Ju1H6006224@beta.mvs.co.il> References: <200304061539.h36Fd2R3007062@beta.mvs.co.il> Reply-To: ehud@unix.mvs.co.il NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1049831980 17093 80.91.224.249 (8 Apr 2003 19:59:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2003 19:59:40 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 08 21:59:36 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 192zFo-0004R0-00 for ; Tue, 08 Apr 2003 21:59:36 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 192zJx-0001Ef-00 for ; Tue, 08 Apr 2003 22:03:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192zEZ-00056p-08 for emacs-devel@quimby.gnus.org; Tue, 08 Apr 2003 15:58:20 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 192zE4-000500-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 15:57:48 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 192zDZ-0004QP-00 for emacs-devel@gnu.org; Tue, 08 Apr 2003 15:57:19 -0400 Original-Received: from unix.simonwiesel.co.il ([192.114.178.12] helo=unix.mvs.co.il) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192zCO-0003hH-00; Tue, 08 Apr 2003 15:56:04 -0400 Original-Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.11.6/8.11.6) with ESMTP id h38Ju2s32079; Tue, 8 Apr 2003 22:56:02 +0300 Original-Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.12.5/8.12.5) with ESMTP id h38Ju1tB006231; Tue, 8 Apr 2003 22:56:02 +0300 Original-Received: (from root@localhost) by beta.mvs.co.il (8.12.5/8.12.5/Submit) id h38Ju1H6006224; Tue, 8 Apr 2003 22:56:01 +0300 Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Tue, 08 Apr 2003 02:45:45 -0400) X-Mailer: Emacs 21.3.1 rmail (send-msg 1.108) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13043 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13043 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 08 Apr 2003 02:45:45 -0400, Richard Stallman 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-----