From: Glenn Morris Date: Sat, 1 Mar 2008 20:30:51 +0000 (+0000) Subject: More info on how to replace make-variable-frame-local. X-Git-Tag: emacs-pretest-22.1.92~28 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59cd993bbda67978f1c25e205b9c429cd30e267f;p=emacs.git More info on how to replace make-variable-frame-local. --- diff --git a/etc/NEWS b/etc/NEWS index 53b6d2d2732..5971c479658 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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.