aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-12-23 01:18:08 +0000
committerRichard M. Stallman2005-12-23 01:18:08 +0000
commit0a57ffed62a2fc5d24cc654f02b40be80d104c09 (patch)
tree98fdd5b1c1f6a021b34ee31e1acdd0b5011a0d42
parentd130d1298b2d704d2ab8444e369c1989976502be (diff)
downloademacs-0a57ffed62a2fc5d24cc654f02b40be80d104c09.tar.gz
emacs-0a57ffed62a2fc5d24cc654f02b40be80d104c09.zip
(custom-variable-prompt): Say "variable" in prompt.
(custom-buffer-create-internal): Reword the top-of-buffer help intro. Don't include buttons that write a file when there's no file. (custom-variable-menu, custom-face-menu, custom-group-menu): Don't include commands that write a file when there's no file.
-rw-r--r--lisp/cus-edit.el94
1 files changed, 51 insertions, 43 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 43c38e172b5..cfdb91a2ea4 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -506,8 +506,8 @@ Return a list suitable for use in `interactive'."
506 (enable-recursive-minibuffers t) 506 (enable-recursive-minibuffers t)
507 val) 507 val)
508 (setq val (completing-read 508 (setq val (completing-read
509 (if default (format "Customize option (default %s): " default) 509 (if default (format "Customize variable (default %s): " default)
510 "Customize option: ") 510 "Customize variable: ")
511 obarray 'custom-variable-p t nil nil default)) 511 obarray 'custom-variable-p t nil nil default))
512 (list (if (equal val "") 512 (list (if (equal val "")
513 (if (symbolp v) v nil) 513 (if (symbolp v) v nil)
@@ -1430,11 +1430,11 @@ Otherwise use brackets."
1430 (if description 1430 (if description
1431 (widget-insert description)) 1431 (widget-insert description))
1432 (widget-insert (format ". 1432 (widget-insert (format ".
1433%s show active fields; type RET or click mouse-1 1433%s indicate buttons; type RET or click mouse-1 to actuate one.
1434on an active field to invoke its action. Editing an option value 1434Editing a setting changes only the text in the buffer.
1435changes only the text in the buffer. Invoke the State button to set or 1435Use the setting's State button to set it or save changes in it.
1436save the option value. Saving an option normally edits your init file. 1436Saving a change normally works by editing your Emacs init file.
1437Invoke " 1437See "
1438 (if custom-raised-buttons 1438 (if custom-raised-buttons
1439 "`Raised' buttons" 1439 "`Raised' buttons"
1440 "Square brackets"))) 1440 "Square brackets")))
@@ -1442,13 +1442,13 @@ Invoke "
1442 :tag "Custom file" 1442 :tag "Custom file"
1443 "(emacs)Saving Customizations") 1443 "(emacs)Saving Customizations")
1444 (widget-insert 1444 (widget-insert
1445 " for information on how to save in a different file. 1445 " for information on how to save in a different file.\n
1446Invoke ") 1446See ")
1447 (widget-create 'info-link 1447 (widget-create 'info-link
1448 :tag "Help" 1448 :tag "Help"
1449 :help-echo "Read the online help." 1449 :help-echo "Read the online help."
1450 "(emacs)Easy Customization") 1450 "(emacs)Easy Customization")
1451 (widget-insert " for general information.\n\n") 1451 (widget-insert " for more information.\n\n")
1452 (widget-insert "Operate on everything in this buffer:\n ")) 1452 (widget-insert "Operate on everything in this buffer:\n "))
1453 (widget-insert " ")) 1453 (widget-insert " "))
1454 (widget-create 'push-button 1454 (widget-create 'push-button
@@ -1457,14 +1457,15 @@ Invoke ")
1457Make your editing in this buffer take effect for this session." 1457Make your editing in this buffer take effect for this session."
1458 :action (lambda (widget &optional event) 1458 :action (lambda (widget &optional event)
1459 (Custom-set))) 1459 (Custom-set)))
1460 (widget-insert " ") 1460 (when (or custom-file user-init-file)
1461 (widget-create 'push-button 1461 (widget-insert " ")
1462 :tag "Save for Future Sessions" 1462 (widget-create 'push-button
1463 :help-echo "\ 1463 :tag "Save for Future Sessions"
1464 :help-echo "\
1464Make your editing in this buffer take effect for future Emacs sessions. 1465Make your editing in this buffer take effect for future Emacs sessions.
1465This updates your Emacs initialization file or creates a new one." 1466This updates your Emacs initialization file or creates a new one."
1466 :action (lambda (widget &optional event) 1467 :action (lambda (widget &optional event)
1467 (Custom-save))) 1468 (Custom-save))))
1468 (if custom-reset-button-menu 1469 (if custom-reset-button-menu
1469 (progn 1470 (progn
1470 (widget-insert " ") 1471 (widget-insert " ")
@@ -1484,14 +1485,15 @@ Reset all edited text in this buffer to reflect current values."
1484 (widget-create 'push-button 1485 (widget-create 'push-button
1485 :tag "Reset to Saved" 1486 :tag "Reset to Saved"
1486 :help-echo "\ 1487 :help-echo "\
1487Reset all values in this buffer to their saved settings." 1488Reset all settings in this buffer to their saved values."
1488 :action 'Custom-reset-saved) 1489 :action 'Custom-reset-saved)
1489 (widget-insert " ") 1490 (widget-insert " ")
1490 (widget-create 'push-button 1491 (when (or custom-file user-init-file)
1491 :tag "Erase Customization" 1492 (widget-create 'push-button
1492 :help-echo "\ 1493 :tag "Erase Customization"
1493Un-customize all values in this buffer. They get their standard settings." 1494 :help-echo "\
1494 :action 'Custom-reset-standard)) 1495Un-customize all settings in this buffer--save them with standard values."
1496 :action 'Custom-reset-standard)))
1495 (if (not custom-buffer-verbose-help) 1497 (if (not custom-buffer-verbose-help)
1496 (progn 1498 (progn
1497 (widget-insert " ") 1499 (widget-insert " ")
@@ -2547,12 +2549,13 @@ Otherwise, look up symbol in `custom-guess-type-alist'."
2547 (get (widget-value widget) 'standard-value)) 2549 (get (widget-value widget) 'standard-value))
2548 2550
2549(defvar custom-variable-menu 2551(defvar custom-variable-menu
2550 '(("Set for Current Session" custom-variable-set 2552 `(("Set for Current Session" custom-variable-set
2551 (lambda (widget) 2553 (lambda (widget)
2552 (eq (widget-get widget :custom-state) 'modified))) 2554 (eq (widget-get widget :custom-state) 'modified)))
2553 ("Save for Future Sessions" custom-variable-save 2555 ,@(when (or custom-file user-init-file)
2554 (lambda (widget) 2556 '(("Save for Future Sessions" custom-variable-save
2555 (memq (widget-get widget :custom-state) '(modified set changed rogue)))) 2557 (lambda (widget)
2558 (memq (widget-get widget :custom-state) '(modified set changed rogue))))))
2556 ("Reset to Current" custom-redraw 2559 ("Reset to Current" custom-redraw
2557 (lambda (widget) 2560 (lambda (widget)
2558 (and (default-boundp (widget-value widget)) 2561 (and (default-boundp (widget-value widget))
@@ -2563,11 +2566,12 @@ Otherwise, look up symbol in `custom-guess-type-alist'."
2563 (get (widget-value widget) 'saved-variable-comment)) 2566 (get (widget-value widget) 'saved-variable-comment))
2564 (memq (widget-get widget :custom-state) 2567 (memq (widget-get widget :custom-state)
2565 '(modified set changed rogue))))) 2568 '(modified set changed rogue)))))
2566 ("Erase Customization" custom-variable-reset-standard 2569 ,@(when (or custom-file user-init-file)
2567 (lambda (widget) 2570 '(("Erase Customization" custom-variable-reset-standard
2568 (and (get (widget-value widget) 'standard-value) 2571 (lambda (widget)
2569 (memq (widget-get widget :custom-state) 2572 (and (get (widget-value widget) 'standard-value)
2570 '(modified set changed saved rogue))))) 2573 (memq (widget-get widget :custom-state)
2574 '(modified set changed saved rogue)))))))
2571 ("Use Backup Value" custom-variable-reset-backup 2575 ("Use Backup Value" custom-variable-reset-backup
2572 (lambda (widget) 2576 (lambda (widget)
2573 (get (widget-value widget) 'backup-value))) 2577 (get (widget-value widget) 'backup-value)))
@@ -3218,15 +3222,17 @@ SPEC must be a full face spec."
3218 (message "Creating face editor...done")))))) 3222 (message "Creating face editor...done"))))))
3219 3223
3220(defvar custom-face-menu 3224(defvar custom-face-menu
3221 '(("Set for Current Session" custom-face-set) 3225 `(("Set for Current Session" custom-face-set)
3222 ("Save for Future Sessions" custom-face-save-command) 3226 ,@(when (or custom-file user-init-file)
3227 '(("Save for Future Sessions" custom-face-save-command)))
3223 ("Reset to Saved" custom-face-reset-saved 3228 ("Reset to Saved" custom-face-reset-saved
3224 (lambda (widget) 3229 (lambda (widget)
3225 (or (get (widget-value widget) 'saved-face) 3230 (or (get (widget-value widget) 'saved-face)
3226 (get (widget-value widget) 'saved-face-comment)))) 3231 (get (widget-value widget) 'saved-face-comment))))
3227 ("Erase Customization" custom-face-reset-standard 3232 ,@(when (or custom-file user-init-file)
3228 (lambda (widget) 3233 '(("Erase Customization" custom-face-reset-standard
3229 (get (widget-value widget) 'face-defface-spec))) 3234 (lambda (widget)
3235 (get (widget-value widget) 'face-defface-spec)))))
3230 ("---" ignore ignore) 3236 ("---" ignore ignore)
3231 ("Add Comment" custom-comment-show custom-comment-invisible-p) 3237 ("Add Comment" custom-comment-show custom-comment-invisible-p)
3232 ("---" ignore ignore) 3238 ("---" ignore ignore)
@@ -3808,21 +3814,23 @@ Creating group members... %2d%%"
3808 (insert "/\n"))))) 3814 (insert "/\n")))))
3809 3815
3810(defvar custom-group-menu 3816(defvar custom-group-menu
3811 '(("Set for Current Session" custom-group-set 3817 `(("Set for Current Session" custom-group-set
3812 (lambda (widget) 3818 (lambda (widget)
3813 (eq (widget-get widget :custom-state) 'modified))) 3819 (eq (widget-get widget :custom-state) 'modified)))
3814 ("Save for Future Sessions" custom-group-save 3820 ,@(when (or custom-file user-init-file)
3815 (lambda (widget) 3821 '(("Save for Future Sessions" custom-group-save
3816 (memq (widget-get widget :custom-state) '(modified set)))) 3822 (lambda (widget)
3823 (memq (widget-get widget :custom-state) '(modified set))))))
3817 ("Reset to Current" custom-group-reset-current 3824 ("Reset to Current" custom-group-reset-current
3818 (lambda (widget) 3825 (lambda (widget)
3819 (memq (widget-get widget :custom-state) '(modified)))) 3826 (memq (widget-get widget :custom-state) '(modified))))
3820 ("Reset to Saved" custom-group-reset-saved 3827 ("Reset to Saved" custom-group-reset-saved
3821 (lambda (widget) 3828 (lambda (widget)
3822 (memq (widget-get widget :custom-state) '(modified set)))) 3829 (memq (widget-get widget :custom-state) '(modified set))))
3823 ("Reset to standard setting" custom-group-reset-standard 3830 ,@(when (or custom-file user-init-file)
3824 (lambda (widget) 3831 '(("Reset to standard setting" custom-group-reset-standard
3825 (memq (widget-get widget :custom-state) '(modified set saved))))) 3832 (lambda (widget)
3833 (memq (widget-get widget :custom-state) '(modified set saved)))))))
3826 "Alist of actions for the `custom-group' widget. 3834 "Alist of actions for the `custom-group' widget.
3827Each entry has the form (NAME ACTION FILTER) where NAME is the name of 3835Each entry has the form (NAME ACTION FILTER) where NAME is the name of
3828the menu entry, ACTION is the function to call on the widget when the 3836the menu entry, ACTION is the function to call on the widget when the