From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.bugs Subject: Re: how can frame-parameter proxy for make-variable-frame-local? Date: Sat, 29 Mar 2008 11:37:20 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1206787069 15805 80.91.229.12 (29 Mar 2008 10:37:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2008 10:37:49 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 11:38:20 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JfYS1-00078Z-Gk for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Mar 2008 11:38:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfYRP-0004kb-Ry for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Mar 2008 06:37:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfYRI-0004kA-NE for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 06:37:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfYRH-0004j8-JE for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 06:37:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfYRH-0004iz-F5 for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 06:37:31 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JfYRH-0007br-1J for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 06:37:31 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JfYRD-0002uA-S5 for bug-gnu-emacs@gnu.org; Sat, 29 Mar 2008 10:37:27 +0000 Original-Received: from remote2.student.chalmers.se ([129.16.29.80]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2008 10:37:27 +0000 Original-Received: from bojohan+news by remote2.student.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2008 10:37:27 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Original-Lines: 31 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: remote2.student.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:WpcW91+fWxLsiEr3eM2v0Ur4b0Y= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17760 Archived-At: lovecraftian@mac.com writes: > Is this correct? Can you think of a macro that will make this process > as neat as a simple `setq' (to set) and a simple token (to access)? > Or am I just fantasizing? Something like (require 'cl) (defmacro with-frame-parameters (vars &rest body) (declare (indent 1) (debug ((&rest symbolp) body))) `(symbol-macrolet ,(mapcar (lambda (v) `(,v (frame-parameter nil ',v))) vars) ,@body)) (macroexpand '(with-frame-parameters (foo bar) (setq foo 0) (setq bar 1) foo)) => (progn (set-frame-parameter nil 'foo 0) (set-frame-parameter nil 'bar 1) (frame-parameter nil 'foo)) -- Johan Bockgård