emacs-devel
[Top][All Lists]
Advanced

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

Re: avoid using (type tty) in ediff [was: Re: avoid using (type tty) in


From: Dan Nicolaescu
Subject: Re: avoid using (type tty) in ediff [was: Re: avoid using (type tty) in defface]
Date: Thu, 16 Sep 2004 14:53:31 -0700

Dan Nicolaescu <address@hidden> writes:

  > Hi, 
  >
  > Could you please take a look at the ediff patch at: 
  >
  > http://mail.gnu.org/archive/html/emacs-devel/2004-05/msg00158.html
  >
  > and say it it's OK? 
  >
  > Please let me know if you want any changes or clarifications.
  >

Following up to my old message... 
After the above message Michael Kifer, Eli and I had an offlist
discussion about this patch. After some changes Michael agreed with
the changes.  The final version of the patch is below. It would be good
if someone could check it in. Thanks.

2004-05-03  Dan Nicolaescu  <address@hidden>

        * ediff-init.el (ediff-current-diff-face-A)
        (ediff-current-diff-face-B, ediff-current-diff-face-C)
        (ediff-current-diff-face-Ancestor) 
        (ediff-fine-diff-face-A)
        (ediff-fine-diff-face-B, ediff-fine-diff-face-C)
        (ediff-fine-diff-face-Ancestor) 
        (ediff-even-diff-face-A)
        (ediff-even-diff-face-B, ediff-even-diff-face-C)
        (ediff-even-diff-face-Ancestor) 
        (ediff-odd-diff-face-A)
        (ediff-odd-diff-face-B, ediff-odd-diff-face-C)
        (ediff-odd-diff-face-Ancestor):  Use min-colors.


Index: ediff-init.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ediff-init.el,v
retrieving revision 1.64
diff -c -3 -p -c -r1.64 ediff-init.el
*** ediff-init.el       26 Mar 2004 15:16:42 -0000      1.64
--- ediff-init.el       16 Sep 2004 21:50:47 -0000
*************** to temp files when Ediff needs to find f
*** 902,910 ****
  
  
  (defface ediff-current-diff-face-A
!   '((((type tty))    (:foreground "blue3" :background "yellow3"))
!     (((class color)) (:foreground "firebrick" :background "pale green"))
!     (t                     (:inverse-video t)))
    "Face for highlighting the selected difference in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 902,916 ----
  
  
  (defface ediff-current-diff-face-A
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "firebrick" :background "pale green"))
!       (((class color))
!        (:foreground "blue3" :background "yellow3"))
!       (t                   (:inverse-video t)))
!     '((((type tty))    (:foreground "blue3" :background "yellow3"))
!       (((class color)) (:foreground "firebrick" :background "pale green"))
!       (t                   (:inverse-video t))))
    "Face for highlighting the selected difference in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 925,934 ****
  
  
  (defface ediff-current-diff-face-B
!   '((((type tty))    (:foreground "magenta3" :background "yellow3"
!                                 :weight bold))
!     (((class color)) (:foreground "DarkOrchid" :background "Yellow"))
!     (t                     (:inverse-video t)))
    "Face for highlighting the selected difference in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 931,947 ----
  
  
  (defface ediff-current-diff-face-B
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "DarkOrchid" :background "Yellow"))
!       (((class color))
!        (:foreground "magenta3" :background "yellow3"
!                     :weight bold))
!       (t                   (:inverse-video t)))
!     '((((type tty))    (:foreground "magenta3" :background "yellow3"
!                                   :weight bold))
!       (((class color)) (:foreground "DarkOrchid" :background "Yellow"))
!       (t                   (:inverse-video t))))
    "Face for highlighting the selected difference in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 948,956 ****
  
  
  (defface ediff-current-diff-face-C
!   '((((type tty))    (:foreground "cyan3" :background "yellow3" :weight bold))
!     (((class color)) (:foreground "Navy" :background "Pink"))
!     (t                     (:inverse-video t)))
    "Face for highlighting the selected difference in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 961,975 ----
  
  
  (defface ediff-current-diff-face-C
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "Navy" :background "Pink"))
!       (((class color))
!        (:foreground "cyan3" :background "yellow3" :weight bold))
!       (t                   (:inverse-video t)))
!     '((((type tty))    (:foreground "cyan3" :background "yellow3" :weight 
bold))
!       (((class color)) (:foreground "Navy" :background "Pink"))
!       (t                   (:inverse-video t))))
    "Face for highlighting the selected difference in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 970,978 ****
  
  
  (defface ediff-current-diff-face-Ancestor
!   '((((type tty))    (:foreground "black" :background "magenta3"))
!     (((class color)) (:foreground "Black" :background "VioletRed"))
!     (t (:inverse-video t)))
    "Face for highlighting the selected difference in buffer Ancestor."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 989,1003 ----
  
  
  (defface ediff-current-diff-face-Ancestor
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "Black" :background "VioletRed"))
!       (((class color))
!        (:foreground "black" :background "magenta3"))
!       (t (:inverse-video t)))
!     '((((type tty))    (:foreground "black" :background "magenta3"))
!       (((class color)) (:foreground "Black" :background "VioletRed"))
!       (t (:inverse-video t))))
    "Face for highlighting the selected difference in buffer Ancestor."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 992,1000 ****
  
  
  (defface ediff-fine-diff-face-A
!   '((((type tty))    (:foreground "white" :background "sky blue" :weight 
bold))
!     (((class color)) (:foreground "Navy" :background "sky blue"))
!     (t (:underline t :stipple "gray3")))
    "Face for highlighting the refinement of the selected diff in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1017,1031 ----
  
  
  (defface ediff-fine-diff-face-A
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "Navy" :background "sky blue"))
!       (((class color))
!        (:foreground "white" :background "sky blue" :weight bold))
!       (t (:underline t :stipple "gray3")))
!     '((((type tty))    (:foreground "white" :background "sky blue" :weight 
bold))
!       (((class color)) (:foreground "Navy" :background "sky blue"))
!       (t (:underline t :stipple "gray3"))))
    "Face for highlighting the refinement of the selected diff in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1007,1015 ****
  (ediff-hide-face 'ediff-fine-diff-face-A)
  
  (defface ediff-fine-diff-face-B
!   '((((type tty))    (:foreground "magenta3" :background "cyan3"))
!     (((class color)) (:foreground "Black" :background "cyan"))
!     (t                     (:underline t :stipple "gray3")))
    "Face for highlighting the refinement of the selected diff in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1038,1052 ----
  (ediff-hide-face 'ediff-fine-diff-face-A)
  
  (defface ediff-fine-diff-face-B
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "Black" :background "cyan"))
!       (((class color))
!        (:foreground "magenta3" :background "cyan3"))
!       (t                   (:underline t :stipple "gray3")))
!     '((((type tty))    (:foreground "magenta3" :background "cyan3"))
!       (((class color)) (:foreground "Black" :background "cyan"))
!       (t                   (:underline t :stipple "gray3"))))
    "Face for highlighting the refinement of the selected diff in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1022,1032 ****
  (ediff-hide-face 'ediff-fine-diff-face-B)
  
  (defface ediff-fine-diff-face-C
!   '((((type tty))    (:foreground "yellow3" :background "Turquoise"
!                                 :weight bold))
!     (((type pc))     (:foreground "white" :background "Turquoise"))
!     (((class color)) (:foreground "Black" :background "Turquoise"))
!     (t (:underline t :stipple "gray3")))
    "Face for highlighting the refinement of the selected diff in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1059,1078 ----
  (ediff-hide-face 'ediff-fine-diff-face-B)
  
  (defface ediff-fine-diff-face-C
!   (if ediff-emacs-p
!       '((((type pc))
!        (:foreground "white" :background "Turquoise"))
!       (((class color) (min-colors 16))
!        (:foreground "Black" :background "Turquoise"))
!       (((class color))
!        (:foreground "yellow3" :background "Turquoise"
!                     :weight bold))
!       (t (:underline t :stipple "gray3")))
!     '((((type tty))    (:foreground "yellow3" :background "Turquoise"
!                                   :weight bold))
!       (((type pc))     (:foreground "white" :background "Turquoise"))
!       (((class color)) (:foreground "Black" :background "Turquoise"))
!       (t (:underline t :stipple "gray3"))))
    "Face for highlighting the refinement of the selected diff in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1039,1047 ****
  (ediff-hide-face 'ediff-fine-diff-face-C)
  
  (defface ediff-fine-diff-face-Ancestor
!   '((((type tty))    (:foreground "red3" :background "green"))
!     (((class color)) (:foreground "Black" :background "Green"))
!     (t                     (:underline t :stipple "gray3")))
    "Face for highlighting the refinement of the selected diff in the ancestor 
buffer.
  At present, this face is not used and no fine differences are computed for the
  ancestor buffer."
--- 1085,1099 ----
  (ediff-hide-face 'ediff-fine-diff-face-C)
  
  (defface ediff-fine-diff-face-Ancestor
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "Black" :background "Green"))
!       (((class color))
!        (:foreground "red3" :background "green"))
!       (t                   (:underline t :stipple "gray3")))
!     '((((type tty))    (:foreground "red3" :background "green"))
!       (((class color)) (:foreground "Black" :background "Green"))
!       (t                   (:underline t :stipple "gray3"))))
    "Face for highlighting the refinement of the selected diff in the ancestor 
