[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: frame-local variables weirdness
From: |
Juanma Barranquero |
Subject: |
Re: frame-local variables weirdness |
Date: |
Fri, 8 Dec 2006 03:28:17 +0100 |
I've simplified the test. Apparently, getting the value of a
frame-local variable negatively affects whether the variable will
afterwards be able to turn automatically buffer-local.
(defun test (sym bug)
(set sym 'default)
(make-variable-frame-local sym)
(modify-frame-parameters nil (list (cons sym 'frame)))
(when bug
;; Getting the value of sym changes the result
(symbol-value sym))
(make-variable-buffer-local sym)
(set sym 'local)
(list (local-variable-p sym) ;; should be t
(symbol-value sym) ;; should be 'local
(frame-parameter nil sym))) ;; should be 'frame
Note that passing t to the BUG argument only changes one thing: that
(symbol-value sym) is run.
(test 'foo nil) => (t local frame)
(test 'bar t) => (nil local local)
BTW, is there any easy way to remove a frame parameter? Testing this
bug is a PITA because you've got to use different symbols each time...
/L/e/k/t/u
Re: frame-local variables weirdness, Juanma Barranquero, 2006/12/09
Re: frame-local variables weirdness, Richard Stallman, 2006/12/11