emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recentf / custom-file


From: David Reitter
Subject: recentf / custom-file
Date: Tue, 13 Feb 2007 15:36:29 +0000

Can I suggest this or a similar small change to cus-edit.el in order to store the canonicalized version of custom-file in recentf-exclude? As it is now it doesn't work in cases where `custom-file' is something like "~/.emacs-custom.el".




*** cus-edit.el 09 Nov 2006 16:48:43 +0000      1.312
--- cus-edit.el 13 Feb 2007 15:30:49 +0000      
***************
*** 4187,4197 ****
    (when (and (null custom-file) init-file-had-error)
(error "Cannot save customizations; init file was not fully loaded"))
    (let* ((filename (custom-file))
!        (recentf-exclude (if recentf-mode
!                             (cons (concat "\\`"
!                                           (regexp-quote (custom-file))
!                                           "\\'")
!                                   recentf-exclude)))
         (old-buffer (find-buffer-visiting filename)))
(with-current-buffer (or old-buffer (find-file-noselect filename))
        (unless (eq major-mode 'emacs-lisp-mode)
--- 4187,4199 ----
    (when (and (null custom-file) init-file-had-error)
(error "Cannot save customizations; init file was not fully loaded"))
    (let* ((filename (custom-file))
!        (recentf-exclude
!         (if recentf-mode
!             (cons (concat "\\`"
!                           (regexp-quote
!                            (recentf-expand-file-name (custom-file)))
!                           "\\'")
!                   recentf-exclude)))
         (old-buffer (find-buffer-visiting filename)))
(with-current-buffer (or old-buffer (find-file-noselect filename))
        (unless (eq major-mode 'emacs-lisp-mode)







reply via email to

[Prev in Thread] Current Thread [Next in Thread]