• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:Custom +defs:reset +defs:saved

35 ;; that the user will run with M-x, and `Custom-' for interactive commands.
60 ;; 3. The saved value.
62 ;; This is last value saved from customize.
64 ;; It is stored in the 'saved-value' property of the option, in a
65 ;; cons-cell whose car evaluates to the saved value.
79 ;; the saved value, if that exists, and as a last resort the standard
87 ;; saved (and standard) values, but affect others values for
92 ;; give you the unevaluated saved value, if any, otherwise the
113 ;; 4. saved
115 ;; The "think" value is the saved value.
125 ;; standard interactive Custom commands do not let you create a
126 ;; Custom buffer containing such variables. However, such Custom
469 ;;; Custom mode keymaps
477 (define-key map [remap self-insert-command] 'Custom-no-edit)
478 (define-key map "\^m" 'Custom-newline)
481 (define-key map "\C-c\C-c" 'Custom-set)
482 (define-key map "\C-x\C-s" 'Custom-save)
483 (define-key map "q" 'Custom-buffer-done)
484 (define-key map "u" 'Custom-goto-parent)
574 (with-current-buffer (get-buffer-create " *Custom-Work*")
704 "If non-nil, sort each customization group alphabetically in Custom buffer."
761 ;;; Custom Mode Commands.
766 (defun Custom-set ()
780 (defun Custom-save ()
799 (defvar custom-reset-menu
800 '(("Undo Edits" . Custom-reset-current)
801 ("Reset to Saved" . Custom-reset-saved)
802 ("Erase Customization (use standard values)" . Custom-reset-standard))
808 (defun custom-reset (event)
809 "Select item from reset menu."
812 custom-reset-menu
817 (defun Custom-reset-current (&rest ignore)
828 (widget-apply widget :custom-reset-current)))
832 (defun Custom-reset-saved (&rest ignore)
833 "Reset all edited or set settings in the buffer to their saved value.
834 This also shows the saved values in the buffer."
840 (y-or-n-p "Reset all settings (current values and buffer text) to saved values? "))
844 (widget-apply widget :custom-reset-saved)))
848 (defun Custom-reset-standard (&rest ignore)
849 "Erase all customization (either current or saved) for the group members.
851 This operation eliminates any saved values for the group members,
864 '(modified set changed saved rogue))
865 (widget-apply widget :custom-reset-standard)))
982 (put variable 'saved-value (list (custom-quote value)))
986 (put variable 'saved-variable-comment nil))
989 (put variable 'saved-variable-comment comment)))
1323 "Customize all user options set in this session but not saved."
1347 (get symbol 'saved-value)
1360 (defun customize-saved ()
1361 "Customize all already saved user options."
1365 (and (or (get symbol 'saved-face)
1366 (get symbol 'saved-face-comment))
1369 (and (or (get symbol 'saved-value)
1370 (get symbol 'saved-variable-comment))
1374 (error "No saved user options")
1400 (or (get symbol 'saved-value)
1444 "*Non-nil means exiting a Custom buffer should kill it."
1463 ;; This will check if the file is not saved.
1504 (defcustom custom-reset-button-menu nil
1505 "If non-nil, only show a single reset button in customize buffers.
1506 This button will have a menu with all three reset operations."
1515 (defun Custom-buffer-done (&rest ignore)
1516 "Exit current Custom buffer according to `custom-buffer-done-kill'."
1569 :tag "Custom file"
1587 (Custom-set)))
1603 (Custom-save))))
1604 (if custom-reset-button-menu
1609 :help-echo "Show a menu with reset operations."
1612 (custom-reset event))))
1618 :action 'Custom-reset-current)
1623 Reset all settings in this buffer to their saved values."
1624 :action 'Custom-reset-saved)
1631 :action 'Custom-reset-standard)))
1640 :action #'Custom-buffer-done)
1674 (mapc 'custom-magic-reset custom-options))
1890 (defface custom-saved '((t (:underline t)))
1891 "Face used when the customize item has been saved."
1894 (put 'custom-saved-face 'face-alias 'custom-saved)
1911 something in this group has been set but not saved.")
1915 (saved "!" custom-saved "\
1917 something in this group has been set and saved.")
1943 This item has been set but not saved.
1946 `saved'
2075 (defun custom-magic-reset (widget)
2196 (custom-magic-reset widget)
2469 "Return documentation of VARIABLE for use in Custom buffer.
2478 This variable automatically becomes buffer-local when set outside Custom.
2479 However, setting it through Custom sets the default value.")
2485 :help-echo "Set or reset this variable."
2495 :custom-reset-current 'custom-redraw
2496 :custom-reset-saved 'custom-variable-reset-saved
2497 :custom-reset-standard 'custom-variable-reset-standard
2571 ;; In lisp mode edit the saved value when possible.
2572 (let* ((value (cond ((get symbol 'saved-value)
2573 (car (get symbol 'saved-value)))
2657 ;; Don't push it !!! Custom assumes that the first child is the
2704 (setq temp (get symbol 'saved-variable-comment))
2714 ((eq (caar tmp) 'user) 'saved)
2755 ("Reset to Saved" custom-variable-reset-saved
2757 (and (or (get (widget-value widget) 'saved-value)
2758 (get (widget-value widget) 'saved-variable-comment))
2762 '(("Erase Customization" custom-variable-reset-standard
2766 '(modified set changed saved rogue)))))))
2767 ("Set to Backup Value" custom-variable-reset-backup
2878 (put symbol 'saved-value (list (widget-value child)))
2883 (put symbol 'saved-variable-comment comment))
2889 (put symbol 'saved-value
2895 (put symbol 'saved-variable-comment comment)))
2902 (defun custom-variable-reset-saved (widget)
2903 "Restore the saved value for the variable being edited by WIDGET.
2909 (value (get symbol 'saved-value))
2910 (comment (get symbol 'saved-variable-comment)))
2919 (error "No saved value for %s" symbol)))
2926 (defun custom-variable-reset-standard (widget)
2928 This operation eliminates any saved setting for the variable,
2939 (custom-push-theme 'theme-value symbol 'user 'reset)
2941 (when (or (get symbol 'saved-value) (get symbol 'saved-variable-comment))
2942 (put symbol 'saved-value nil)
2943 (put symbol 'saved-variable-comment nil)
2961 (defun custom-variable-reset-backup (widget)
3201 :help-echo "Set or reset this face."
3209 :custom-reset-current 'custom-redraw
3210 :custom-reset-saved 'custom-face-reset-saved
3211 :custom-reset-standard 'custom-face-reset-standard
3383 (get symbol 'saved-face)
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
3482 (setq tmp (get symbol 'saved-face))
3483 (setq temp (get symbol 'saved-face-comment))
3488 'saved)
3562 (put symbol 'saved-face value))
3566 (put symbol 'saved-face-comment comment)
3575 (defun custom-face-reset-saved (widget)
3579 (value (get symbol 'saved-face))
3580 (comment (get symbol 'saved-face-comment))
3583 (error "No saved value for this face"))
3598 (defun custom-face-reset-standard (widget)
3600 This operation eliminates any saved attributes for the face,
3610 (custom-push-theme 'theme-face symbol 'user 'reset)
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)
3765 :help-echo "Set or reset all members of this group."
3771 :custom-reset-current 'custom-group-reset-current
3772 :custom-reset-saved 'custom-group-reset-saved
3773 :custom-reset-standard 'custom-group-reset-standard
4011 (mapc 'custom-magic-reset children)
4031 ("Undo Edits" custom-group-reset-current
4034 ("Reset to Saved" custom-group-reset-saved
4038 '(("Erase Customization" custom-group-reset-standard
4040 (memq (widget-get widget :custom-state) '(modified set saved)))))))
4079 (defun custom-group-reset-current (widget)
4084 (widget-apply child :custom-reset-current)))
4087 (defun custom-group-reset-saved (widget)
4092 (widget-apply child :custom-reset-saved)))
4095 (defun custom-group-reset-standard (widget)
4096 "Reset all modified, set, or saved group members."
4100 '(modified set saved))
4101 (widget-apply child :custom-reset-standard)))
4121 (custom-magic-reset widget))
4133 You can set this option through Custom, if you carefully read the
4140 Note that both lines are necessary: the first line tells Custom to
4143 When you change this variable outside Custom, look in the
4149 If you save this option using Custom, Custom will write all
4150 currently saved customizations, including the new one for this
4163 this through Custom.
4180 ;; Custom settings hasn't been read. Saving
4223 (put symbol 'saved-face face)
4227 (put symbol 'saved-value value)
4231 (put symbol 'saved-variable-comment variable-comment)
4234 (put symbol 'saved-face-comment face-comment)
4269 ;; Move in front of local variables, otherwise long Custom
4286 (saved-list (make-list 1 0))
4288 ;; First create a sorted list of saved variables.
4291 (if (and (get symbol 'saved-value)
4295 (nconc saved-list (list symbol)))))
4296 (setq saved-list (sort (cdr saved-list) 'string<))
4300 ;; custom-set-variables was added by Custom.
4304 (dolist (symbol saved-list)
4306 (value (get symbol 'saved-value))
4312 (comment (get symbol 'saved-variable-comment)))
4321 (and (null spec) (get symbol 'saved-value)))
4358 (custom-save-delete 'custom-reset-faces)
4361 (saved-list (make-list 1 0))
4363 ;; First create a sorted list of saved faces.
4366 (if (and (get symbol 'saved-face)
4368 (nconc saved-list (list symbol)))))
4369 (setq saved-list (sort (cdr saved-list) 'string<))
4371 (if (memq 'default saved-list)
4372 (setq saved-list (cons 'default (delq 'default saved-list))))
4376 ;; custom-set-faces was added by Custom.
4380 (dolist (symbol saved-list)
4382 (value (get symbol 'saved-face))
4386 (comment (get symbol 'saved-face-comment)))
4389 (and (null spec) (get symbol 'saved-face)))
4494 ;;; The Custom Mode.
4496 (defun Custom-no-edit (pos &optional event)
4497 "Invoke button at POS, or refuse to allow editing of Custom buffer."
4499 (error "You can't edit this part of the Custom buffer"))
4501 (defun Custom-newline (pos &optional event)
4502 "Invoke button at POS, or refuse to allow editing of Custom buffer."
4507 (error "You can't edit this part of the Custom buffer"))))
4509 (easy-menu-define Custom-mode-menu
4512 `("Custom"
4514 ["Set" Custom-set t]
4515 ["Save" Custom-save t]
4516 ["Undo Edits" Custom-reset-current t]
4517 ["Reset to Saved" Custom-reset-saved t]
4518 ["Erase Customization" Custom-reset-standard t]
4523 (define-key map "\C-c\C-c" 'Custom-set)
4524 (define-key map "\C-x\C-s" 'Custom-save)
4530 (defun Custom-goto-parent ()
4542 "Hook called when entering Custom mode."
4563 Set all options from current text. \\[Custom-set]
4564 Make values in current text permanent. \\[Custom-save]
4565 Make text match actual option values. \\[Custom-reset-current]
4566 Reset options to permanent settings. \\[Custom-reset-saved]
4568 and buffer text to the standard values. \\[Custom-reset-standard]
4574 mode-name "Custom")
4576 (easy-menu-add Custom-mode-menu)
4608 "^No \\(?:customized\\|rogue\\|saved\\) user options"
4612 "^No \\(?:saved\\|backup\\) value for "