diff options
| author | Dave Love | 2000-06-02 18:46:19 +0000 |
|---|---|---|
| committer | Dave Love | 2000-06-02 18:46:19 +0000 |
| commit | 37193ee6327794f520cf8856a27e57bbda8bba10 (patch) | |
| tree | 7c5ee0b8bbe6e36f07d3a40cd4fb639b6fabbe71 | |
| parent | a554b301b07f12d4ec2b18561c3e8e76f45b08f9 (diff) | |
| download | emacs-37193ee6327794f520cf8856a27e57bbda8bba10.tar.gz emacs-37193ee6327794f520cf8856a27e57bbda8bba10.zip | |
(convert-standard-filename): Doc fix.
(normal-backup-enable-predicate): New function.
(backup-enable-predicate): Use it to replace the lambda form.
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/files.el | 41 |
2 files changed, 36 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0e77ebdffa3..20b78b024c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,19 @@ | |||
| 1 | 2000-06-02 Dave Love <fx@gnu.org> | 1 | 2000-06-02 Dave Love <fx@gnu.org> |
| 2 | 2 | ||
| 3 | * files.el (convert-standard-filename): Doc fix. | ||
| 4 | (normal-backup-enable-predicate): New function. | ||
| 5 | (backup-enable-predicate): Use it to replace the lambda form. | ||
| 6 | |||
| 7 | * calendar/todo-mode.el: [This needs more work on the outline | ||
| 8 | stuff.] Doc fixes. | ||
| 9 | (todo) <defgroup>: Add :version. | ||
| 10 | (todo-add-category): Don't use pushnew. | ||
| 11 | (todo-cmd-raise): Fix typo. | ||
| 12 | (todo-top-priorities): Change temp buffer name. | ||
| 13 | (todo-category-alist): Avoid redundant lambda. | ||
| 14 | (todo-mode): Set paragraph-separate, outline-regexp from | ||
| 15 | todo-prefix. Use outline-next-heading. | ||
| 16 | |||
| 3 | * autoarg.el: Rewritten to use define-minor-mode. | 17 | * autoarg.el: Rewritten to use define-minor-mode. |
| 4 | (autoarg-kp-digits, autoarg-kp-mode-map): New variable. | 18 | (autoarg-kp-digits, autoarg-kp-mode-map): New variable. |
| 5 | (autoarg-kp-mode, autoarg-kp-digit-argument): New command. | 19 | (autoarg-kp-mode, autoarg-kp-digit-argument): New command. |
diff --git a/lisp/files.el b/lisp/files.el index b56d15aeafb..dfeefc1277e 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -133,24 +133,26 @@ This variable is relevant only if `backup-by-copying' and | |||
| 133 | :type '(choice (const nil) integer) | 133 | :type '(choice (const nil) integer) |
| 134 | :group 'backup) | 134 | :group 'backup) |
| 135 | 135 | ||
| 136 | (defvar backup-enable-predicate | 136 | (defun normal-backup-enable-predicate (name) |
| 137 | (lambda (name) | 137 | "Default `backup-enable-predicate' function. |
| 138 | (not (or (let ((comp (compare-strings temporary-file-directory 0 nil | 138 | Checks for files in `temporary-file-directory' or |
| 139 | name 0 nil))) | 139 | `small-temporary-file-directory'." |
| 140 | ;; Directory is under temporary-file-directory. | 140 | (not (or (let ((comp (compare-strings temporary-file-directory 0 nil |
| 141 | (and (not (eq comp t)) | 141 | name 0 nil))) |
| 142 | (< comp -1))) | 142 | ;; Directory is under temporary-file-directory. |
| 143 | (if small-temporary-file-directory | 143 | (and (not (eq comp t)) |
| 144 | (let ((comp (compare-strings small-temporary-file-directory | 144 | (< comp -1))) |
| 145 | 0 nil | 145 | (if small-temporary-file-directory |
| 146 | name 0 nil))) | 146 | (let ((comp (compare-strings small-temporary-file-directory |
| 147 | ;; Directory is under small-temporary-file-directory. | 147 | 0 nil |
| 148 | (and (not (eq comp t)) | 148 | name 0 nil))) |
| 149 | (< comp -1))))))) | 149 | ;; Directory is under small-temporary-file-directory. |
| 150 | (and (not (eq comp t)) | ||
| 151 | (< comp -1))))))) | ||
| 152 | |||
| 153 | (defvar backup-enable-predicate 'normal-backup-enable-predicate | ||
| 150 | "Predicate that looks at a file name and decides whether to make backups. | 154 | "Predicate that looks at a file name and decides whether to make backups. |
| 151 | Called with an absolute file name as argument, it returns t to enable backup. | 155 | Called with an absolute file name as argument, it returns t to enable backup.") |
| 152 | The default version checks for files in `temporary-file-directory' or | ||
| 153 | `small-temporary-file-directory'.") | ||
| 154 | 156 | ||
| 155 | (defcustom buffer-offer-save nil | 157 | (defcustom buffer-offer-save nil |
| 156 | "*Non-nil in a buffer means always offer to save buffer on exit. | 158 | "*Non-nil in a buffer means always offer to save buffer on exit. |
| @@ -458,8 +460,9 @@ Runs the usual ange-ftp hook, but only for completion operations." | |||
| 458 | (defun convert-standard-filename (filename) | 460 | (defun convert-standard-filename (filename) |
| 459 | "Convert a standard file's name to something suitable for the current OS. | 461 | "Convert a standard file's name to something suitable for the current OS. |
| 460 | This function's standard definition is trivial; it just returns the argument. | 462 | This function's standard definition is trivial; it just returns the argument. |
| 461 | However, on some systems, the function is redefined | 463 | However, on some systems, the function is redefined with a definition |
| 462 | with a definition that really does change some file names." | 464 | that really does change some file names to canonicalize certain |
| 465 | patterns and to guarantee valid names." | ||
| 463 | filename) | 466 | filename) |
| 464 | 467 | ||
| 465 | (defun pwd () | 468 | (defun pwd () |