summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-10-19 18:25:59 +0000
committerRichard M. Stallman <rms@gnu.org>1998-10-19 18:25:59 +0000
commit077fcb28faab5e21746bc04b57a033db37bef34f (patch)
treecd17d5454209cb50aeceb0704776838460611bb5 /lisp
parentdf0415c50fac9bf739aa7033ae37471bc7474530 (diff)
downloademacs-077fcb28faab5e21746bc04b57a033db37bef34f.tar.gz
emacs-077fcb28faab5e21746bc04b57a033db37bef34f.tar.bz2
emacs-077fcb28faab5e21746bc04b57a033db37bef34f.zip
(modify-face-read-string): Return (nil) for "none".
(modify-face): Don't get error if (nil) is the argument. (face-try-color-list): Don't check whether nil is a valid color.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/faces.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 2a817eba106..0fe0644c6dd 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -283,7 +283,7 @@ in that frame; otherwise change each frame."
(format "Set face %s %s: " face name))
alist)))
(cond ((equal value "none")
- nil)
+ '(nil))
((equal value "")
default)
(t value))))
@@ -297,6 +297,7 @@ in that frame; otherwise change each frame.
FOREGROUND and BACKGROUND should be a colour name string (or list of strings to
try) or nil. STIPPLE should be a stipple pattern name string or nil.
If nil, means do not change the display attribute corresponding to that arg.
+If (nil), that means clear out the attribute.
BOLD-P, ITALIC-P, UNDERLINE-P, and INVERSE-P specify whether
the face should be set bold, italic, underlined or in inverse-video,
@@ -345,9 +346,15 @@ If called interactively, prompts for a face name and face attributes."
(message "Face %s: %s" face
(mapconcat 'identity
(delq nil
- (list (and foreground (concat (downcase foreground) " foreground"))
- (and background (concat (downcase background) " background"))
- (and stipple (concat (downcase new-stipple-string) " stipple"))
+ (list (if (equal foreground '(nil))
+ " no foreground"
+ (and foreground (concat (downcase foreground) " foreground")))
+ (if (equal background '(nil))
+ " no background"
+ (and background (concat (downcase background) " background")))
+ (if (equal stipple '(nil))
+ " no stipple"
+ (and stipple (concat (downcase new-stipple-string) " stipple")))
(and bold-p "bold") (and italic-p "italic")
(and inverse-p "inverse")
(and underline-p "underline"))) ", "))
@@ -1581,7 +1588,7 @@ examine the brightness for you."
(set-face-inverse-video-p face t frame)
(let (done)
(while (and colors (not done))
- (if (or (memq (car colors) '(t underline))
+ (if (or (memq (car colors) '(t underline nil))
(face-color-supported-p frame (car colors)
(eq function 'set-face-background)))
(if (cdr colors)