Show
Ignore:
Timestamp:
09/10/05 10:16:00 (3 years ago)
Author:
miyoshi
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/cus-edit.el

    r3809 r3863  
    671671  :group 'custom-browse) 
    672672 
    673 (defcustom custom-buffer-sort-alphabetically nil 
     673(defcustom custom-buffer-sort-alphabetically t 
    674674  "If non-nil, sort members of each customization group alphabetically." 
    675675  :type 'boolean 
     
    38373837      (widget-put widget :custom-state found))) 
    38383838  (custom-magic-reset widget)) 
    3839  
    3840 ;;; The `custom-save-all' Function. 
     3839  
     3840;;; Reading and writing the custom file. 
     3841 
    38413842;;;###autoload 
    38423843(defcustom custom-file nil 
     
    38993900         user-init-file)))) 
    39003901 
     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 
    39013923(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
    39033925Leave 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)))) 
     3926or (if there were none) at the end of the buffer. 
     3927 
     3928This function does not save the buffer." 
    39123929  (goto-char (point-min)) 
    39133930  ;; Skip all whitespace and comments. 
     
    41294146  ;; We really should update all custom buffers here. 
    41304147  (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  
    41494149;;; The Customize Menu. 
    41504150