Changeset 3988 for vendor/emacs-CVS_HEAD/lisp/cus-edit.el
- Timestamp:
- 11/26/05 08:33:26 (3 years ago)
- Files:
-
- vendor/emacs-CVS_HEAD/lisp/cus-edit.el (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/emacs-CVS_HEAD/lisp/cus-edit.el
r3939 r3988 213 213 (defgroup lisp nil 214 214 "Lisp support, including Emacs Lisp." 215 :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) 215 216 :group 'languages 216 217 :group 'development) … … 218 219 (defgroup c nil 219 220 "Support for the C language and related languages." 221 :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) 220 222 :link '(custom-manual "(ccmode)") 221 223 :group 'languages) … … 324 326 (defgroup tex nil 325 327 "Code related to the TeX formatter." 328 :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) 326 329 :group 'wp) 327 330 … … 491 494 "Prompt for a custom variable, defaulting to the variable at point. 492 495 Return a list suitable for use in `interactive'." 493 (let ((v (variable-at-point)) 494 (enable-recursive-minibuffers t) 495 val) 496 (let* ((v (variable-at-point)) 497 (default (and (symbolp v) (custom-variable-p v) (symbol-name v))) 498 (enable-recursive-minibuffers t) 499 val) 496 500 (setq val (completing-read 497 (if (and (symbolp v) (custom-variable-p v)) 498 (format "Customize option (default %s): " v) 501 (if default (format "Customize option (default %s): " default) 499 502 "Customize option: ") 500 obarray 'custom-variable-p t ))503 obarray 'custom-variable-p t nil nil default)) 501 504 (list (if (equal val "") 502 505 (if (symbolp v) v nil) … … 798 801 (interactive) 799 802 (let ((children custom-options)) 800 (mapc (lambda (widget) 801 (and (widget-apply widget :custom-standard-value) 802 (if (memq (widget-get widget :custom-state) 803 '(modified set changed saved rogue)) 804 (widget-apply widget :custom-reset-standard)))) 805 children))) 803 (when (or (and (= 1 (length children)) 804 (memq (widget-type (car children)) 805 '(custom-variable custom-face))) 806 (yes-or-no-p "Really erase all customizations in this buffer? ")) 807 (mapc (lambda (widget) 808 (and (if (widget-get widget :custom-standard-value) 809 (widget-apply widget :custom-standard-value) 810 t) 811 (memq (widget-get widget :custom-state) 812 '(modified set changed saved rogue)) 813 (widget-apply widget :custom-reset-standard))) 814 children)))) 806 815 807 816 ;;; The Customize Commands … … 2124 2133 (defun custom-add-parent-links (widget &optional initial-string) 2125 2134 "Add \"Parent groups: ...\" to WIDGET if the group has parents. 2126 The value i fnon-nil if any parents were found.2135 The value is non-nil if any parents were found. 2127 2136 If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." 2128 2137 (let ((name (widget-value widget)) … … 2133 2142 (insert (or initial-string "Parent groups:")) 2134 2143 (mapatoms (lambda (symbol) 2135 (let ((entry (assq name (get symbol 'custom-group)))) 2136 (when (eq (nth 1 entry) type) 2137 (insert " ") 2138 (push (widget-create-child-and-convert 2139 widget 'custom-group-link 2140 :tag (custom-unlispify-tag-name symbol) 2141 symbol) 2142 buttons) 2143 (setq parents (cons symbol parents)))))) 2144 (when (member (list name type) (get symbol 'custom-group)) 2145 (insert " ") 2146 (push (widget-create-child-and-convert 2147 widget 'custom-group-link 2148 :tag (custom-unlispify-tag-name symbol) 2149 symbol) 2150 buttons) 2151 (setq parents (cons symbol parents))))) 2144 2152 (and (null (get name 'custom-links)) ;No links of its own. 2145 2153 (= (length parents) 1) ;A single parent. … … 3398 3406 (define-widget 'face 'symbol 3399 3407 "A Lisp face name (with sample)." 3400 :format "% t: (%{sample%}) %v"3408 :format "%{%t%}: (%{sample%}) %v" 3401 3409 :tag "Face" 3402 3410 :value 'default
