emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/font-lock.el


From: Dan Nicolaescu
Subject: [Emacs-diffs] Changes to emacs/lisp/font-lock.el
Date: Sat, 05 Nov 2005 02:29:49 -0500

Index: emacs/lisp/font-lock.el
diff -c emacs/lisp/font-lock.el:1.281 emacs/lisp/font-lock.el:1.282
*** emacs/lisp/font-lock.el:1.281       Thu Nov  3 22:29:43 2005
--- emacs/lisp/font-lock.el     Sat Nov  5 07:29:45 2005
***************
*** 1646,1682 ****
  
  ;;; Colour etc. support.
  
! ;; Originally face attributes were specified via `font-lock-face-attributes'.
! ;; Users then changed the default face attributes by setting that variable.
! ;; However, we try and be back-compatible and respect its value if set except
! ;; for faces where M-x customize has been used to save changes for the face.
! (when (boundp 'font-lock-face-attributes)
!   (let ((face-attributes font-lock-face-attributes))
!     (while face-attributes
!       (let* ((face-attribute (pop face-attributes))
!            (face (car face-attribute)))
!       ;; Rustle up a `defface' SPEC from a `font-lock-face-attributes' entry.
!       (unless (get face 'saved-face)
!         (let ((foreground (nth 1 face-attribute))
!               (background (nth 2 face-attribute))
!               (bold-p (nth 3 face-attribute))
!               (italic-p (nth 4 face-attribute))
!               (underline-p (nth 5 face-attribute))
!               face-spec)
!           (when foreground
!             (setq face-spec (cons ':foreground (cons foreground face-spec))))
!           (when background
!             (setq face-spec (cons ':background (cons background face-spec))))
!           (when bold-p
!             (setq face-spec (append '(:weight bold) face-spec)))
!           (when italic-p
!             (setq face-spec (append '(:slant italic) face-spec)))
!           (when underline-p
!             (setq face-spec (append '(:underline t) face-spec)))
!           (custom-declare-face face (list (list t face-spec)) nil)))))))
! 
! ;; But now we do it the custom way.  Note that `defface' will not overwrite 
any
! ;; faces declared above via `custom-declare-face'.
  (defface font-lock-comment-face
    '((((class grayscale) (background light))
       (:foreground "DimGray" :weight bold :slant italic))
--- 1646,1653 ----
  
  ;;; Colour etc. support.
  
! ;; Note that `defface' will not overwrite any faces declared above via
! ;; `custom-declare-face'.
  (defface font-lock-comment-face
    '((((class grayscale) (background light))
       (:foreground "DimGray" :weight bold :slant italic))




reply via email to

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