Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
421c91e5
Commit
421c91e5
authored
Jun 04, 2004
by
Miles Bader
Browse files
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-368
Improve display-supports-face-attributes-p on non-ttys
parent
3dfbc6d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/faces.el
lisp/faces.el
+19
-5
No files found.
lisp/ChangeLog
View file @
421c91e5
2004-06-04 Miles Bader <miles@gnu.org>
* faces.el (display-supports-face-attributes-p): Implement a
`different from default' check for non-tty displays.
2004-06-03 David Kastrup <dak@gnu.org>
* woman.el (woman-mapcan): More concise code.
...
...
lisp/faces.el
View file @
421c91e5
...
...
@@ -1510,11 +1510,25 @@ face for italic."
(
if
(
framep
display
)
display
(
car
(
frames-on-display-list
display
)))))
;; For now, we assume that non-tty displays can support everything.
;; Later, we should add the ability to query about specific fonts,
;; colors, etc.
(
or
(
memq
(
framep
frame
)
'
(
x
w32
mac
))
(
tty-supports-face-attributes-p
attributes
frame
))))
(
if
(
not
(
memq
(
framep
frame
)
'
(
x
w32
mac
)))
;; On ttys, `tty-supports-face-attributes-p' does all the work we need.
(
tty-supports-face-attributes-p
attributes
frame
)
;; For now, we assume that non-tty displays can support everything,
;; and so we just check to see if any of the specified attributes is
;; different from the default -- though this probably isn't always
;; accurate for font-related attributes. Later, we should add the
;; ability to query about specific fonts, colors, etc.
(
while
(
and
attributes
(
let*
((
attr
(
car
attributes
))
(
val
(
cadr
attributes
))
(
default-val
(
face-attribute
'default
attr
frame
)))
(
if
(
and
(
stringp
val
)
(
stringp
default-val
))
;; compare string attributes case-insensitively
(
eq
(
compare-strings
val
nil
nil
default-val
nil
nil
t
)
t
)
(
equal
val
default-val
))))
(
setq
attributes
(
cddr
attributes
)))
(
not
(
null
attributes
)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment