diff options
author | Miles Bader <[email protected]> | 2000-12-15 03:12:09 +0000 |
---|---|---|
committer | Miles Bader <[email protected]> | 2000-12-15 03:12:09 +0000 |
commit | f9056dd941331403e3a844f3e0c99824a45df526 (patch) | |
tree | 5083fb29a0734b94e6653413fd39cac71c66d703 | |
parent | c600604975f5c3dd4a2a136d9129e046e8ac153e (diff) |
(read-face-attribute): If there's no entry for the user's input in
VALID, just use it as-is (this will often result in an error, but it may
be OK for e.g. colors using hexadecimal notation, and at least will
yield a better error message).
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/faces.el | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 43d2d2af56..9a803c2e30 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2000-12-15 Miles Bader <[email protected]> + * faces.el (read-face-attribute): If there's no entry for the + user's input in VALID, just use it as-is (this will often result + in an error, but it may be OK for e.g. colors using hexadecimal + notation, and at least will yield a better error message). + * window.el (mode-line-window-height-fudge): Function removed. (height-affecting-face-attributes, mode-line-window-height-fudge): Variables removed. diff --git a/lisp/faces.el b/lisp/faces.el index 9821be0736..36bc0a48dc 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -923,13 +923,14 @@ of a global face. Value is the new attribute value." ;; Terminal frames can support colors that don't appear ;; explicitly in VALID, using color approximation code ;; in tty-colors.el. - (if (and (memq attribute '(:foreground :background)) - (not (memq window-system '(x w32 mac))) - (not (member new-value - '("unspecified" - "unspecified-fg" "unspecified-bg")))) + (when (and (memq attribute '(:foreground :background)) + (not (memq window-system '(x w32 mac))) + (not (member new-value + '("unspecified" + "unspecified-fg" "unspecified-bg")))) (setq new-value (car (tty-color-desc new-value frame)))) - (setq new-value (cdr (assoc new-value valid)))))) + (when (assoc new-value valid) + (setq new-value (cdr (assoc new-value valid))))))) ((eq valid 'integerp) (setq new-value (face-read-integer face old-value attribute-name))) (t (error "Internal error"))) |