changeset 64931:94a635fcc582

(custom-save-all, custom-save-delete): Bind recentf-exclude to exclude custom-file.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 12 Aug 2005 11:17:57 +0000
parents fbe8143fcdeb
children b866c80472dc
files lisp/cus-edit.el
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Fri Aug 12 10:28:48 2005 +0000
+++ b/lisp/cus-edit.el	Fri Aug 12 11:17:57 2005 +0000
@@ -141,7 +141,8 @@
 (require 'cus-face)
 (require 'wid-edit)
 (eval-when-compile
-  (defvar custom-versions-load-alist))	; from cus-load
+  (defvar custom-versions-load-alist)	; from cus-load
+  (defvar recentf-exclude))		; from recentf.el
 
 (condition-case nil
     (require 'cus-load)
@@ -3901,7 +3902,12 @@
   "Visit `custom-file' and delete all calls to SYMBOL from it.
 Leave point at the old location of the first such call,
 or (if there were none) at the end of the buffer."
-  (let ((default-major-mode 'emacs-lisp-mode))
+  (let ((default-major-mode 'emacs-lisp-mode)
+	(recentf-exclude (if recentf-mode
+			     (cons (concat "\\`"
+					   (regexp-quote (custom-file))
+					   "\\'")
+				   recentf-exclude))))
     (set-buffer (find-file-noselect (custom-file))))
   (goto-char (point-min))
   ;; Skip all whitespace and comments.
@@ -4130,7 +4136,12 @@
     (custom-save-variables)
     (custom-save-faces)
     (save-excursion
-      (let ((default-major-mode nil))
+      (let ((default-major-mode nil)
+	    (recentf-exclude (if recentf-mode
+				 (cons (concat "\\`"
+					       (regexp-quote (custom-file))
+					       "\\'")
+				       recentf-exclude))))
 	(set-buffer (find-file-noselect (custom-file))))
       (let ((file-precious-flag t))
 	(save-buffer)))))