emacs-devel
[Top][All Lists]
Advanced

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

Re: backup method


From: Han Boetes
Subject: Re: backup method
Date: Thu, 27 Jan 2005 05:58:45 +0059
User-agent: Mutt/1.5.6i

So this is the normal code in files.el:

(defun normal-backup-enable-predicate (name)
  "Default `backup-enable-predicate' function.
Checks for files in `temporary-file-directory' or
`small-temporary-file-directory'."
  (not (or (let ((comp (compare-strings temporary-file-directory 0 nil
                                        name 0 nil)))
             ;; Directory is under temporary-file-directory.
             (and (not (eq comp t))
                  (< comp (- (length temporary-file-directory)))))
           (if small-temporary-file-directory
               (let ((comp (compare-strings small-temporary-file-directory
                                            0 nil
                                            name 0 nil)))
                 ;; Directory is under small-temporary-file-directory.
                 (and (not (eq comp t))
                      (< comp (- (length small-temporary-file-directory)))))))))


And that should look like:

(defun normal-backup-enable-predicate (name)
  "Default `backup-enable-predicate' function.
Checks for files in `temporary-file-directory' or
`small-temporary-file-directory'."
  (not (or (let ((comp (compare-strings temporary-file-directory 0 nil
                                        name 0 nil)))
             ;; Directory is under temporary-file-directory.
             (and (not (eq comp t))
                  (< comp (- (length temporary-file-directory))))
             ;; Nor under /tmp/
             ;; Insert magic and portable lispcode here.
                  )
           (if small-temporary-file-directory
               (let ((comp (compare-strings small-temporary-file-directory
                                            0 nil
                                            name 0 nil)))
                 ;; Directory is under small-temporary-file-directory.
                 (and (not (eq comp t))
                      (< comp (- (length small-temporary-file-directory)))))))))


Except that I don't understand how this should be written down in
lisp :-\



# Han




reply via email to

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