1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

(enriched-face-ans): For a `foreground-color'

property, return '(("x-color" COLOR))' so that COLOR will be
output as a parameter of the x-color annotation.  Likewise for the
`background-color' property.  In the case of normal face
properties, don't return annotations for unspecified foreground
and background face attributes.
This commit is contained in:
Gerd Moellmann 2000-07-25 16:07:46 +00:00
parent 8ad5033be1
commit 5dcfb3f41c
2 changed files with 18 additions and 4 deletions

View File

@ -1,3 +1,15 @@
2000-07-25 Gerd Moellmann <gerd@gnu.org>
* find-dired.el: Update copyright notice.
(find-dired): Offer to kill a running `find'.
* enriched.el (enriched-face-ans): For a `foreground-color'
property, return '(("x-color" COLOR))' so that COLOR will be
output as a parameter of the x-color annotation. Likewise for the
`background-color' property. In the case of normal face
properties, don't return annotations for unspecified foreground
and background face attributes.
2000-07-25 Kenichi Handa <handa@etl.go.jp>
* language/japan-util.el (japanese-katakana-region): Fix handling

View File

@ -349,9 +349,9 @@ One annotation each for foreground color, background color, italic, etc."
(defun enriched-face-ans (face)
"Return annotations specifying FACE."
(cond ((and (consp face) (eq (car face) 'foreground-color))
(list "x-color" (cdr face)))
(list (list "x-color" (cdr face))))
((and (consp face) (eq (car face) 'background-color))
(list "x-bg-color" (cdr face)))
(list (list "x-bg-color" (cdr face))))
((string-match "^fg:" (symbol-name face))
(list (list "x-color" (substring (symbol-name face) 3))))
((string-match "^bg:" (symbol-name face))
@ -361,8 +361,10 @@ One annotation each for foreground color, background color, italic, etc."
(props (face-font face t))
(ans (cdr (format-annotate-single-property-change
'face nil props enriched-translations))))
(if fg (setq ans (cons (list "x-color" fg) ans)))
(if bg (setq ans (cons (list "x-bg-color" bg) ans)))
(unless (eq fg 'unspecified)
(setq ans (cons (list "x-color" fg) ans)))
(unless (eq bg 'unspecified)
(setq ans (cons (list "x-bg-color" bg) ans)))
ans))))
;;;