buffer.
  At present, this face is not used and no fine differences are computed for the
  ancestor buffer."
*************** this variable represents.")
*** 1065,1075 ****
        (t "Stipple")))
  
  (defface ediff-even-diff-face-A
!   `((((type tty))    (:foreground "red3" :background "light grey"
!                                 :weight bold))
!     (((type pc))     (:foreground "green3" :background "light grey"))
!     (((class color)) (:foreground "Black" :background "light grey"))
!     (t                     (:italic t :stipple ,stipple-pixmap)))
    "Face for highlighting even-numbered non-current differences in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1117,1136 ----
        (t "Stipple")))
  
  (defface ediff-even-diff-face-A
!   (if ediff-emacs-p
!       `((((type pc))
!        (:foreground "green3" :background "light grey"))
!       (((class color) (min-colors 16))
!        (:foreground "Black" :background "light grey"))
!       (((class color))
!        (:foreground "red3" :background "light grey"
!                     :weight bold))
!       (t                   (:italic t :stipple ,stipple-pixmap)))
!     `((((type tty))    (:foreground "red3" :background "light grey"
!                                   :weight bold))
!       (((type pc))     (:foreground "green3" :background "light grey"))
!       (((class color)) (:foreground "Black" :background "light grey"))
!       (t                   (:italic t :stipple ,stipple-pixmap))))
    "Face for highlighting even-numbered non-current differences in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1082,1090 ****
  (ediff-hide-face 'ediff-even-diff-face-A)
  
  (defface ediff-even-diff-face-B
!   `((((type tty))    (:foreground "blue3" :background "Grey" :weight bold))
!     (((class color)) (:foreground "White" :background "Grey"))
!     (t                     (:italic t :stipple ,stipple-pixmap)))
    "Face for highlighting even-numbered non-current differences in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1143,1157 ----
  (ediff-hide-face 'ediff-even-diff-face-A)
  
  (defface ediff-even-diff-face-B
!   (if ediff-emacs-p
!       `((((class color) (min-colors 16)) 
!        (:foreground "White" :background "Grey"))
!       (((class color))    
!        (:foreground "blue3" :background "Grey" :weight bold))
!       (t                   (:italic t :stipple ,stipple-pixmap)))
!     `((((type tty))    (:foreground "blue3" :background "Grey" :weight bold))
!       (((class color)) (:foreground "White" :background "Grey"))
!       (t                   (:italic t :stipple ,stipple-pixmap))))
    "Face for highlighting even-numbered non-current differences in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1097,1107 ****
  (ediff-hide-face 'ediff-even-diff-face-B)
  
  (defface ediff-even-diff-face-C
!   `((((type tty))    (:foreground "yellow3" :background "light grey"
!                                 :weight bold))
!     (((type pc))     (:foreground "yellow3" :background "light grey"))
!     (((class color)) (:foreground "Black" :background "light grey"))
!     (t                     (:italic t :stipple ,stipple-pixmap)))
    "Face for highlighting even-numbered non-current differences in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1164,1183 ----
  (ediff-hide-face 'ediff-even-diff-face-B)
  
  (defface ediff-even-diff-face-C
!   (if ediff-emacs-p
!       `((((type pc))
!        (:foreground "yellow3" :background "light grey"))
!       (((class color) (min-colors 16))
!        (:foreground "Black" :background "light grey"))
!       (((class color))
!        (:foreground "yellow3" :background "light grey"
!                     :weight bold))
!       (t                   (:italic t :stipple ,stipple-pixmap)))
!     `((((type tty))    (:foreground "yellow3" :background "light grey"
!                                   :weight bold))
!       (((type pc))     (:foreground "yellow3" :background "light grey"))
!       (((class color)) (:foreground "Black" :background "light grey"))
!       (t                   (:italic t :stipple ,stipple-pixmap))))
    "Face for highlighting even-numbered non-current differences in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1114,1124 ****
  (ediff-hide-face 'ediff-even-diff-face-C)
  
  (defface ediff-even-diff-face-Ancestor
!   `((((type tty))    (:foreground "cyan3" :background "light grey"
!                                 :weight bold))
!     (((type pc))     (:foreground "cyan3" :background "light grey"))
!     (((class color)) (:foreground "White" :background "Grey"))
!     (t (:italic t :stipple ,stipple-pixmap)))
    "Face for highlighting even-numbered non-current differences in the 
ancestor buffer."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1190,1209 ----
  (ediff-hide-face 'ediff-even-diff-face-C)
  
  (defface ediff-even-diff-face-Ancestor
!   (if ediff-emacs-p
!       `((((type pc))
!        (:foreground "cyan3" :background "light grey"))
!       (((class color) (min-colors 16))
!        (:foreground "White" :background "Grey"))
!       (((class color))
!        (:foreground "cyan3" :background "light grey"
!                     :weight bold))
!       (t (:italic t :stipple ,stipple-pixmap)))
!     `((((type tty))    (:foreground "cyan3" :background "light grey"
!                                   :weight bold))
!       (((type pc))     (:foreground "cyan3" :background "light grey"))
!       (((class color)) (:foreground "White" :background "Grey"))
!       (t (:italic t :stipple ,stipple-pixmap))))
    "Face for highlighting even-numbered non-current differences in the 
ancestor buffer."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1138,1147 ****
      (Ancestor . ediff-even-diff-face-Ancestor)))
  
  (defface ediff-odd-diff-face-A
!   '((((type tty))    (:foreground "red3" :background "black" :weight bold))
!     (((type pc))     (:foreground "green3" :background "gray40"))
!     (((class color)) (:foreground "White" :background "Grey"))
!     (t                     (:italic t :stipple "gray1")))
    "Face for highlighting odd-numbered non-current differences in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1223,1240 ----
      (Ancestor . ediff-even-diff-face-Ancestor)))
  
  (defface ediff-odd-diff-face-A
!   (if ediff-emacs-p
!       '((((type pc))
!        (:foreground "green3" :background "gray40"))
!       (((class color) (min-colors 16))
!        (:foreground "White" :background "Grey"))
!       (((class color))
!        (:foreground "red3" :background "black" :weight bold))
!       (t                   (:italic t :stipple "gray1")))
!     '((((type tty))    (:foreground "red3" :background "black" :weight bold))
!       (((type pc))     (:foreground "green3" :background "gray40"))
!       (((class color)) (:foreground "White" :background "Grey"))
!       (t                   (:italic t :stipple "gray1"))))
    "Face for highlighting odd-numbered non-current differences in buffer A."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1155,1164 ****
  
  
  (defface ediff-odd-diff-face-B
!   '((((type tty))    (:foreground "cyan3" :background "black" :weight bold))
!     (((type pc))     (:foreground "White" :background "gray40"))
!     (((class color)) (:foreground "Black" :background "light grey"))
!     (t                     (:italic t :stipple "gray1")))
    "Face for highlighting odd-numbered non-current differences in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1248,1265 ----
  
  
  (defface ediff-odd-diff-face-B
!   (if ediff-emacs-p
!       '((((type pc))
!        (:foreground "White" :background "gray40"))
!       (((class color) (min-colors 16))
!        (:foreground "Black" :background "light grey"))
!       (((class color))
!        (:foreground "cyan3" :background "black" :weight bold))
!       (t                   (:italic t :stipple "gray1")))
!     '((((type tty))    (:foreground "cyan3" :background "black" :weight bold))
!       (((type pc))     (:foreground "White" :background "gray40"))
!       (((class color)) (:foreground "Black" :background "light grey"))
!       (t                   (:italic t :stipple "gray1"))))
    "Face for highlighting odd-numbered non-current differences in buffer B."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1171,1180 ****
  (ediff-hide-face 'ediff-odd-diff-face-B)
  
  (defface ediff-odd-diff-face-C
!   '((((type tty))    (:foreground "yellow3" :background "black" :weight bold))
!     (((type pc))     (:foreground "yellow3" :background "gray40"))
!     (((class color)) (:foreground "White" :background "Grey"))
!     (t                     (:italic t :stipple "gray1")))
    "Face for highlighting odd-numbered non-current differences in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1272,1289 ----
  (ediff-hide-face 'ediff-odd-diff-face-B)
  
  (defface ediff-odd-diff-face-C
!   (if ediff-emacs-p
!       '((((type pc))
!        (:foreground "yellow3" :background "gray40"))
!       (((class color) (min-colors 16))
!        (:foreground "White" :background "Grey"))
!       (((class color))
!        (:foreground "yellow3" :background "black" :weight bold))
!       (t                   (:italic t :stipple "gray1")))
!     '((((type tty))    (:foreground "yellow3" :background "black" :weight 
bold))
!       (((type pc))     (:foreground "yellow3" :background "gray40"))
!       (((class color)) (:foreground "White" :background "Grey"))
!       (t                   (:italic t :stipple "gray1"))))
    "Face for highlighting odd-numbered non-current differences in buffer C."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
