Mercurial > hg > xemacs-beta
changeset 5597:79a1a759ec3d
Prevent bogus caching of background in custom-properties
author | Vin Shelton <acs@xemacs.org> |
---|---|
date | Tue, 15 Nov 2011 20:19:20 -0500 |
parents | 3b1d4fa716a4 |
children | bccc91a65536 |
files | lisp/ChangeLog lisp/faces.el |
diffstat | 2 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Nov 13 17:13:52 2011 +0000 +++ b/lisp/ChangeLog Tue Nov 15 20:19:20 2011 -0500 @@ -1,4 +1,11 @@ 2011-11-09 Aidan Kehoe <kehoea@parhasard.net> +2011-11-14 Vin Shelton <acs@xemacs.org> + + * faces.el: When the default background was changed from light to + dark or vice versa, the custom-property cache maintained the old + value, preventing face definitions from choosing the proper + values. Patch from Aidan Kehoe. + * help.el (describe-function-1): When printing compiled functions, mention whether they're
--- a/lisp/faces.el Sun Nov 13 17:13:52 2011 +0000 +++ b/lisp/faces.el Tue Nov 15 20:19:20 2011 -0500 @@ -1586,7 +1586,6 @@ (device-type (frame-device frame))) 'class (device-class (frame-device frame)) 'background (or frame-background-mode - (frame-property frame 'background-mode) (get-frame-background-mode frame)))) (defcustom init-face-from-resources t @@ -1647,15 +1646,7 @@ (defun get-custom-frame-properties (&optional frame) "Return a plist with the frame properties of FRAME used by custom. If FRAME is nil, return the default frame properties." - (cond (frame - ;; Try to get from cache. - (let ((cache (frame-property frame 'custom-properties))) - (unless cache - ;; Oh well, get it then. - (setq cache (extract-custom-frame-properties frame)) - ;; and cache it... - (set-frame-property frame 'custom-properties cache)) - cache)) + (cond (frame (extract-custom-frame-properties frame)) (default-custom-frame-properties) (t (setq default-custom-frame-properties