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: Mon, 19 Feb 2007 15:49:22 +0000

As suggested on Feb 13, this addresses a problem where the custom- file is sometimes added to the "recentf" list of recently opened files, when custom-file is a non-canonical filename such as "~/.emacs- customizations.el" and the options are saved.

Please apply the patch at your discretion.

2007-02-19  David Reitter <address@hidden>

        * cus-edit.el (custom-save-all):  canonicalize custom-file before
        storing it in recentf-exclude.


Index: cus-edit.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/cus-edit.el,v
retrieving revision 1.316
diff -c -r1.316 cus-edit.el
*** lisp/cus-edit.el    21 Jan 2007 03:53:12 -0000      1.316
--- lisp/cus-edit.el    19 Feb 2007 15:44:56 -0000
***************
*** 4192,4202 ****
    (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 (let ((find-file-visit-truename t))
                           (or old-buffer (find-file-noselect filename)))
--- 4192,4204 ----
    (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 (let ((find-file-visit-truename t))
                           (or old-buffer (find-file-noselect filename)))







reply via email to

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