From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han Boetes Newsgroups: gmane.emacs.devel Subject: Re: backup method Date: Thu, 27 Jan 2005 05:58:45 +0059 Message-ID: <20050127045907.GF6167@boetes.org> References: <20050127000210.GA6167@boetes.org> <200501270147.j0R1l2b06722@raven.dms.auburn.edu> <20050127020846.GC6167@boetes.org> <20050127022744.GD6167@boetes.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106803196 14440 80.91.229.6 (27 Jan 2005 05:19:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Jan 2005 05:19:56 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 27 06:19:50 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cu24L-0000Id-00 for ; Thu, 27 Jan 2005 06:19:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cu2Gh-0001Bl-7H for ged-emacs-devel@m.gmane.org; Thu, 27 Jan 2005 00:32:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cu2GR-0001BG-97 for emacs-devel@gnu.org; Thu, 27 Jan 2005 00:32:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cu2GP-0001As-LD for emacs-devel@gnu.org; Thu, 27 Jan 2005 00:32:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cu29m-0008JI-8x for emacs-devel@gnu.org; Thu, 27 Jan 2005 00:25:26 -0500 Original-Received: from [217.120.147.78] (helo=boetes.org) by monty-python.gnu.org with smtp (Exim 4.34) id 1Cu1jy-0005rF-PT for emacs-devel@gnu.org; Wed, 26 Jan 2005 23:58:47 -0500 Original-Received: (qmail 27627 invoked by uid 1000); 27 Jan 2005 04:59:07 -0000 Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <20050127022744.GD6167@boetes.org> User-Agent: Mutt/1.5.6i X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32579 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32579 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