summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-01-26 06:16:11 +0000
committerMiles Bader <miles@gnu.org>2007-01-26 06:16:11 +0000
commitc0466914ba3ad88c402b0301646b4b5db8aeb913 (patch)
tree964d8df324ab5f46872dfedc92ccea9fe50a1441 /lisp/files.el
parentc97a3f22ed5841f1c8bcdbb80df2bd49635c6a56 (diff)
parent58f8a3f97bd49484d0eb4f83a70662ded0daf9cc (diff)
downloademacs-c0466914ba3ad88c402b0301646b4b5db8aeb913.tar.gz
emacs-c0466914ba3ad88c402b0301646b4b5db8aeb913.tar.bz2
emacs-c0466914ba3ad88c402b0301646b4b5db8aeb913.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 586-614) - Update from CVS - Update from erc--emacs--22 - Merge from gnus--rel--5.10 - Merge from erc--main--0 - Make byte compiler correctly write circular constants * gnus--rel--5.10 (patch 186-196) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-162
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el19
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/files.el b/lisp/files.el
index cc4cd1220f9..1436899ef20 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2,7 +2,7 @@
;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996,
;; 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Maintainer: FSF
@@ -1223,11 +1223,11 @@ killed."
(unless (run-hook-with-args-until-failure 'kill-buffer-query-functions)
(error "Aborted"))
(when (and (buffer-modified-p) (buffer-file-name))
- (if (yes-or-no-p (format "Buffer %s is modified; save it first? "
+ (if (yes-or-no-p (format "Buffer %s is modified; kill anyway? "
(buffer-name)))
- (save-buffer)
- (unless (yes-or-no-p "Kill and replace the buffer without saving it? ")
- (error "Aborted"))))
+ (unless (yes-or-no-p "Kill and replace the buffer without saving it? ")
+ (error "Aborted"))
+ (save-buffer)))
(let ((obuf (current-buffer))
(ofile buffer-file-name)
(onum buffer-file-number)
@@ -1289,8 +1289,9 @@ Choose the buffer's name using `generate-new-buffer-name'."
(defun abbreviate-file-name (filename)
"Return a version of FILENAME shortened using `directory-abbrev-alist'.
-This also substitutes \"~\" for the user's home directory and
-removes automounter prefixes (see the variable `automount-dir-prefix')."
+This also substitutes \"~\" for the user's home directory (unless the
+home directory is a root directory) and removes automounter prefixes
+\(see the variable `automount-dir-prefix')."
;; Get rid of the prefixes added by the automounter.
(save-match-data
(if (and automount-dir-prefix
@@ -1650,7 +1651,8 @@ Do you want to revisit the file normally now? ")
(setq default-directory (file-name-directory buffer-file-name))
;; Turn off backup files for certain file names. Since
;; this is a permanent local, the major mode won't eliminate it.
- (and (not (funcall backup-enable-predicate buffer-file-name))
+ (and backup-enable-predicate
+ (not (funcall backup-enable-predicate buffer-file-name))
(progn
(make-local-variable 'backup-inhibited)
(setq backup-inhibited t)))
@@ -2904,6 +2906,7 @@ the old visited file has been renamed to the new name FILENAME."
;; Turn off backup files for certain file names.
;; Since this is a permanent local, the major mode won't eliminate it.
(and buffer-file-name
+ backup-enable-predicate
(not (funcall backup-enable-predicate buffer-file-name))
(progn
(make-local-variable 'backup-inhibited)