• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:internal +defs:lisp +defs:face

142 (require 'cus-face)
214 (defgroup lisp nil
267 (defgroup internal nil
385 :group 'internal)
418 :group 'internal)
623 ("-face\\'" face)
772 '(custom-variable custom-face)))
788 '(custom-variable custom-face)))
823 '(custom-variable custom-face)))
839 '(custom-variable custom-face)))
857 '(custom-variable custom-face)))
1204 (push (list symbol 'custom-face) found)))))))
1260 (defun customize-face (&optional face)
1261 "Customize FACE, which should be a face name or nil.
1263 face-alias, customize the face it is aliased to.
1265 Interactively, when point is on text which has a face specified,
1266 suggest to customize that face, if it's customizable."
1268 (list (read-face-name "Customize face" "all faces" t)))
1269 (if (member face '(nil ""))
1270 (setq face (face-list)))
1271 (if (and (listp face) (null (cdr face)))
1272 (setq face (car face)))
1273 (if (listp face)
1276 (list s 'custom-face))
1277 face)
1280 ;; If FACE is actually an alias, customize the face it is aliased to.
1281 (if (get face 'face-alias)
1282 (setq face (get face 'face-alias)))
1283 (unless (facep face)
1284 (error "Invalid face %S" face))
1285 (custom-buffer-create (list (list face 'custom-face))
1287 (custom-unlispify-tag-name face)))))
1290 (defun customize-face-other-window (&optional face)
1291 "Show customization buffer for face FACE in other window.
1292 If FACE is actually a face-alias, customize the face it is aliased to.
1294 Interactively, when point is on text which has a face specified,
1295 suggest to customize that face, if it's customizable."
1297 (list (read-face-name "Customize face" "all faces" t)))
1298 (if (member face '(nil ""))
1299 (setq face (face-list)))
1300 (if (and (listp face) (null (cdr face)))
1301 (setq face (car face)))
1302 (if (listp face)
1306 (list s 'custom-face))
1307 face)
1310 (if (get face 'face-alias)
1311 (setq face (get face 'face-alias)))
1312 (unless (facep face)
1313 (error "Invalid face %S" face))
1315 (list (list face 'custom-face))
1317 (custom-unlispify-tag-name face)))))
1327 (and (or (get symbol 'customized-face)
1328 (get symbol 'customized-face-comment))
1330 (push (list symbol 'custom-face) found))
1365 (and (or (get symbol 'saved-face)
1366 (get symbol 'saved-face-comment))
1368 (push (list symbol 'custom-face) found))
1396 (push (list symbol 'custom-face) found))
1487 (custom-buffer-create-internal options description))
1502 (custom-buffer-create-internal options description)))
1524 "Mouse face used for buttons in customization buffers.")
1529 (defcustom custom-raised-buttons (not (equal (face-valid-attribute-values :box)
1547 (defun custom-buffer-create-internal (options &optional description)
1714 :tag-glyph "face")
1760 (define-widget 'custom-browse-face-tag 'custom-group-link
1763 :tag-glyph "face"
1764 :action 'custom-browse-face-tag-action)
1766 (defun custom-browse-face-tag-action (widget &rest ignore)
1768 (customize-face-other-window (widget-value parent))))
1817 :follow-link 'mouse-face
1818 :button-face 'custom-link
1819 :mouse-face 'highlight
1820 :pressed-face 'highlight
1837 (put 'custom-invalid-face 'face-alias 'custom-invalid)
1846 (put 'custom-rogue-face 'face-alias 'custom-rogue)
1857 (put 'custom-modified-face 'face-alias 'custom-modified)
1868 (put 'custom-set-face 'face-alias 'custom-set)
1879 (put 'custom-changed-face 'face-alias 'custom-changed)
1894 (put 'custom-saved-face 'face-alias 'custom-saved)
1933 For internal use, should never occur.
1935 For internal use, should never occur.
1955 FACE is a face used to present the state.
1963 category of the item. These are `group'. `option', and `face'.
1975 (defcustom custom-magic-show-hidden '(option face)
1979 and `face'."
1980 :type '(set (const group) (const option) (const face))
2010 (face (nth 2 entry))
2044 (cond ((eq form 'lisp)
2045 (insert " (lisp)"))
2048 (put-text-property start (point) 'face 'custom-state))
2063 :button-face face
2068 :tag (if (memq form '(lisp mismatch))
2092 (put 'custom-button-face 'face-alias 'custom-button)
2100 "Mouse face for custom buffer buttons if `custom-raised-buttons' is non-nil."
2126 (put 'custom-button-pressed-face 'face-alias 'custom-button-pressed)
2145 (put 'custom-documentation-face 'face-alias 'custom-documentation)
2157 (put 'custom-state-face 'face-alias 'custom-state)
2185 :value-to-internal (car args)))
2301 :button-face 'custom-link
2302 :mouse-face 'highlight
2303 :pressed-face 'highlight)
2348 :button-face 'custom-link
2349 :mouse-face 'highlight
2350 :pressed-face 'highlight)
2385 (put 'custom-comment-face 'face-alias 'custom-comment)
2387 ;; like font-lock-comment-face
2399 (put 'custom-comment-tag-face 'face-alias 'custom-comment-tag)
2405 :sample-face 'custom-comment-tag-face
2406 :value-face 'custom-comment-face
2453 (put 'custom-variable-tag-face 'face-alias 'custom-variable-tag)
2459 (put 'custom-variable-button-face 'face-alias 'custom-variable-button)
2464 (const lisp))
2541 ;; If we don't know the state, see if we need to edit it in lisp form.
2559 :sample-face 'custom-variable-tag-face
2570 ((memq form '(lisp mismatch))
2571 ;; In lisp mode edit the saved value when possible.
2592 :button-face 'custom-variable-button-face
2612 :button-face 'custom-variable-button-face
2613 :sample-face 'custom-variable-tag-face
2775 (eq (widget-get widget :custom-form) 'lisp)))
2776 ("Show Saved Lisp Expression" custom-variable-edit-lisp
2810 (defun custom-variable-edit-lisp (widget)
2813 (widget-put widget :custom-form 'lisp)
2831 ((memq form '(lisp mismatch))
2873 ((memq form '(lisp mismatch))
2986 ;;; The `custom-face-edit' Widget.
2988 (define-widget 'custom-face-edit 'checklist
2989 "Edit face attributes."
2994 :value-to-internal 'custom-face-edit-fix-value
2997 (custom-face-edit-fix-value widget value)))
2998 :convert-widget 'custom-face-edit-convert-widget
3005 custom-face-attributes))
3007 (defun custom-face-edit-fix-value (widget value)
3032 (defun custom-face-edit-convert-widget (widget)
3038 :deactivate 'custom-face-edit-deactivate
3039 :activate 'custom-face-edit-activate
3040 :delete 'custom-face-edit-delete))
3044 (defun custom-face-edit-deactivate (widget)
3045 "Make face widget WIDGET inactive for user modifications."
3047 (let ((tag (custom-face-edit-attribute-tag widget))
3059 (defun custom-face-edit-activate (widget)
3060 "Make face widget WIDGET inactive for user modifications."
3073 (defun custom-face-edit-delete (widget)
3088 (defun custom-face-edit-attribute-tag (widget)
3094 (setq tag (custom-face-edit-attribute-tag (pop children))))
3103 :help-echo "Specify frames where the face attributes should be used."
3177 Only match frames that support the specified face attributes.")
3179 (custom-face-edit :inline t :format "%n%v"))))))
3181 ;;; The `custom-face' Widget.
3183 (defface custom-face-tag
3185 "Face used for face tags."
3188 (put 'custom-face-tag-face 'face-alias 'custom-face-tag)
3190 (defcustom custom-face-default-form 'selected
3191 "Default form of displaying face definition."
3194 (const lisp))
3198 (define-widget 'custom-face 'custom
3199 "Customize face."
3200 :sample-face 'custom-face-tag-face
3201 :help-echo "Set or reset this face."
3202 :documentation-property #'face-doc-string
3203 :value-create 'custom-face-value-create
3204 :action 'custom-face-action
3205 :custom-category 'face
3206 :custom-form nil ; defaults to value of `custom-face-default-form'
3207 :custom-set 'custom-face-set
3208 :custom-save 'custom-face-save
3210 :custom-reset-saved 'custom-face-reset-saved
3211 :custom-reset-standard 'custom-face-reset-standard
3212 :custom-standard-value 'custom-face-standard-value
3213 :custom-menu 'custom-face-menu-create)
3215 (define-widget 'custom-face-all 'editable-list
3221 :args '((group :format "%v" custom-display custom-face-edit)))
3223 (defconst custom-face-all (widget-convert 'custom-face-all)
3224 "Converted version of the `custom-face-all' widget.")
3232 (not (face-spec-set-match-display value (selected-frame))))
3234 (define-widget 'custom-face-selected 'group
3235 "Edit the attributes of the selected display in a face specification."
3239 (custom-face-edit :tag " Default\n Attributes"))
3244 (custom-face-edit :tag " Overriding\n Attributes"))
3253 (custom-face-edit :tag "\n Attributes"))
3260 (defconst custom-face-selected (widget-convert 'custom-face-selected)
3261 "Converted version of the `custom-face-selected' widget.")
3263 (defun custom-filter-face-spec (spec filter-index &optional default-filter)
3266 `custom-face-attributes' at which the appropriate filter function can be
3270 ;; Filter a single face-spec entry
3278 ;; Filter each face attribute
3283 (or (nth filter-index (assq attr custom-face-attributes))
3295 (defun custom-pre-filter-face-spec (spec)
3296 "Return SPEC changed as necessary for editing by the face customization widget.
3297 SPEC must be a full face spec."
3298 (custom-filter-face-spec spec 2))
3300 (defun custom-post-filter-face-spec (spec)
3301 "Return the customized SPEC in a form suitable for setting the face."
3302 (custom-filter-face-spec spec 3))
3304 (defun custom-face-value-create (widget)
3319 widget 'custom-browse-face-tag)
3327 (if (eq custom-buffer-style 'face)
3329 (if (string-match "face\\'" tag)
3331 (insert " face: ")))
3335 :sample-face symbol
3342 :help-echo "Hide or show this face."
3360 (let* ((comment (get symbol 'face-comment))
3377 (message "Creating face editor...")
3380 (widget-put widget :custom-form custom-face-default-form))
3382 (spec (or (get symbol 'customized-face)
3383 (get symbol 'saved-face)
3384 (get symbol 'face-defface-spec)
3386 (list (list t (custom-face-attributes-get
3391 ;; If the user has changed this face in some other way,
3393 (if (not (face-spec-match-p symbol spec (selected-frame)))
3394 (setq spec (list (list t (face-attr-construct symbol (selected-frame))))))
3395 (setq spec (custom-pre-filter-face-spec spec))
3399 (widget-apply custom-face-selected
3402 'custom-face-selected)
3403 ((and (not (eq form 'lisp))
3404 (widget-apply custom-face-all
3406 'custom-face-all)
3411 (custom-face-state-set widget)
3414 (message "Creating face editor...done"))))))
3416 (defvar custom-face-menu
3417 `(("Set for Current Session" custom-face-set)
3419 '(("Save for Future Sessions" custom-face-save)))
3423 ("Reset to Saved" custom-face-reset-saved
3425 (or (get (widget-value widget) 'saved-face)
3426 (get (widget-value widget) 'saved-face-comment))))
3428 '(("Erase Customization" custom-face-reset-standard
3430 (get (widget-value widget) 'face-defface-spec)))))
3434 ("For Current Display" custom-face-edit-selected
3437 ("For All Kinds of Displays" custom-face-edit-all
3440 ("Show Lisp Expression" custom-face-edit-lisp
3442 (not (eq (widget-get widget :custom-form) 'lisp)))))
3443 "Alist of actions for the `custom-face' widget.
3446 menu is selected, and FILTER is a predicate which takes a `custom-face'
3450 (defun custom-face-edit-selected (widget)
3456 (defun custom-face-edit-all (widget)
3462 (defun custom-face-edit-lisp (widget)
3465 (widget-put widget :custom-form 'lisp)
3468 (defun custom-face-state-set (widget)
3471 (comment (get symbol 'face-comment))
3475 (setq tmp (get symbol 'customized-face))
3476 (setq temp (get symbol 'customized-face-comment))
3482 (setq tmp (get symbol 'saved-face))
3483 (setq temp (get symbol 'saved-face-comment))
3487 ((eq 'user (caar (get symbol 'theme-face)))
3489 ((eq 'changed (caar (get symbol 'theme-face)))
3493 ((get symbol 'face-defface-spec)
3499 ;; If the user called set-face-attribute to change the default
3500 ;; for new frames, this face is "set outside of Customize".
3502 (get symbol 'face-modified))
3506 (defun custom-face-action (widget &optional event)
3507 "Show the menu for `custom-face' WIDGET.
3515 (custom-menu-filter custom-face-menu
3521 (defun custom-face-set (widget)
3522 "Make the face attributes in WIDGET take effect."
3525 (value (custom-post-filter-face-spec (widget-value child)))
3532 (put symbol 'customized-face value)
3533 (custom-push-theme 'theme-face symbol 'user 'set value)
3534 (if (face-spec-choose value)
3535 (face-spec-set symbol value)
3536 ;; face-set-spec ignores empty attribute lists, so just give it
3538 (face-spec-set symbol '((t :foreground unspecified))))
3539 (put symbol 'customized-face-comment comment)
3540 (put symbol 'face-comment comment)
3541 (custom-face-state-set widget)
3544 (defun custom-face-save (widget)
3545 "Save in `.emacs' the face attributes in WIDGET."
3548 (value (custom-post-filter-face-spec (widget-value child)))
3555 (custom-push-theme 'theme-face symbol 'user 'set value)
3556 (if (face-spec-choose value)
3557 (face-spec-set symbol value)
3558 ;; face-set-spec ignores empty attribute lists, so just give it
3560 (face-spec-set symbol '((t :foreground unspecified))))
3562 (put symbol 'saved-face value))
3563 (put symbol 'customized-face nil)
3564 (put symbol 'face-comment comment)
3565 (put symbol 'customized-face-comment nil)
3566 (put symbol 'saved-face-comment comment)
3568 (custom-face-state-set widget)
3572 (define-obsolete-function-alias 'custom-face-save-command 'custom-face-save
3575 (defun custom-face-reset-saved (widget)
3576 "Restore WIDGET to the face's default attributes."
3579 (value (get symbol 'saved-face))
3580 (comment (get symbol 'saved-face-comment))
3583 (error "No saved value for this face"))
3584 (put symbol 'customized-face nil)
3585 (put symbol 'customized-face-comment nil)
3586 (custom-push-theme 'theme-face symbol 'user 'set value)
3587 (face-spec-set symbol value)
3588 (put symbol 'face-comment comment)
3592 (custom-face-state-set widget)
3595 (defun custom-face-standard-value (widget)
3596 (get (widget-value widget) 'face-defface-spec))
3598 (defun custom-face-reset-standard (widget)
3599 "Restore WIDGET to the face's standard attribute values.
3600 This operation eliminates any saved attributes for the face,
3601 restoring it to the state of a face that has never been customized."
3604 (value (get symbol 'face-defface-spec))
3607 (error "No standard setting for this face"))
3608 (put symbol 'customized-face nil)
3609 (put symbol 'customized-face-comment nil)
3610 (custom-push-theme 'theme-face symbol 'user 'reset)
3611 (face-spec-set symbol value)
3612 (custom-theme-recalc-face symbol)
3613 (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment))
3614 (put symbol 'saved-face nil)
3615 (put symbol 'saved-face-comment nil)
3617 (put symbol 'face-comment nil)
3619 (custom-pre-filter-face-spec
3620 (list (list t (custom-face-attributes-get
3624 (custom-face-state-set widget)
3627 ;;; The `face' Widget.
3629 (defvar widget-face-prompt-value-history nil
3630 "History of input to `widget-face-prompt-value'.")
3632 (define-widget 'face 'symbol
3633 "A Lisp face name (with sample)."
3637 :sample-face-get 'widget-face-sample-face-get
3638 :notify 'widget-face-notify
3642 (lisp-complete-symbol 'facep))
3644 :prompt-history 'widget-face-prompt-value-history
3648 :error (format "Invalid face: %S"
3652 (defun widget-face-sample-face-get (widget)
3658 (defun widget-face-notify (widget child &optional event)
3661 'face (widget-apply widget :sample-face-get))
3669 :value-to-internal (lambda (widget value)
3706 :button-face 'custom-link
3707 :mouse-face 'highlight
3708 :pressed-face 'highlight
3711 :follow-link 'mouse-face
3725 :type '(repeat face)
3742 (put 'custom-group-tag-face-1 'face-alias 'custom-group-tag-1)
3758 (put 'custom-group-tag-face 'face-alias 'custom-group-tag)
3763 :sample-face-get 'custom-group-sample-face-get
3776 (defun custom-group-sample-face-get (widget)
3777 ;; Use :sample-face.
4202 (unless (eq major-mode 'emacs-lisp-mode)
4203 (emacs-lisp-mode))
4217 (let ((face (get symbol 'customized-face))
4219 (face-comment (get symbol 'customized-face-comment))
4222 (when face
4223 (put symbol 'saved-face face)
4224 (custom-push-theme 'theme-face symbol 'user 'set value)
4225 (put symbol 'customized-face nil))
4233 (when face-comment
4234 (put symbol 'saved-face-comment face-comment)
4235 (put symbol 'customized-face-comment nil)))))
4366 (if (and (get symbol 'saved-face)
4367 (eq 'user (car (car-safe (get symbol 'theme-face)))))
4370 ;; The default face must be first, since it affects the others.
4381 (let ((spec (car-safe (get symbol 'theme-face)))
4382 (value (get symbol 'saved-face))
4383 (now (not (or (get symbol 'face-defface-spec)
4385 (not (get symbol 'force-face))))))
4386 (comment (get symbol 'saved-face-comment)))
4389 (and (null spec) (get symbol 'saved-face)))
4390 ;; Don't print default face here.
4420 (defun custom-face-menu-create (widget symbol)
4421 "Ignoring WIDGET, create a menu entry for customization face SYMBOL."
4423 `(customize-face ',symbol)
4579 (make-local-variable 'widget-documentation-face)
4580 (setq widget-documentation-face 'custom-documentation)
4581 (make-local-variable 'widget-button-face)
4582 (setq widget-button-face custom-button)
4590 (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed)
4591 (set (make-local-variable 'widget-mouse-face) custom-button-mouse)
4607 "^Invalid face:? "
4614 "^No standard setting for this face"