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

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

how can frame-parameter proxy for make-variable-frame-local?


From: lovecraftian
Subject: how can frame-parameter proxy for make-variable-frame-local?
Date: Fri, 28 Mar 2008 13:01:10 -0700 (PDT)
User-agent: G2/1.0

I've written an elisp program that depends on frame-local variables.
But now when I compile my module, I get ...

Warning: `make-variable-frame-local' is an obsolete
    function (as of Emacs 22.2); use a frame-parameter instead.

OK. So what's the most elegant way to do this?  Here's my dumb way:

(1) To init VAR to VAL and make it frame-local for the current frame,
I do
          (modify-frame-parameters nil '(VAR . VAL))
     And then *every time* I want to reset its value, I have to do
this again?

(2) And *every time* I want to simply access its value, I have to do
     (frame-parameter nil 'VAR)

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?


reply via email to

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