diff options
| author | Andreas Schwab | 2012-08-21 23:41:35 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2012-08-21 23:41:35 +0200 |
| commit | c6cc78b86d48ba3d40a6bfb6d6a510554eddfde5 (patch) | |
| tree | 37a1f8655bc1d2739a7632f46bbec99498bdd5ea | |
| parent | d18e2bb65d39d73954c422c1f36657f026cf2f56 (diff) | |
| download | emacs-c6cc78b86d48ba3d40a6bfb6d6a510554eddfde5.tar.gz emacs-c6cc78b86d48ba3d40a6bfb6d6a510554eddfde5.zip | |
Fixes: debbugs:11805
* cus-face.el (custom-face-attributes): Fix customize type for the
:underline attribute.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/cus-face.el | 34 |
2 files changed, 34 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3eda0b626a3..c3e1ae374a0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-21 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * cus-face.el (custom-face-attributes): Fix customize type for the | ||
| 4 | :underline attribute. (Bug#11805) | ||
| 5 | |||
| 1 | 2012-08-21 Martin Rudalics <rudalics@gmx.at> | 6 | 2012-08-21 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * window.el (window-point-1, set-window-point-1): Remove. | 8 | * window.el (window-point-1, set-window-point-1): Remove. |
diff --git a/lisp/cus-face.el b/lisp/cus-face.el index 3680a2648ce..06fd10149d3 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el | |||
| @@ -136,12 +136,36 @@ | |||
| 136 | :help-echo "Control text underlining." | 136 | :help-echo "Control text underlining." |
| 137 | (const :tag "Off" nil) | 137 | (const :tag "Off" nil) |
| 138 | (list :tag "On" | 138 | (list :tag "On" |
| 139 | :value (:color foreground-color :style line) | ||
| 139 | (const :format "" :value :color) | 140 | (const :format "" :value :color) |
| 140 | (choice :tag "Color" (const :tag "Foreground Color" foreground-color) color) | 141 | (choice :tag "Color" |
| 141 | (const :format "" :value :style) | 142 | (const :tag "Foreground Color" foreground-color) |
| 142 | (choice :tag "Style" | 143 | color) |
| 143 | (const :tag "Line" line) | 144 | (const :format "" :value :style) |
| 144 | (const :tag "Wave" wave))))) | 145 | (choice :tag "Style" |
| 146 | (const :tag "Line" line) | ||
| 147 | (const :tag "Wave" wave)))) | ||
| 148 | ;; filter to make value suitable for customize | ||
| 149 | (lambda (real-value) | ||
| 150 | (and real-value | ||
| 151 | (let ((color | ||
| 152 | (or (and (consp real-value) (plist-get real-value :color)) | ||
| 153 | (and (stringp real-value) real-value) | ||
| 154 | 'foreground-color)) | ||
| 155 | (style | ||
| 156 | (or (and (consp real-value) (plist-get real-value :style)) | ||
| 157 | 'line))) | ||
| 158 | (list :color color :style style)))) | ||
| 159 | ;; filter to make customized-value suitable for storing | ||
| 160 | (lambda (cus-value) | ||
| 161 | (and cus-value | ||
| 162 | (let ((color (plist-get cus-value :color)) | ||
| 163 | (style (plist-get cus-value :style))) | ||
| 164 | (cond ((eq style 'line) | ||
| 165 | ;; Use simple value for default style | ||
| 166 | (if (eq color 'foreground-color) t color)) | ||
| 167 | (t | ||
| 168 | `(:color ,color :style ,style))))))) | ||
| 145 | 169 | ||
| 146 | (:overline | 170 | (:overline |
| 147 | (choice :tag "Overline" | 171 | (choice :tag "Overline" |