aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-05-09 23:48:41 +0000
committerJim Blandy1993-05-09 23:48:41 +0000
commitf0138172cd6b3bdd79b432e8eb09976029a6bca4 (patch)
tree67fd96b20a672861eb088b7811eea6985de46241
parentbb9a81fcdaeca9fbb65e9a70940528e2867b08cd (diff)
downloademacs-f0138172cd6b3bdd79b432e8eb09976029a6bca4.tar.gz
emacs-f0138172cd6b3bdd79b432e8eb09976029a6bca4.zip
* faces.el: Call internal-set-face-1, not internat-set-face-1.
* faces.el: Don't set frame-creation-function here; x-win.el is the appropriate place to set it. * faces.el: Only apply x-initialize-frame-faces to X frames; pass over terminal frames. * faces.el: Provide 'faces.
-rw-r--r--lisp/faces.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 60de2e84817..a7a10d60796 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -102,12 +102,12 @@ Otherwise report on the defaults for face FACE (for new frames)."
102 (aref (internal-get-face face frame) 7)) 102 (aref (internal-get-face face frame) 7))
103 103
104 104
105(defun internat-set-face-1 (face name value index frame) 105(defun internal-set-face-1 (face name value index frame)
106 (let ((inhibit-quit t)) 106 (let ((inhibit-quit t))
107 (if (null frame) 107 (if (null frame)
108 (let ((frames (frame-list))) 108 (let ((frames (frame-list)))
109 (while frames 109 (while frames
110 (internat-set-face-1 (face-name face) name value index (car frames)) 110 (internal-set-face-1 (face-name face) name value index (car frames))
111 (setq frames (cdr frames))) 111 (setq frames (cdr frames)))
112 (aset (internal-get-face (if (symbolp face) face (face-name face)) t) 112 (aset (internal-get-face (if (symbolp face) face (face-name face)) t)
113 index value) 113 index value)
@@ -146,21 +146,21 @@ Otherwise report on the defaults for face FACE (for new frames)."
146If the optional FRAME argument is provided, change only 146If the optional FRAME argument is provided, change only
147in that frame; otherwise change each frame." 147in that frame; otherwise change each frame."
148 (interactive (internal-face-interactive "font")) 148 (interactive (internal-face-interactive "font"))
149 (internat-set-face-1 face 'font font 3 frame)) 149 (internal-set-face-1 face 'font font 3 frame))
150 150
151(defsubst set-face-foreground (face color &optional frame) 151(defsubst set-face-foreground (face color &optional frame)
152 "Change the foreground color of face FACE to COLOR (a string). 152 "Change the foreground color of face FACE to COLOR (a string).
153If the optional FRAME argument is provided, change only 153If the optional FRAME argument is provided, change only
154in that frame; otherwise change each frame." 154in that frame; otherwise change each frame."
155 (interactive (internal-face-interactive "foreground")) 155 (interactive (internal-face-interactive "foreground"))
156 (internat-set-face-1 face 'foreground color 4 frame)) 156 (internal-set-face-1 face 'foreground color 4 frame))
157 157
158(defsubst set-face-background (face color &optional frame) 158(defsubst set-face-background (face color &optional frame)
159 "Change the background color of face FACE to COLOR (a string). 159 "Change the background color of face FACE to COLOR (a string).
160If the optional FRAME argument is provided, change only 160If the optional FRAME argument is provided, change only
161in that frame; otherwise change each frame." 161in that frame; otherwise change each frame."
162 (interactive (internal-face-interactive "background")) 162 (interactive (internal-face-interactive "background"))
163 (internat-set-face-1 face 'background color 5 frame)) 163 (internal-set-face-1 face 'background color 5 frame))
164 164
165(defsubst set-face-background-pixmap (face name &optional frame) 165(defsubst set-face-background-pixmap (face name &optional frame)
166 "Change the background pixmap of face FACE to PIXMAP. 166 "Change the background pixmap of face FACE to PIXMAP.
@@ -174,14 +174,14 @@ and DATA is a string, containing the raw bits of the bitmap.
174If the optional FRAME argument is provided, change only 174If the optional FRAME argument is provided, change only
175in that frame; otherwise change each frame." 175in that frame; otherwise change each frame."
176 (interactive (internal-face-interactive "background-pixmap")) 176 (interactive (internal-face-interactive "background-pixmap"))
177 (internat-set-face-1 face 'background-pixmap name 6 frame)) 177 (internal-set-face-1 face 'background-pixmap name 6 frame))
178 178
179(defsubst set-face-underline-p (face underline-p &optional frame) 179(defsubst set-face-underline-p (face underline-p &optional frame)
180 "Specify whether face FACE is underlined. (Yes if UNDERLINE-P is non-nil.) 180 "Specify whether face FACE is underlined. (Yes if UNDERLINE-P is non-nil.)
181If the optional FRAME argument is provided, change only 181If the optional FRAME argument is provided, change only
182in that frame; otherwise change each frame." 182in that frame; otherwise change each frame."
183 (interactive (internal-face-interactive "underline-p" "underlined")) 183 (interactive (internal-face-interactive "underline-p" "underlined"))
184 (internat-set-face-1 face 'underline underline-p 7 frame)) 184 (internal-set-face-1 face 'underline underline-p 7 frame))
185 185
186 186
187(defun make-face (name) 187(defun make-face (name)
@@ -730,12 +730,13 @@ If NOERROR is non-nil, return nil on failure."
730;;; (set-face-foreground modeline (face-foreground default frame) frame)) 730;;; (set-face-foreground modeline (face-foreground default frame) frame))
731 frame)) 731 frame))
732 732
733(setq frame-creation-function 'x-create-frame-with-faces)
734
735;; Set up the faces of all existing frames. 733;; Set up the faces of all existing frames.
736(let ((frames (frame-list))) 734(let ((frames (frame-list)))
737 (while frames 735 (while frames
738 (x-initialize-frame-faces (car frames)) 736 (if (eq (framep (car frames)) 'x)
737 (x-initialize-frame-faces (car frames)))
739 (setq frames (cdr frames)))) 738 (setq frames (cdr frames))))
740 739
740(provide 'faces)
741
741;;; faces.el ends here 742;;; faces.el ends here