help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Backup Blacklist


From: Juanma Barranquero
Subject: Re: Backup Blacklist
Date: Fri, 5 Jan 2007 13:39:42 +0100

On 1/4/07, Matthew Flaschen <address@hidden> wrote:

Thanks for all your patience and help.

It's been fun ;)

(even
though I haven't finished testing the package).

When you test it, use this version of `bex-enable-predicate':

(defun bex-enable-predicate (file)
 "Alternate `backup-enable-predicate' function that excludes from
backups those files registered with `bex-exclude-files' or
`bex-exclude-file-from-backup'."
 (if bex-previous-backup-predicate
     (let ((regexp (get 'backup-exclude :regexp)))
       (if (and regexp
                (let ((case-fold-search bex-case-fold-search))
                  (string-match regexp (expand-file-name file))))
           nil
         (funcall bex-previous-backup-predicate file)))
   nil))

It's a small change to support the case that `backup-enable-predicate'
is nil (which is uncommon, but possible). Note that in this case, no
file is ever backed up (because backup-exclude can only exclude files,
and there's no function ever returning t for any of them).

                   /L/e/k/t/u




reply via email to

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