]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-save-all, custom-save-delete): Bind recentf-exclude to exclude
authorEli Zaretskii <eliz@gnu.org>
Fri, 12 Aug 2005 11:18:43 +0000 (11:18 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 12 Aug 2005 11:18:43 +0000 (11:18 +0000)
custom-file.

lisp/ChangeLog
lisp/cus-edit.el

index 205c0ef298d21e046502bf086cdeef9e2bfb2666..9e28fc16bb6f400cc529f87fedb0af8ace1b2ce7 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * cus-edit.el (custom-save-all, custom-save-delete): Bind
+       recentf-exclude to exclude custom-file.
+
 2005-08-12  Ehud Karni  <ehud@unix.mvs.co.il>
 
        * mail/rmailsum.el (rmail-summary-end-of-message): New command
index 832e320c5230b70eea7b4fc2f8629f85fac7d17e..c0e54b4add303add1c833c63b4978608d3ec7332 100644 (file)
 (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 @@ if only the first line of the docstring is shown."))
   "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 @@ or (if there were none) at the end of the buffer."
     (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)))))