Mercurial > emacs
comparison etc/NEWS @ 80265:3c73d7e0c880
Tweak frame-local variables entry.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 03 Mar 2008 03:27:06 +0000 |
parents | 22717831546c |
children | 191c9a6e1768 |
comparison
equal
deleted
inserted
replaced
80264:ff365ee5c861 | 80265:3c73d7e0c880 |
---|---|
136 | 136 |
137 ** Frame-local variables are deprecated and are slated for removal. | 137 ** Frame-local variables are deprecated and are slated for removal. |
138 They can easily be emulated. Rather than calling `make-variable-frame-local' | 138 They can easily be emulated. Rather than calling `make-variable-frame-local' |
139 and accessing the variable value directly, explicitly check for a | 139 and accessing the variable value directly, explicitly check for a |
140 frame-parameter, and if there is one, use its value in preference to | 140 frame-parameter, and if there is one, use its value in preference to |
141 that of the variable. Eg: | 141 that of the variable. Note that buffer-local values should take |
142 (let ((fp (assoc 'var (frame-parameters)))) | 142 preference over frame-local ones, so you may wish to check `local-variable-p' |
143 ;; Use frame-parameter, even if nil. | 143 first. |
144 (if fp (cdr fp) | |
145 ;; Else use normal variable value. | |
146 var)) | |
147 | 144 |
148 ** The function invisible-p returns non-nil if the character | 145 ** The function invisible-p returns non-nil if the character |
149 after a specified position is invisible. | 146 after a specified position is invisible. |
150 | 147 |
151 +++ | 148 +++ |