summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Hilbrich <torsten.hilbrich@gmx.net>2019-01-07 04:24:27 +0100
committerGitHub <noreply@github.com>2019-01-07 04:24:27 +0100
commit79a0c9a7702cc74da91452cdb324a0956172c660 (patch)
tree4635956e747f4550034568842e7f582ec786e1ef
parenta23b8f4a422d0de69a006ed010eff5795319db98 (diff)
parentb266c5ac9aee1339212e20d4f3e3ba955499b7ac (diff)
Merge pull request #3 from ucko/debian-864644
Support custom faces for definition bodies, preferably var-width.
-rw-r--r--dictionary.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/dictionary.el b/dictionary.el
index fa23546..6c00682 100644
--- a/dictionary.el
+++ b/dictionary.el
@@ -219,6 +219,16 @@ by the choice value:
(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)
+
(defface dictionary-word-entry-face
'((((type x))
(:italic t))
@@ -780,6 +790,7 @@ This function knows about the special meaning of quotes (\")"
(let ((start (point)))
(insert (dictionary-decode-charset reply dictionary))
(insert "\n\n")
+ (put-text-property start (point) 'face 'dictionary-word-definition-face)
(let ((regexp "\\({+\\)\\([^ '\"][^}]*\\)\\(}+\\)"))
(goto-char start)
(while (< (point) (point-max))