diff options
| author | Gerd Moellmann | 2000-12-18 15:05:02 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-18 15:05:02 +0000 |
| commit | c242484757207cdfd62099c4cbfd04074e61c4a3 (patch) | |
| tree | 84611c522a2d7152550ab67666fd91322d574cc6 /lisp/faces.el | |
| parent | c5dfddb64fce3a83de49e8d96cfbca54a58da413 (diff) | |
| download | emacs-c242484757207cdfd62099c4cbfd04074e61c4a3.tar.gz emacs-c242484757207cdfd62099c4cbfd04074e61c4a3.zip | |
(face-spec-set): Interpret a nil in specs for
foreground and background colors as `unspecified', for
compatibility with 20.x.
Diffstat (limited to 'lisp/faces.el')
| -rw-r--r-- | lisp/faces.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index e93bc2ae518..491410992e9 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1230,6 +1230,10 @@ If SPEC is nil, do nothing." | |||
| 1230 | (case attribute | 1230 | (case attribute |
| 1231 | (:bold (setq attribute :weight value (if value 'bold 'normal))) | 1231 | (:bold (setq attribute :weight value (if value 'bold 'normal))) |
| 1232 | (:italic (setq attribute :slant value (if value 'italic 'normal))) | 1232 | (:italic (setq attribute :slant value (if value 'italic 'normal))) |
| 1233 | ((:foreground :background) | ||
| 1234 | ;; Compatibility with 20.x. Some bogus face specs seem to | ||
| 1235 | ;; exist containing things like `:foreground nil'. | ||
| 1236 | (if (null value) (setq value 'unspecified))) | ||
| 1233 | (t (unless (assq attribute face-x-resources) | 1237 | (t (unless (assq attribute face-x-resources) |
| 1234 | (setq attribute nil)))) | 1238 | (setq attribute nil)))) |
| 1235 | (when attribute | 1239 | (when attribute |