bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6203: Frame-local variables break let-binding


From: Nathan Weizenbaum
Subject: bug#6203: Frame-local variables break let-binding
Date: Tue, 18 May 2010 14:32:43 -0700

letf and setf are okay as work-arounds, I suppose.

The package I use these for is http://github.com/nex3/perspective-el/blob/master/perspective.el. Each frame keeps track of a separate set of workspaces, as well as various other useful variables (the current workspace, previous workspace, etc.).

On Tue, May 18, 2010 at 8:29 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> But frame-parameters have to be manually managed with frame-parameter, no?

Sounds obvious, doesn't it?

> Even ignoring compatibility for user-facing configuration, it seems really
> annoying to have to call frame-parameter and set-frame-parameter all the
> time, especially if you're trying to simulate `let'.

No, it really doesn't seem particularly annoying:

  (require 'cl)
  (letf (((frame-parameter <foo>) 'newvalue)) <blabla>)

the same holds for symbol properties, process properties, window
parameters, terminal parameters, ...

> Are there at least any plans for a nicer API for working with what used to
> be frame-local variables?

BTW, since frame-parameters have been very rarely used and you seem to
use them "extensively", I'm curious: what do you use them for
(i.e. what kind of data do you keep there, and why do you need to
let-(re)bind it)?


       Stefan


reply via email to

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