diff options
Diffstat (limited to 'lisp/cus-face.el')
| -rw-r--r-- | lisp/cus-face.el | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/lisp/cus-face.el b/lisp/cus-face.el index e905a455570..12ad3910fcb 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | ;;; Face attributes. | 46 | ;;; Face attributes. |
| 47 | 47 | ||
| 48 | (defconst custom-face-attributes | 48 | (defconst custom-face-attributes |
| 49 | '((:family | 49 | `((:family |
| 50 | (string :tag "Font Family" | 50 | (string :tag "Font Family" |
| 51 | :help-echo "Font family or fontset alias name.")) | 51 | :help-echo "Font family or fontset alias name.")) |
| 52 | 52 | ||
| @@ -148,29 +148,29 @@ | |||
| 148 | (const :tag "At Bottom Of Text" t) | 148 | (const :tag "At Bottom Of Text" t) |
| 149 | (integer :tag "Pixels Above Bottom Of Text")))) | 149 | (integer :tag "Pixels Above Bottom Of Text")))) |
| 150 | ;; filter to make value suitable for customize | 150 | ;; filter to make value suitable for customize |
| 151 | (lambda (real-value) | 151 | ,(lambda (real-value) |
| 152 | (and real-value | 152 | (and real-value |
| 153 | (let ((color | 153 | (let ((color |
| 154 | (or (and (consp real-value) (plist-get real-value :color)) | 154 | (or (and (consp real-value) (plist-get real-value :color)) |
| 155 | (and (stringp real-value) real-value) | 155 | (and (stringp real-value) real-value) |
| 156 | 'foreground-color)) | 156 | 'foreground-color)) |
| 157 | (style | 157 | (style |
| 158 | (or (and (consp real-value) (plist-get real-value :style)) | 158 | (or (and (consp real-value) (plist-get real-value :style)) |
| 159 | 'line)) | 159 | 'line)) |
| 160 | (position (and (consp real-value) | 160 | (position (and (consp real-value) |
| 161 | (plist-get real-value :style)))) | 161 | (plist-get real-value :style)))) |
| 162 | (list :color color :style style :position position)))) | 162 | (list :color color :style style :position position)))) |
| 163 | ;; filter to make customized-value suitable for storing | 163 | ;; filter to make customized-value suitable for storing |
| 164 | (lambda (cus-value) | 164 | ,(lambda (cus-value) |
| 165 | (and cus-value | 165 | (and cus-value |
| 166 | (let ((color (plist-get cus-value :color)) | 166 | (let ((color (plist-get cus-value :color)) |
| 167 | (style (plist-get cus-value :style)) | 167 | (style (plist-get cus-value :style)) |
| 168 | (position (plist-get cus-value :position))) | 168 | (position (plist-get cus-value :position))) |
| 169 | (cond ((and (eq style 'line) (not position)) | 169 | (cond ((and (eq style 'line) (not position)) |
| 170 | ;; Use simple value for default style | 170 | ;; Use simple value for default style |
| 171 | (if (eq color 'foreground-color) t color)) | 171 | (if (eq color 'foreground-color) t color)) |
| 172 | (t | 172 | (t |
| 173 | `(:color ,color :style ,style :position ,position))))))) | 173 | `(:color ,color :style ,style :position ,position))))))) |
| 174 | 174 | ||
| 175 | (:overline | 175 | (:overline |
| 176 | (choice :tag "Overline" | 176 | (choice :tag "Overline" |
| @@ -206,40 +206,40 @@ | |||
| 206 | (const :tag "Flat" flat-button) | 206 | (const :tag "Flat" flat-button) |
| 207 | (const :tag "None" nil)))) | 207 | (const :tag "None" nil)))) |
| 208 | ;; filter to make value suitable for customize | 208 | ;; filter to make value suitable for customize |
| 209 | (lambda (real-value) | 209 | ,(lambda (real-value) |
| 210 | (and real-value | 210 | (and real-value |
| 211 | (let ((lwidth | 211 | (let ((lwidth |
| 212 | (or (and (consp real-value) | 212 | (or (and (consp real-value) |
| 213 | (if (listp (cdr real-value)) | 213 | (if (listp (cdr real-value)) |
| 214 | (plist-get real-value :line-width) | 214 | (plist-get real-value :line-width) |
| 215 | real-value)) | 215 | real-value)) |
| 216 | (and (integerp real-value) real-value) | 216 | (and (integerp real-value) real-value) |
| 217 | '(1 . 1))) | 217 | '(1 . 1))) |
| 218 | (color | 218 | (color |
| 219 | (or (and (consp real-value) (plist-get real-value :color)) | 219 | (or (and (consp real-value) (plist-get real-value :color)) |
| 220 | (and (stringp real-value) real-value) | 220 | (and (stringp real-value) real-value) |
| 221 | nil)) | 221 | nil)) |
| 222 | (style | 222 | (style |
| 223 | (and (consp real-value) (plist-get real-value :style)))) | 223 | (and (consp real-value) (plist-get real-value :style)))) |
| 224 | (if (integerp lwidth) | 224 | (if (integerp lwidth) |
| 225 | (setq lwidth (cons (abs lwidth) lwidth))) | 225 | (setq lwidth (cons (abs lwidth) lwidth))) |
| 226 | (list :line-width lwidth :color color :style style)))) | 226 | (list :line-width lwidth :color color :style style)))) |
| 227 | ;; filter to make customized-value suitable for storing | 227 | ;; filter to make customized-value suitable for storing |
| 228 | (lambda (cus-value) | 228 | ,(lambda (cus-value) |
| 229 | (and cus-value | 229 | (and cus-value |
| 230 | (let ((lwidth (plist-get cus-value :line-width)) | 230 | (let ((lwidth (plist-get cus-value :line-width)) |
| 231 | (color (plist-get cus-value :color)) | 231 | (color (plist-get cus-value :color)) |
| 232 | (style (plist-get cus-value :style))) | 232 | (style (plist-get cus-value :style))) |
| 233 | (cond ((and (null color) (null style)) | 233 | (cond ((and (null color) (null style)) |
| 234 | lwidth) | 234 | lwidth) |
| 235 | ((and (null lwidth) (null style)) | 235 | ((and (null lwidth) (null style)) |
| 236 | ;; actually can't happen, because LWIDTH is always an int | 236 | ;; actually can't happen, because LWIDTH is always an int |
| 237 | color) | 237 | color) |
| 238 | (t | 238 | (t |
| 239 | ;; Keep as a plist, but remove null entries | 239 | ;; Keep as a plist, but remove null entries |
| 240 | (nconc (and lwidth `(:line-width ,lwidth)) | 240 | (nconc (and lwidth `(:line-width ,lwidth)) |
| 241 | (and color `(:color ,color)) | 241 | (and color `(:color ,color)) |
| 242 | (and style `(:style ,style))))))))) | 242 | (and style `(:style ,style))))))))) |
| 243 | 243 | ||
| 244 | (:inverse-video | 244 | (:inverse-video |
| 245 | (choice :tag "Inverse-video" | 245 | (choice :tag "Inverse-video" |
| @@ -276,18 +276,18 @@ | |||
| 276 | :help-echo "List of faces to inherit attributes from." | 276 | :help-echo "List of faces to inherit attributes from." |
| 277 | (face :Tag "Face" default)) | 277 | (face :Tag "Face" default)) |
| 278 | ;; filter to make value suitable for customize | 278 | ;; filter to make value suitable for customize |
| 279 | (lambda (real-value) | 279 | ,(lambda (real-value) |
| 280 | (cond ((or (null real-value) (eq real-value 'unspecified)) | 280 | (cond ((or (null real-value) (eq real-value 'unspecified)) |
| 281 | nil) | 281 | nil) |
| 282 | ((symbolp real-value) | 282 | ((symbolp real-value) |
| 283 | (list real-value)) | 283 | (list real-value)) |
| 284 | (t | 284 | (t |
| 285 | real-value))) | 285 | real-value))) |
| 286 | ;; filter to make customized-value suitable for storing | 286 | ;; filter to make customized-value suitable for storing |
| 287 | (lambda (cus-value) | 287 | ,(lambda (cus-value) |
| 288 | (if (and (consp cus-value) (null (cdr cus-value))) | 288 | (if (and (consp cus-value) (null (cdr cus-value))) |
| 289 | (car cus-value) | 289 | (car cus-value) |
| 290 | cus-value)))) | 290 | cus-value)))) |
| 291 | 291 | ||
| 292 | "Alist of face attributes. | 292 | "Alist of face attributes. |
| 293 | 293 | ||
| @@ -329,12 +329,12 @@ If FRAME is nil, use the global defaults for FACE." | |||
| 329 | "Apply a list of face specs for user customizations. | 329 | "Apply a list of face specs for user customizations. |
| 330 | This works by calling `custom-theme-set-faces' for the `user' | 330 | This works by calling `custom-theme-set-faces' for the `user' |
| 331 | theme, a special theme referring to settings made via Customize. | 331 | theme, a special theme referring to settings made via Customize. |
| 332 | The arguments should be a list where each entry has the form: | 332 | The arguments ARGS should be a list where each entry has the form: |
| 333 | 333 | ||
| 334 | (FACE SPEC [NOW [COMMENT]]) | 334 | (FACE SPEC [NOW [COMMENT]]) |
| 335 | 335 | ||
| 336 | See the documentation of `custom-theme-set-faces' for details." | 336 | See the documentation of `custom-theme-set-faces' for details." |
| 337 | (apply 'custom-theme-set-faces 'user args)) | 337 | (apply #'custom-theme-set-faces 'user args)) |
| 338 | 338 | ||
| 339 | (defun custom-theme-set-faces (theme &rest args) | 339 | (defun custom-theme-set-faces (theme &rest args) |
| 340 | "Apply a list of face specs associated with theme THEME. | 340 | "Apply a list of face specs associated with theme THEME. |
| @@ -419,7 +419,7 @@ Each of the arguments ARGS has this form: | |||
| 419 | (FACE FROM-THEME) | 419 | (FACE FROM-THEME) |
| 420 | 420 | ||
| 421 | This means reset FACE to its value in FROM-THEME." | 421 | This means reset FACE to its value in FROM-THEME." |
| 422 | (apply 'custom-theme-reset-faces 'user args)) | 422 | (apply #'custom-theme-reset-faces 'user args)) |
| 423 | 423 | ||
| 424 | (define-obsolete-function-alias 'custom-facep #'facep "28.1") | 424 | (define-obsolete-function-alias 'custom-facep #'facep "28.1") |
| 425 | 425 | ||