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 [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/faces.el [lexbind]
Date: Tue, 06 Jul 2004 05:57:21 -0400

Index: emacs/lisp/faces.el
diff -c emacs/lisp/faces.el:1.266.2.7 emacs/lisp/faces.el:1.266.2.8
*** emacs/lisp/faces.el:1.266.2.7       Tue Jul  6 09:41:25 2004
--- emacs/lisp/faces.el Tue Jul  6 09:42:25 2004
***************
*** 244,282 ****
  If the optional argument FRAME is given, report on face FACE in that frame.
  If FRAME is t, report on the defaults for face FACE (for new frames).
  If FRAME is omitted or nil, use the selected frame."
!   (if (not (equal (face-font face frame) (face-font 'default frame)))
!       ;; The font is different from the default face's font, so clearly it
!       ;; differs.  This only really works on window-systems; on ttys, the
!       ;; "font" is a constant, with attributes layered on top of it.
!       :font
!     ;; General face attribute check.  On graphical displays
!     ;; `display-supports-face-attributes-p' just checks whether each
!     ;; attribute is different that the default face, so we just check to
!     ;; make sure each attribute of the merged face is not `unspecified';
!     ;; we already checked the font above, so font-related attributes are
!     ;; omitted for that reason.  On a tty,
!     ;; display-supports-face-attributes-p actually does do further
!     ;; checks, and correctly deals with the display's capabilities, so
!     ;; we use it to check all attributes.
!     (let ((attrs
!          (if (memq (framep (or frame (selected-frame))) '(x w32 mac))
!              ;; Omit font-related attributes on a window-system
!              '(:foreground :foreground :background :underline :overline
!                :strike-through :box :inverse-video :stipple)
!            ;; On a tty, check all attributes
!            '(:family :width :height :weight :slant :foreground
!              :foreground :background :underline :overline
!              :strike-through :box :inverse-video :stipple)))
!         (differs nil))
!       (while (and attrs (not differs))
!       (let* ((attr (pop attrs))
!              (attr-val (face-attribute face attr frame t)))
!         (when (and
!                (not (eq attr-val 'unspecified))
!                (display-supports-face-attributes-p (list attr attr-val)
!                                                    frame))
!           (setq differs attr))))
!       differs)))
  
  
  (defun face-nontrivial-p (face &optional frame)
--- 244,263 ----
  If the optional argument FRAME is given, report on face FACE in that frame.
  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
!          :foreground :background :underline :overline
!          :strike-through :box :inverse-video))
!       (differs nil))
!     (while (and attrs (not differs))
!       (let* ((attr (pop attrs))
!            (attr-val (face-attribute face attr frame t)))
!       (when (and
!              (not (eq attr-val 'unspecified))
!              (display-supports-face-attributes-p (list attr attr-val)
!                                                  frame))
!         (setq differs attr))))
!     differs))
  
  
  (defun face-nontrivial-p (face &optional frame)




reply via email to

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