aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-10-19 18:25:59 +0000
committerRichard M. Stallman1998-10-19 18:25:59 +0000
commit077fcb28faab5e21746bc04b57a033db37bef34f (patch)
treecd17d5454209cb50aeceb0704776838460611bb5
parentdf0415c50fac9bf739aa7033ae37471bc7474530 (diff)
downloademacs-077fcb28faab5e21746bc04b57a033db37bef34f.tar.gz
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.
-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."
283 (format "Set face %s %s: " face name)) 283 (format "Set face %s %s: " face name))
284 alist))) 284 alist)))
285 (cond ((equal value "none") 285 (cond ((equal value "none")
286 nil) 286 '(nil))
287 ((equal value "") 287 ((equal value "")
288 default) 288 default)
289 (t value)))) 289 (t value))))
@@ -297,6 +297,7 @@ in that frame; otherwise change each frame.
297FOREGROUND and BACKGROUND should be a colour name string (or list of strings to 297FOREGROUND and BACKGROUND should be a colour name string (or list of strings to
298try) or nil. STIPPLE should be a stipple pattern name string or nil. 298try) or nil. STIPPLE should be a stipple pattern name string or nil.
299If nil, means do not change the display attribute corresponding to that arg. 299If nil, means do not change the display attribute corresponding to that arg.
300If (nil), that means clear out the attribute.
300 301
301BOLD-P, ITALIC-P, UNDERLINE-P, and INVERSE-P specify whether 302BOLD-P, ITALIC-P, UNDERLINE-P, and INVERSE-P specify whether
302the face should be set bold, italic, underlined or in inverse-video, 303the 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."
345 (message "Face %s: %s" face 346 (message "Face %s: %s" face
346 (mapconcat 'identity 347 (mapconcat 'identity
347 (delq nil 348 (delq nil
348 (list (and foreground (concat (downcase foreground) " foreground")) 349 (list (if (equal foreground '(nil))
349 (and background (concat (downcase background) " background")) 350 " no foreground"
350 (and stipple (concat (downcase new-stipple-string) " stipple")) 351 (and foreground (concat (downcase foreground) " foreground")))
352 (if (equal background '(nil))
353 " no background"
354 (and background (concat (downcase background) " background")))
355 (if (equal stipple '(nil))
356 " no stipple"
357 (and stipple (concat (downcase new-stipple-string) " stipple")))
351 (and bold-p "bold") (and italic-p "italic") 358 (and bold-p "bold") (and italic-p "italic")
352 (and inverse-p "inverse") 359 (and inverse-p "inverse")
353 (and underline-p "underline"))) ", ")) 360 (and underline-p "underline"))) ", "))
@@ -1581,7 +1588,7 @@ examine the brightness for you."
1581 (set-face-inverse-video-p face t frame) 1588 (set-face-inverse-video-p face t frame)
1582 (let (done) 1589 (let (done)
1583 (while (and colors (not done)) 1590 (while (and colors (not done))
1584 (if (or (memq (car colors) '(t underline)) 1591 (if (or (memq (car colors) '(t underline nil))
1585 (face-color-supported-p frame (car colors) 1592 (face-color-supported-p frame (car colors)
1586 (eq function 'set-face-background))) 1593 (eq function 'set-face-background)))
1587 (if (cdr colors) 1594 (if (cdr colors)