aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2002-06-10 02:15:24 +0000
committerMiles Bader2002-06-10 02:15:24 +0000
commit16320ac7d4c9eaed7c8a8b4845e8b10f9b0dd78f (patch)
tree6e989bad17e32d6f0cd09ec2a72a4a2d6df8379f /lisp
parent135f42ee4dea5dcc1202acc5ab54fb5dde2a4c1b (diff)
downloademacs-16320ac7d4c9eaed7c8a8b4845e8b10f9b0dd78f.tar.gz
emacs-16320ac7d4c9eaed7c8a8b4845e8b10f9b0dd78f.zip
(display-supports-face-attributes-p): Work correctly if DISPLAY is a frame.
(face-spec-set-match-display): Support `supports' predicate. (italic): Try underlining for displays that don't support real italics.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/faces.el18
2 files changed, 19 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 13ab17c1868..68c428f29f2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,8 @@
12002-06-05 Miles Bader <miles@gnu.org> 12002-06-10 Miles Bader <miles@gnu.org>
2 2
3 * faces.el (display-supports-face-attributes-p): New function. 3 * faces.el (display-supports-face-attributes-p): New function.
4 (face-spec-set-match-display): Support `supports' predicate.
5 (italic): Try underlining for displays that don't support real italics.
4 * term/tty-colors.el (color-name-rgb-alist): Use 16-bit RGB values 6 * term/tty-colors.el (color-name-rgb-alist): Use 16-bit RGB values
5 instead of 8-bit, for consistency with the rest of emacs. 7 instead of 8-bit, for consistency with the rest of emacs.
6 (tty-color-canonicalize): Only copy COLOR if we need to change it. 8 (tty-color-canonicalize): Only copy COLOR if we need to change it.
diff --git a/lisp/faces.el b/lisp/faces.el
index 83832f2b47f..3e4d44709b2 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1318,6 +1318,8 @@ If FRAME is nil, the current FRAME is used."
1318 ((eq req 'background) 1318 ((eq req 'background)
1319 (memq (frame-parameter frame 'background-mode) 1319 (memq (frame-parameter frame 'background-mode)
1320 options)) 1320 options))
1321 ((eq req 'supports)
1322 (display-supports-face-attributes-p options frame))
1321 (t (error "Unknown req `%S' with options `%S'" 1323 (t (error "Unknown req `%S' with options `%S'"
1322 req options))))) 1324 req options)))))
1323 match)) 1325 match))
@@ -1494,7 +1496,10 @@ any display that can display bold, and a `:foreground \"yellow\"' as long
1494as it can display a yellowish color, but `:slant italic' will _not_ be 1496as it can display a yellowish color, but `:slant italic' will _not_ be
1495satisified by the tty display code's automatic substitution of a `dim' 1497satisified by the tty display code's automatic substitution of a `dim'
1496face for italic." 1498face for italic."
1497 (let ((frame (car (frames-on-display-list display)))) 1499 (let ((frame
1500 (if (framep display)
1501 display
1502 (car (frames-on-display-list display)))))
1498 ;; For now, we assume that non-tty displays can support everything. 1503 ;; For now, we assume that non-tty displays can support everything.
1499 ;; Later, we should add the ability to query about specific fonts, 1504 ;; Later, we should add the ability to query about specific fonts,
1500 ;; colors, etc. 1505 ;; colors, etc.
@@ -1938,7 +1943,16 @@ created."
1938 :group 'basic-faces) 1943 :group 'basic-faces)
1939 1944
1940 1945
1941(defface italic '((t :slant italic)) 1946(defface italic
1947 '((((supports :slant italic))
1948 :slant italic)
1949 (((supports :underline t))
1950 :underline t)
1951 (t
1952 ;; default to italic, even it doesn't appear to be supported,
1953 ;; because in some cases the display engine will do it's own
1954 ;; workaround (to `dim' on ttys)
1955 :slant italic))
1942 "Basic italic font." 1956 "Basic italic font."
1943 :group 'basic-faces) 1957 :group 'basic-faces)
1944 1958