emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/faces.el,v


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/faces.el,v
Date: Sun, 30 Dec 2007 16:24:52 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       07/12/30 16:24:52

Index: faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.387
retrieving revision 1.388
diff -u -b -r1.387 -r1.388
--- faces.el    30 Dec 2007 03:32:34 -0000      1.387
+++ faces.el    30 Dec 2007 16:24:52 -0000      1.388
@@ -249,9 +249,7 @@
 If FRAME is t, report on the defaults for face FACE (for new frames).
 If FRAME is omitted or nil, use the selected frame."
   (let ((attrs
-        '(:family :width :height :weight :slant :foreground
-          :background :underline :overline :strike-through
-          :box :inverse-video))
+        (delq :inherit (mapcar 'car face-attribute-name-alist)))
        (differs nil))
     (while (and attrs (not differs))
       (let* ((attr (pop attrs))
@@ -353,6 +351,16 @@
   (symbol-name (check-face face)))
 
 
+(defun face-all-attributes (face &optional frame)
+  "Return an alist stating the attributes of FACE.
+Each element of the result has the form (ATTR-NAME . ATTR-VALUE).
+Normally the value describes the default attributes,
+but if you specify FRAME, the value describes the attributes
+of FACE on FRAME."
+  (mapcar (lambda (pair) (let ((attr (car pair)))
+                          (cons attr (face-attribute face attr frame))))
+         face-attribute-name-alist))
+
 (defun face-attribute (face attribute &optional frame inherit)
   "Return the value of FACE's ATTRIBUTE on FRAME.
 If the optional argument FRAME is given, report on face FACE in that frame.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]