diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 29 | ||||
| -rw-r--r-- | lisp/faces.el | 24 |
2 files changed, 32 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71ee463a5b1..f22a1d6e597 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2001-04-25 Stefan Monnier <monnier@cs.yale.edu> | ||
| 2 | |||
| 3 | * faces.el (modify-face): Add compatibility for non-interactive use. | ||
| 4 | |||
| 1 | 2001-04-24 John Wiegley <johnw@gnu.org> | 5 | 2001-04-24 John Wiegley <johnw@gnu.org> |
| 2 | 6 | ||
| 3 | * eshell/esh-cmd.el (eshell-find-alias-function): Corrected the | 7 | * eshell/esh-cmd.el (eshell-find-alias-function): Corrected the |
| @@ -34,11 +38,9 @@ | |||
| 34 | * eshell/eshell.el (eshell-command): Made a few changes so that | 38 | * eshell/eshell.el (eshell-command): Made a few changes so that |
| 35 | `eshell-command' could be called programmatically. | 39 | `eshell-command' could be called programmatically. |
| 36 | 40 | ||
| 37 | * eshell/esh-mode.el: Moved `eshell-non-interactive-p' to | 41 | * eshell/esh-mode.el (eshell-non-interactive-p): Moved to eshell.el. |
| 38 | eshell.el. | ||
| 39 | 42 | ||
| 40 | * eshell/eshell.el (eshell-non-interactive-p): Moved this variable | 43 | * eshell/eshell.el (eshell-non-interactive-p): Moved from esh-mode.el. |
| 41 | here. | ||
| 42 | 44 | ||
| 43 | 2001-04-23 John Wiegley <johnw@gnu.org> | 45 | 2001-04-23 John Wiegley <johnw@gnu.org> |
| 44 | 46 | ||
| @@ -59,16 +61,16 @@ | |||
| 59 | 2001-04-23 Eli Zaretskii <eliz@is.elta.co.il> | 61 | 2001-04-23 Eli Zaretskii <eliz@is.elta.co.il> |
| 60 | 62 | ||
| 61 | * calendar/calendar.el (diary-entry-marker) | 63 | * calendar/calendar.el (diary-entry-marker) |
| 62 | (calendar-today-marker, calendar-holiday-marker): Use | 64 | (calendar-today-marker, calendar-holiday-marker): |
| 63 | display-color-p instead of window-system. | 65 | Use display-color-p instead of window-system. |
| 64 | (calendar-mode-map, calendar-mode): Use display-popup-menus-p | 66 | (calendar-mode-map, calendar-mode): Use display-popup-menus-p |
| 65 | instead of window-system. | 67 | instead of window-system. |
| 66 | (calendar-hide-window): Use display-multi-frame-p instead of | 68 | (calendar-hide-window): Use display-multi-frame-p instead of |
| 67 | window-system. | 69 | window-system. |
| 68 | 70 | ||
| 69 | * calendar/cal-x.el (calendar-two-frame-setup) | 71 | * calendar/cal-x.el (calendar-two-frame-setup) |
| 70 | (calendar-only-one-frame-setup, calendar-one-frame-setup): Use | 72 | (calendar-only-one-frame-setup, calendar-one-frame-setup): |
| 71 | display-multi-frame-p instead of window-system. | 73 | Use display-multi-frame-p instead of window-system. |
| 72 | 74 | ||
| 73 | 2001-04-23 Gerd Moellmann <gerd@gnu.org> | 75 | 2001-04-23 Gerd Moellmann <gerd@gnu.org> |
| 74 | 76 | ||
| @@ -80,14 +82,12 @@ | |||
| 80 | 2001-04-23 Alex Schroeder <alex@gnu.org> | 82 | 2001-04-23 Alex Schroeder <alex@gnu.org> |
| 81 | 83 | ||
| 82 | * goto-addr.el: Instead of defining line-beginning-position and | 84 | * goto-addr.el: Instead of defining line-beginning-position and |
| 83 | line-end-position a defalias is used for point-at-bol and | 85 | line-end-position a defalias is used for point-at-bol and point-at-eol. |
| 84 | point-at-eol. | 86 | |
| 85 | |||
| 86 | 2001-04-23 Alex Schroeder <alex@gnu.org> | 87 | 2001-04-23 Alex Schroeder <alex@gnu.org> |
| 87 | 88 | ||
| 88 | * goto-addr.el: Added XEmacs compatibility code. | 89 | * goto-addr.el: Added XEmacs compatibility code. |
| 89 | (goto-address-highlight-keymap): Made keybindings XEmacs | 90 | (goto-address-highlight-keymap): Made keybindings XEmacs compatible. |
| 90 | compatible. | ||
| 91 | 91 | ||
| 92 | 2001-04-22 Eli Zaretskii <eliz@is.elta.co.il> | 92 | 2001-04-22 Eli Zaretskii <eliz@is.elta.co.il> |
| 93 | 93 | ||
| @@ -96,8 +96,7 @@ | |||
| 96 | 2001-04-20 Alex Schroeder <alex@gnu.org> | 96 | 2001-04-20 Alex Schroeder <alex@gnu.org> |
| 97 | 97 | ||
| 98 | * sql.el (sql-escape-newlines-and-send): New function. | 98 | * sql.el (sql-escape-newlines-and-send): New function. |
| 99 | (sql-db2): Set comint-input-sender to | 99 | (sql-db2): Set comint-input-sender to sql-escape-newlines-and-send. |
| 100 | sql-escape-newlines-and-send. | ||
| 101 | 100 | ||
| 102 | 2001-04-20 Alex Schroeder <alex@gnu.org> | 101 | 2001-04-20 Alex Schroeder <alex@gnu.org> |
| 103 | 102 | ||
diff --git a/lisp/faces.el b/lisp/faces.el index 67576035930..d27da784bf1 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -966,22 +966,34 @@ Value is a property list of attribute names and new values." | |||
| 966 | result)))))) | 966 | result)))))) |
| 967 | 967 | ||
| 968 | 968 | ||
| 969 | (defun modify-face (&optional frame) | 969 | (defun modify-face (&optional face foreground background stipple |
| 970 | bold-p italic-p underline-p inverse-p frame) | ||
| 970 | "Modify attributes of faces interactively. | 971 | "Modify attributes of faces interactively. |
| 971 | If optional argument FRAME is nil or omitted, modify the face used | 972 | If optional argument FRAME is nil or omitted, modify the face used |
| 972 | for newly created frame, i.e. the global face." | 973 | for newly created frame, i.e. the global face. |
| 974 | For non-interactive use, `set-face-attribute' is preferred. | ||
| 975 | When called from elisp, if FACE is nil, all arguments but FRAME are ignored | ||
| 976 | and the face and its settings are obtained by querying the user." | ||
| 973 | (interactive) | 977 | (interactive) |
| 974 | (let ((face (read-face-name "Modify face"))) | 978 | (if face |
| 979 | (set-face-attribute face frame | ||
| 980 | :foreground (or foreground 'unspecified) | ||
| 981 | :background (or background 'unspecified) | ||
| 982 | :stipple stipple | ||
| 983 | :bold bold-p | ||
| 984 | :italic italic-p | ||
| 985 | :underline underline-p | ||
| 986 | :inverse-video inverse-p) | ||
| 987 | (setq face (read-face-name "Modify face")) | ||
| 975 | (apply #'set-face-attribute face frame | 988 | (apply #'set-face-attribute face frame |
| 976 | (read-all-face-attributes face frame)))) | 989 | (read-all-face-attributes face frame)))) |
| 977 | 990 | ||
| 978 | |||
| 979 | (defun read-face-and-attribute (attribute &optional frame) | 991 | (defun read-face-and-attribute (attribute &optional frame) |
| 980 | "Read face name and face attribute value. | 992 | "Read face name and face attribute value. |
| 981 | ATTRIBUTE is the attribute whose new value is read. | 993 | ATTRIBUTE is the attribute whose new value is read. |
| 982 | FRAME nil or unspecified means read attribute value of global face. | 994 | FRAME nil or unspecified means read attribute value of global face. |
| 983 | Value is a list (FACE NEW-VALUE) where FACE is the face read | 995 | Value is a list (FACE NEW-VALUE) where FACE is the face read |
| 984 | (a symbol), and NEW-VALUE is value read." | 996 | \(a symbol), and NEW-VALUE is value read." |
| 985 | (cond ((eq attribute :font) | 997 | (cond ((eq attribute :font) |
| 986 | (let* ((prompt "Set font-related attributes of face") | 998 | (let* ((prompt "Set font-related attributes of face") |
| 987 | (face (read-face-name prompt)) | 999 | (face (read-face-name prompt)) |
| @@ -1273,7 +1285,7 @@ If there is no default for FACE, return nil." | |||
| 1273 | 1285 | ||
| 1274 | (defsubst face-user-default-spec (face) | 1286 | (defsubst face-user-default-spec (face) |
| 1275 | "Return the user's customized face-spec for FACE, or the default if none. | 1287 | "Return the user's customized face-spec for FACE, or the default if none. |
| 1276 | If there is neither a user setting or a default for FACE, return nil." | 1288 | If there is neither a user setting nor a default for FACE, return nil." |
| 1277 | (or (get face 'saved-face) | 1289 | (or (get face 'saved-face) |
| 1278 | (face-default-spec face))) | 1290 | (face-default-spec face))) |
| 1279 | 1291 | ||