all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#812: frame-local-variable documentation
@ 2008-08-28 21:23 Nikolaj Schumacher
  2008-08-30 22:56 ` Glenn Morris
  2010-06-24 19:12 ` bug#1159: frame-local-variable problem Glenn Morris
  0 siblings, 2 replies; 5+ messages in thread
From: Nikolaj Schumacher @ 2008-08-28 21:23 UTC (permalink / raw)
  To: bug-gnu-emacs

As far as I can tell frame-local variables have been (or are about to
be) removed and currently don't work.  Given that, I find the
documentation slightly misleading.

`modify-frame-parameters' still contains this paragraph:

> The value of frame parameter FOO can also be accessed
> as a frame-local binding for the variable FOO, if you have
> enabled such bindings for that variable with
> `make-variable-frame-local'.

That should be removed, I think.


`make-variable-frame-local' has this note:

> This function is obsolete since 22.2;
> use a frame-parameter instead.

I think those two carry the notion that it's still possible to access a
frame-parameter as a variable, just by using modify-frame-parameters.

The explanation in the NEWS file is more clear in this regard:

> They can easily be emulated.  Rather than calling
> `make-variable-frame-local' and accessing the variable value directly,
> explicitly check for a frame-parameter


But I think removing the first one should avoid any confusion.


regards,
Nikolaj Schumacher







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#812: frame-local-variable documentation
  2008-08-28 21:23 bug#812: frame-local-variable documentation Nikolaj Schumacher
@ 2008-08-30 22:56 ` Glenn Morris
  2010-06-24 19:12 ` bug#1159: frame-local-variable problem Glenn Morris
  1 sibling, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2008-08-30 22:56 UTC (permalink / raw)
  To: Nikolaj Schumacher; +Cc: 812

Nikolaj Schumacher wrote:

> As far as I can tell frame-local variables have been (or are about to
> be) removed and currently don't work.

They haven't been removed and will still be in 23.1, except:
"Variables cannot be both buffer-local and frame-local any more."

However, something seems broken. This works as it should:

emacs -Q
(setq foo 'bar)

(make-variable-frame-local 'foo)
     ; [1]
(set-frame-parameter nil 'foo t)

foo  ; -> t [2]

(make-frame)

foo  ; -> bar in new frame, still t in old frame [3]


If you add an extra evaluation of `foo' at point [1] (after making it
frame local, but before adding a frame parameter), then at point [2]
you get 'bar rather than t. After you make a new frame, it starts
working (at [3]).

> `modify-frame-parameters' still contains this paragraph:
>
>> The value of frame parameter FOO can also be accessed
>> as a frame-local binding for the variable FOO, if you have
>> enabled such bindings for that variable with
>> `make-variable-frame-local'.
>
> That should be removed, I think.

I mentioned it's obsolete.

> `make-variable-frame-local' has this note:
>
>> This function is obsolete since 22.2;
>> use a frame-parameter instead.

I tweaked it.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#1159: frame-local-variable problem
  2008-08-28 21:23 bug#812: frame-local-variable documentation Nikolaj Schumacher
  2008-08-30 22:56 ` Glenn Morris
@ 2010-06-24 19:12 ` Glenn Morris
  2010-06-24 19:30   ` Chong Yidong
  1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2010-06-24 19:12 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1159


Sorry, but I don't understand why you closed this. I still see the
problem I described (in case there is any confusion, I cloned 1159
from 812. 812 is a doc bug that is indeed fixed). Problem:

    This works as it should:

    emacs -Q
    (setq foo 'bar)

    (make-variable-frame-local 'foo)
         ; [1]
    (set-frame-parameter nil 'foo t)

    foo  ; -> t [2]

    (make-frame)

    foo  ; -> bar in new frame, still t in old frame [3]


    If you add an extra evaluation of `foo' at point [1] (after making it
    frame local, but before adding a frame parameter), then at point [2]
    you get 'bar rather than t. After you make a new frame, it starts
    working (at [3]).






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#1159: frame-local-variable problem
  2010-06-24 19:12 ` bug#1159: frame-local-variable problem Glenn Morris
@ 2010-06-24 19:30   ` Chong Yidong
  2010-06-24 20:00     ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2010-06-24 19:30 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 1159

Glenn Morris <rgm@gnu.org> writes:

> Sorry, but I don't understand why you closed this. I still see the
> problem I described (in case there is any confusion, I cloned 1159
> from 812. 812 is a doc bug that is indeed fixed).

Maybe "closed" is not the appropriate word.  The point is that people
should work on something else, not this problem, since frame-local
variables are obsolete.  If you prefer to mark this as "wontfix"
instead, I won't object.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#1159: frame-local-variable problem
  2010-06-24 19:30   ` Chong Yidong
@ 2010-06-24 20:00     ` Glenn Morris
  0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2010-06-24 20:00 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1159

Chong Yidong wrote:

> Maybe "closed" is not the appropriate word.  The point is that people
> should work on something else, not this problem, since frame-local
> variables are obsolete.

Since Emacs 22.2, no less. Fair enough.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-24 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-28 21:23 bug#812: frame-local-variable documentation Nikolaj Schumacher
2008-08-30 22:56 ` Glenn Morris
2010-06-24 19:12 ` bug#1159: frame-local-variable problem Glenn Morris
2010-06-24 19:30   ` Chong Yidong
2010-06-24 20:00     ` Glenn Morris

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.