*************** this variable represents.")
*** 1187,1195 ****
  (ediff-hide-face 'ediff-odd-diff-face-C)
  
  (defface ediff-odd-diff-face-Ancestor
!   '((((type tty))    (:foreground "green3" :background "black" :weight bold))
!     (((class color)) (:foreground "cyan3" :background "gray40"))
!     (t                     (:italic t :stipple "gray1")))
    "Face for highlighting odd-numbered non-current differences in the ancestor 
buffer."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,
--- 1296,1310 ----
  (ediff-hide-face 'ediff-odd-diff-face-C)
  
  (defface ediff-odd-diff-face-Ancestor
!   (if ediff-emacs-p
!       '((((class color) (min-colors 16))
!        (:foreground "cyan3" :background "gray40"))
!       (((class color))
!        (:foreground "green3" :background "black" :weight bold))
!       (t                   (:italic t :stipple "gray1")))
!     '((((type tty))    (:foreground "green3" :background "black" :weight 
bold))
!       (((class color)) (:foreground "cyan3" :background "gray40"))
!       (t                   (:italic t :stipple "gray1"))))
    "Face for highlighting odd-numbered non-current differences in the ancestor 
buffer."
    :group 'ediff-highlighting)
  ;; An internal variable.  Ediff takes the face from here.  When 
unhighlighting,







reply via email to

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