emacs-diffs
[Top][All Lists]
Advanced

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

feature/integration-of-dictionary-el 99a7e91 3/3: Don't check for existe


From: Torsten Hilbrich
Subject: feature/integration-of-dictionary-el 99a7e91 3/3: Don't check for existence of defface
Date: Thu, 8 Oct 2020 13:56:25 -0400 (EDT)

branch: feature/integration-of-dictionary-el
commit 99a7e918c82c0d5c39a729668ac582a945877900
Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
Commit: Torsten Hilbrich <torsten.hilbrich@gmx.net>

    Don't check for existence of defface
    
    * lisp/net/dictionary.el: defface has been available in Emacs for quite
    some time now. No need to check it before using it.
---
 lisp/net/dictionary.el | 105 ++++++++++++++++++++++---------------------------
 1 file changed, 47 insertions(+), 58 deletions(-)

diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index 6ba1cc2..a0e43b8 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -216,64 +216,53 @@ is utf-8"
                                )))
   :version "28.1")
 
-(if (fboundp 'defface)
-    (progn
-
-      (defface dictionary-word-definition-face
-       '((((supports (:family "DejaVu Serif")))
-          (:family "DejaVu Serif"))
-         (((type x))
-          (:font "Sans Serif"))
-         (t
-          (:font "default")))
-       "The face that is used for displaying the definition of the word."
-       :group 'dictionary
-        :version "28.1")
-
-      (defface dictionary-word-entry-face
-       '((((type x))
-          (:italic t))
-         (((type tty) (class color))
-          (:foreground "green"))
-         (t
-          (:inverse t)))
-       "The face that is used for displaying the initial word entry line."
-       :group 'dictionary
-        :version "28.1")
-
-      (defface dictionary-button-face
-       '((t
-          (:bold t)))
-       "The face that is used for displaying buttons."
-       :group 'dictionary
-        :version "28.1")
-
-      (defface dictionary-reference-face
-       '((((type x)
-           (class color)
-           (background dark))
-          (:foreground "yellow"))
-         (((type tty)
-           (class color)
-           (background dark))
-          (:foreground "cyan"))
-         (((class color)
-           (background light))
-          (:foreground "blue"))
-         (t
-          (:underline t)))
-
-       "The face that is used for displaying a reference word."
-       :group 'dictionary
-        :version "28.1")
-
-      )
-
-  ;; else
-  (copy-face 'italic 'dictionary-word-entry-face)
-  (copy-face 'bold 'dictionary-button-face)
-  (copy-face 'default 'dictionary-reference-face)
-  (set-face-foreground 'dictionary-reference-face "blue"))
+(defface dictionary-word-definition-face
+'((((supports (:family "DejaVu Serif")))
+   (:family "DejaVu Serif"))
+  (((type x))
+   (:font "Sans Serif"))
+  (t
+   (:font "default")))
+"The face that is used for displaying the definition of the word."
+:group 'dictionary
+:version "28.1")
+
+(defface dictionary-word-entry-face
+  '((((type x))
+     (:italic t))
+    (((type tty) (class color))
+     (:foreground "green"))
+    (t
+     (:inverse t)))
+  "The face that is used for displaying the initial word entry line."
+  :group 'dictionary
+  :version "28.1")
+
+(defface dictionary-button-face
+  '((t
+     (:bold t)))
+  "The face that is used for displaying buttons."
+  :group 'dictionary
+  :version "28.1")
+
+(defface dictionary-reference-face
+  '((((type x)
+      (class color)
+      (background dark))
+     (:foreground "yellow"))
+    (((type tty)
+      (class color)
+      (background dark))
+     (:foreground "cyan"))
+    (((class color)
+      (background light))
+     (:foreground "blue"))
+    (t
+     (:underline t)))
+
+  "The face that is used for displaying a reference word."
+  :group 'dictionary
+  :version "28.1")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Buffer local variables for storing the current state



reply via email to

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