unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* frame-local variables weirdness
@ 2006-12-05 13:41 Juanma Barranquero
  2006-12-08  2:28 ` Juanma Barranquero
                   ` (2 more replies)
  0 siblings, 3 replies; 67+ messages in thread
From: Juanma Barranquero @ 2006-12-05 13:41 UTC (permalink / raw)


After making a variable frame-local, and then buffer-local (with
`make-variable-buffer-local', not `make-local-variable') it is not
possible to set a buffer-local value for the variable:

  ELISP> (setq foo 'default)
 default
  ELISP> (make-variable-frame-local 'foo)
 foo
  ELISP> (modify-frame-parameters nil '((foo . frame)))
 nil
  ELISP> foo
 frame
  ELISP> (make-variable-buffer-local 'foo)
 foo
  ELISP> (setq foo 'bug)
 bug
  ELISP> foo
 bug
  ELISP> (frame-parameter nil 'foo)
 bug
  ELISP> (local-variable-p 'foo)
 nil

However, that doesn't happen if we first make it buffer-local, and
then frame-local:

  ELISP> (setq bar 'default)
 default
  ELISP> (make-variable-buffer-local 'bar)
 bar
  ELISP> (setq bar 'buffer)
 buffer
  ELISP> (local-variable-p 'bar)
 t
  ELISP> (make-variable-frame-local 'bar)
 bar
  ELISP> (modify-frame-parameters nil '((bar . frame)))
 nil
  ELISP> bar
 buffer
  ELISP> (kill-local-variable 'bar)
 bar
  ELISP> bar
 frame

BTW, is there a way to know when a variable is frame local?
`frame-parameter' is not enough (it could be a frame parameter and yet
not a frame local variable).

                    /L/e/k/t/u

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

end of thread, other threads:[~2007-11-06 10:48 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-05 13:41 frame-local variables weirdness Juanma Barranquero
2006-12-08  2:28 ` Juanma Barranquero
2006-12-09  1:26   ` Richard Stallman
2006-12-09 14:11     ` Juanma Barranquero
2006-12-10  4:24       ` Richard Stallman
2006-12-10 12:58         ` Juanma Barranquero
2007-10-11  9:42   ` Juanma Barranquero
2007-10-11 14:21     ` Stefan Monnier
2007-10-11 14:37       ` Juanma Barranquero
2007-10-11 17:33         ` Stefan Monnier
2007-10-11 19:00           ` Juanma Barranquero
2007-10-12 15:59     ` Richard Stallman
2007-10-12 16:33       ` Stefan Monnier
2007-10-14 16:29         ` Richard Stallman
2007-10-14 17:13           ` Juanma Barranquero
2007-10-14 17:51           ` David Kastrup
2007-10-15 16:04             ` Richard Stallman
2007-10-15 17:50               ` Stefan Monnier
2007-10-17 17:29                 ` Stephen J. Turnbull
2007-10-17 18:05                   ` Stefan Monnier
2007-10-18  5:03                     ` Richard Stallman
2007-10-18 13:53                       ` Stefan Monnier
2007-10-19  5:40                         ` Richard Stallman
2007-10-19 13:56                           ` Stefan Monnier
2007-10-20  3:30                             ` Richard Stallman
2007-10-20 13:15                               ` Stefan Monnier
2007-10-21  7:25                                 ` Richard Stallman
2007-10-21 14:24                                   ` Stefan Monnier
2007-10-21 14:56                                     ` Miles Bader
2007-10-21 19:20                                       ` Stefan Monnier
2007-10-22  2:26                                         ` Miles Bader
2007-10-22  9:01                                     ` Richard Stallman
2007-10-17 21:03                   ` David Kastrup
2007-10-19  1:57                     ` Stephen J. Turnbull
2007-10-17 23:53                 ` Stefan Monnier
2007-10-18 12:45                   ` Juanma Barranquero
2007-10-18 13:38                     ` Stefan Monnier
2007-10-18 13:45                       ` Juanma Barranquero
2007-10-18 14:10                         ` Johan Bockgård
2007-10-18 16:40                           ` Stefan Monnier
2007-10-19 17:42                   ` Richard Stallman
2007-10-19 18:56                     ` Stefan Monnier
2007-10-20 14:57                       ` Richard Stallman
2007-10-21  2:03                         ` Stefan Monnier
2007-10-22  9:00                           ` Richard Stallman
2007-10-22 15:28                             ` Stefan Monnier
2007-10-22 15:47                               ` Juanma Barranquero
2007-10-22 16:01                                 ` Stefan Monnier
2007-10-22 16:17                                   ` Juanma Barranquero
2007-10-23 10:38                                   ` Richard Stallman
2007-10-23 20:31                                     ` Stefan Monnier
2007-10-24  8:33                                       ` Richard Stallman
2007-10-24  8:54                                     ` Johan Bockgård
2007-11-06  4:31                   ` Chong Yidong
2007-11-06  8:37                     ` Stefan Monnier
2007-11-06 10:48                       ` Juanma Barranquero
2007-10-12 16:41       ` Juanma Barranquero
2007-10-13  6:41         ` Richard Stallman
2007-10-13 23:06           ` Juanma Barranquero
2007-10-18 12:44             ` Juanma Barranquero
2007-10-21 16:26               ` Richard Stallman
2007-10-21 16:33                 ` Juanma Barranquero
2006-12-09 14:24 ` Juanma Barranquero
2006-12-09 15:26   ` Stefan Monnier
2006-12-09 17:59     ` Juanma Barranquero
2006-12-11 14:59 ` Richard Stallman
2006-12-11 15:57   ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).