diff options
| author | Eli Zaretskii | 2005-08-12 11:18:43 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2005-08-12 11:18:43 +0000 |
| commit | 5cabd50e116e31dce2db5900fa47f39bf6a7cfb4 (patch) | |
| tree | 7ba84c15c5dd0c77e394f6f6cbfa51a63a2abdb8 /lisp/cus-edit.el | |
| parent | 234d828a0611bef3b356c0c98d3cd130bb89773f (diff) | |
| download | emacs-5cabd50e116e31dce2db5900fa47f39bf6a7cfb4.tar.gz emacs-5cabd50e116e31dce2db5900fa47f39bf6a7cfb4.zip | |
(custom-save-all, custom-save-delete): Bind recentf-exclude to exclude
custom-file.
Diffstat (limited to 'lisp/cus-edit.el')
| -rw-r--r-- | lisp/cus-edit.el | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 832e320c523..c0e54b4add3 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -141,7 +141,8 @@ | |||
| 141 | (require 'cus-face) | 141 | (require 'cus-face) |
| 142 | (require 'wid-edit) | 142 | (require 'wid-edit) |
| 143 | (eval-when-compile | 143 | (eval-when-compile |
| 144 | (defvar custom-versions-load-alist)) ; from cus-load | 144 | (defvar custom-versions-load-alist) ; from cus-load |
| 145 | (defvar recentf-exclude)) ; from recentf.el | ||
| 145 | 146 | ||
| 146 | (condition-case nil | 147 | (condition-case nil |
| 147 | (require 'cus-load) | 148 | (require 'cus-load) |
| @@ -3901,7 +3902,12 @@ if only the first line of the docstring is shown.")) | |||
| 3901 | "Visit `custom-file' and delete all calls to SYMBOL from it. | 3902 | "Visit `custom-file' and delete all calls to SYMBOL from it. |
| 3902 | Leave point at the old location of the first such call, | 3903 | Leave point at the old location of the first such call, |
| 3903 | or (if there were none) at the end of the buffer." | 3904 | or (if there were none) at the end of the buffer." |
| 3904 | (let ((default-major-mode 'emacs-lisp-mode)) | 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)))) | ||
| 3905 | (set-buffer (find-file-noselect (custom-file)))) | 3911 | (set-buffer (find-file-noselect (custom-file)))) |
| 3906 | (goto-char (point-min)) | 3912 | (goto-char (point-min)) |
| 3907 | ;; Skip all whitespace and comments. | 3913 | ;; Skip all whitespace and comments. |
| @@ -4130,7 +4136,12 @@ or (if there were none) at the end of the buffer." | |||
| 4130 | (custom-save-variables) | 4136 | (custom-save-variables) |
| 4131 | (custom-save-faces) | 4137 | (custom-save-faces) |
| 4132 | (save-excursion | 4138 | (save-excursion |
| 4133 | (let ((default-major-mode nil)) | 4139 | (let ((default-major-mode nil) |
| 4140 | (recentf-exclude (if recentf-mode | ||
| 4141 | (cons (concat "\\`" | ||
| 4142 | (regexp-quote (custom-file)) | ||
| 4143 | "\\'") | ||
| 4144 | recentf-exclude)))) | ||
| 4134 | (set-buffer (find-file-noselect (custom-file)))) | 4145 | (set-buffer (find-file-noselect (custom-file)))) |
| 4135 | (let ((file-precious-flag t)) | 4146 | (let ((file-precious-flag t)) |
| 4136 | (save-buffer))))) | 4147 | (save-buffer))))) |