From 60d3008e839218b3c2de242588a98da2ad532e52 Mon Sep 17 00:00:00 2001
From: Glenn Morris <rgm@gnu.org>
Date: Sat, 1 Mar 2008 20:31:09 +0000
Subject: More info on how to replace make-variable-frame-local.

---
 etc/NEWS.22 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'etc/NEWS.22')

diff --git a/etc/NEWS.22 b/etc/NEWS.22
index c97ec91fb51..5778e56ca26 100644
--- a/etc/NEWS.22
+++ b/etc/NEWS.22
@@ -135,7 +135,15 @@ because they clash with commands provided by dirtrack.el.  Use
 * Lisp Changes in Emacs 22.2.
 
 ** Frame-local variables are deprecated and are slated for removal.
-Use frame parameters instead.
+They can easily be emulated.  Rather than calling `make-variable-frame-local'
+and accessing the variable value directly, explicitly check for a
+frame-parameter, and if there is one, use its value in preference to
+that of the variable. Eg:
+(let ((fp (assoc 'var (frame-parameters))))
+  ;; Use frame-parameter, even if nil.
+  (if fp (cdr fp)
+     ;; Else use normal variable value.
+     var))
 
 ** The function invisible-p returns non-nil if the character
 after a specified position is invisible.
-- 
cgit v1.2.3