Changeset 3861 for vendor/emacs-CVS_HEAD/lisp/cus-edit.el
- Timestamp:
- 09/10/05 08:18:55 (3 years ago)
- Files:
-
- vendor/emacs-CVS_HEAD/lisp/cus-edit.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/emacs-CVS_HEAD/lisp/cus-edit.el
r3806 r3861 671 671 :group 'custom-browse) 672 672 673 (defcustom custom-buffer-sort-alphabetically nil673 (defcustom custom-buffer-sort-alphabetically t 674 674 "If non-nil, sort members of each customization group alphabetically." 675 675 :type 'boolean … … 3837 3837 (widget-put widget :custom-state found))) 3838 3838 (custom-magic-reset widget)) 3839 3840 ;;; The `custom-save-all' Function. 3839 3840 ;;; Reading and writing the custom file. 3841 3841 3842 ;;;###autoload 3842 3843 (defcustom custom-file nil … … 3899 3900 user-init-file)))) 3900 3901 3902 ;;;###autoload 3903 (defun custom-save-all () 3904 "Save all customizations in `custom-file'." 3905 (let* ((filename (custom-file)) 3906 (recentf-exclude (if recentf-mode 3907 (cons (concat "\\`" 3908 (regexp-quote (custom-file)) 3909 "\\'") 3910 recentf-exclude))) 3911 (old-buffer (find-buffer-visiting filename))) 3912 (with-current-buffer (or old-buffer (find-file-noselect filename)) 3913 (let ((inhibit-read-only t)) 3914 (custom-save-variables) 3915 (custom-save-faces)) 3916 (let ((file-precious-flag t)) 3917 (save-buffer)) 3918 (unless old-buffer 3919 (kill-buffer (current-buffer)))))) 3920 3921 ;; Editing the custom file contents in a buffer. 3922 3901 3923 (defun custom-save-delete (symbol) 3902 " Visit `custom-file' and delete all calls to SYMBOL from it.3924 "Delete all calls to SYMBOL from the contents of the current buffer. 3903 3925 Leave point at the old location of the first such call, 3904 or (if there were none) at the end of the buffer." 3905 (let ((default-major-mode 'emacs-lisp-mode) 3906 (recentf-exclude (if recentf-mode 3907 (cons (concat "\\`" 3908 (regexp-quote (custom-file)) 3909 "\\'") 3910 recentf-exclude)))) 3911 (set-buffer (find-file-noselect (custom-file)))) 3926 or (if there were none) at the end of the buffer. 3927 3928 This function does not save the buffer." 3912 3929 (goto-char (point-min)) 3913 3930 ;; Skip all whitespace and comments. … … 4129 4146 ;; We really should update all custom buffers here. 4130 4147 (custom-save-all)) 4131 4132 ;;;###autoload 4133 (defun custom-save-all () 4134 "Save all customizations in `custom-file'." 4135 (let ((inhibit-read-only t)) 4136 (custom-save-variables) 4137 (custom-save-faces) 4138 (save-excursion 4139 (let ((default-major-mode nil) 4140 (recentf-exclude (if recentf-mode 4141 (cons (concat "\\`" 4142 (regexp-quote (custom-file)) 4143 "\\'") 4144 recentf-exclude)))) 4145 (set-buffer (find-file-noselect (custom-file)))) 4146 (let ((file-precious-flag t)) 4147 (save-buffer))))) 4148 4148 4149 4149 ;;; The Customize Menu. 4150 4150
