Mercurial > emacs
comparison lisp/faces.el @ 8377:4ac21edb9f78
(face-initialize): Use underlining for region face
if there's no gray.
(face-try-color-list): Support `underline' in color list.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 29 Jul 1994 21:03:37 +0000 |
parents | 9e650e1fe909 |
children | 3043fef029a7 |
comparison
equal
deleted
inserted
replaced
8376:b84147ed033d | 8377:4ac21edb9f78 |
---|---|
779 (make-face-bold 'bold t) | 779 (make-face-bold 'bold t) |
780 (make-face-italic 'italic t) | 780 (make-face-italic 'italic t) |
781 (make-face-bold-italic 'bold-italic t) | 781 (make-face-bold-italic 'bold-italic t) |
782 | 782 |
783 (set-face-background 'highlight '("darkseagreen2" "green" t) t) | 783 (set-face-background 'highlight '("darkseagreen2" "green" t) t) |
784 (set-face-background 'region '("gray" t) t) | 784 (set-face-background 'region '("gray" underline) t) |
785 (set-face-background 'secondary-selection '("paleturquoise" "green" t) t) | 785 (set-face-background 'secondary-selection '("paleturquoise" "green" t) t) |
786 (set-face-background 'modeline '(t) t) | 786 (set-face-background 'modeline '(t) t) |
787 (set-face-underline-p 'underline t t) | 787 (set-face-underline-p 'underline t t) |
788 | 788 |
789 ;; Set up the faces of all existing X Window frames | 789 ;; Set up the faces of all existing X Window frames |
922 (if (cdr colors) | 922 (if (cdr colors) |
923 ;; If there are more colors to try, catch errors | 923 ;; If there are more colors to try, catch errors |
924 ;; and set `done' if we succeed. | 924 ;; and set `done' if we succeed. |
925 (condition-case nil | 925 (condition-case nil |
926 (progn | 926 (progn |
927 (if (eq (car colors) t) | 927 (cond ((eq (car colors) t) |
928 (invert-face face frame) | 928 (invert-face face frame)) |
929 (funcall function face (car colors) frame)) | 929 ((eq (car colors) 'underline) |
930 (set-face-underline-p face t frame)) | |
931 (t | |
932 (funcall function face (car colors) frame))) | |
930 (setq done t)) | 933 (setq done t)) |
931 (error nil)) | 934 (error nil)) |
932 ;; If this is the last color, let the error get out if it fails. | 935 ;; If this is the last color, let the error get out if it fails. |
933 ;; If it succeeds, we will exit anyway after this iteration. | 936 ;; If it succeeds, we will exit anyway after this iteration. |
934 (if (eq (car colors) t) | 937 (cond ((eq (car colors) t) |
935 (invert-face face frame) | 938 (invert-face face frame)) |
936 (funcall function face (car colors) frame)))) | 939 ((eq (car colors) 'underline) |
940 (set-face-underline-p face t frame)) | |
941 (t | |
942 (funcall function face (car colors) frame))))) | |
937 (setq colors (cdr colors))))))) | 943 (setq colors (cdr colors))))))) |
938 | 944 |
939 ;; If we are already using x-window frames, initialize faces for them. | 945 ;; If we are already using x-window frames, initialize faces for them. |
940 (if (eq (framep (selected-frame)) 'x) | 946 (if (eq (framep (selected-frame)) 'x) |
941 (face-initialize)) | 947 (face-initialize)) |