comparison lisp/files.el @ 83276:26c9034f3533

Merged from miles@gnu.org--gnu-2005 (patch 192-203) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-192 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-193 Use gdb-ui breakpoint faces on ttys too * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-194 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-195 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-196 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-197 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-198 Tweak gdb-ui breakpoint faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-199 Tweak gdb-ui breakpoint faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-200 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-201 Tweak info/.arch-inventory to identify info/.cvsignore as source * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-202 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-203 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-316
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 23 Mar 2005 10:40:00 +0000
parents 1830bcd0eec0 e9883b26cb27
children 2006100ee57e
comparison
equal deleted inserted replaced
83275:87d0734390da 83276:26c9034f3533
1773 ("\\.f9[05]\\'" . f90-mode) 1773 ("\\.f9[05]\\'" . f90-mode)
1774 ("\\.indent\\.pro\\'" . fundamental-mode) ; to avoid idlwave-mode 1774 ("\\.indent\\.pro\\'" . fundamental-mode) ; to avoid idlwave-mode
1775 ("\\.pro\\'" . idlwave-mode) 1775 ("\\.pro\\'" . idlwave-mode)
1776 ("\\.prolog\\'" . prolog-mode) 1776 ("\\.prolog\\'" . prolog-mode)
1777 ("\\.tar\\'" . tar-mode) 1777 ("\\.tar\\'" . tar-mode)
1778 ("\\.\\(arc\\|zip\\|lzh\\|zoo\\|ear\\|jar\\|war\\)\\'" . archive-mode) 1778 ;; The list of archive file extensions should be in sync with
1779 ("\\.\\(ARC\\|ZIP\\|LZH\\|ZOO\\|EAR\\|JAR\\|WAR\\)\\'" . archive-mode) 1779 ;; `auto-coding-alist' with `no-conversion' coding system.
1780 ("\\.\\(arc\\|zip\\|lzh\\|zoo\\|[jew]ar\\)\\'" . archive-mode)
1781 ("\\.\\(ARC\\|ZIP\\|LZH\\|ZOO\\|[JEW]AR\\)\\'" . archive-mode)
1780 ("\\.sx[dmicw]\\'" . archive-mode) ; OpenOffice.org 1782 ("\\.sx[dmicw]\\'" . archive-mode) ; OpenOffice.org
1781 ;; Mailer puts message to be edited in 1783 ;; Mailer puts message to be edited in
1782 ;; /tmp/Re.... or Message 1784 ;; /tmp/Re.... or Message
1783 ("\\`/tmp/Re" . text-mode) 1785 ("\\`/tmp/Re" . text-mode)
1784 ("/Message[0-9]*\\'" . text-mode) 1786 ("/Message[0-9]*\\'" . text-mode)
2685 (if (or file-precious-flag 2687 (if (or file-precious-flag
2686 ; (file-symlink-p buffer-file-name) 2688 ; (file-symlink-p buffer-file-name)
2687 backup-by-copying 2689 backup-by-copying
2688 ;; Don't rename a suid or sgid file. 2690 ;; Don't rename a suid or sgid file.
2689 (and modes (< 0 (logand modes #o6000))) 2691 (and modes (< 0 (logand modes #o6000)))
2692 (not (file-writable-p (file-name-directory real-file-name)))
2690 (and backup-by-copying-when-linked 2693 (and backup-by-copying-when-linked
2691 (> (file-nlinks real-file-name) 1)) 2694 (> (file-nlinks real-file-name) 1))
2692 (and (or backup-by-copying-when-mismatch 2695 (and (or backup-by-copying-when-mismatch
2693 (integerp backup-by-copying-when-privileged-mismatch)) 2696 (integerp backup-by-copying-when-privileged-mismatch))
2694 (let ((attr (file-attributes real-file-name))) 2697 (let ((attr (file-attributes real-file-name)))
3101 (concat (file-name-as-directory ancestor) rest))) 3104 (concat (file-name-as-directory ancestor) rest)))
3102 ;; We matched FILENAME's directory equivalent. 3105 ;; We matched FILENAME's directory equivalent.
3103 ancestor)))))) 3106 ancestor))))))
3104 3107
3105 (defun save-buffer (&optional args) 3108 (defun save-buffer (&optional args)
3106 "Save current buffer in visited file if modified. Versions described below. 3109 "Save current buffer in visited file if modified. Variations are described below.
3107 By default, makes the previous version into a backup file 3110 By default, makes the previous version into a backup file
3108 if previously requested or if this is the first save. 3111 if previously requested or if this is the first save.
3109 With 1 \\[universal-argument], marks this version 3112 Prefixed with one \\[universal-argument], marks this version
3110 to become a backup when the next save is done. 3113 to become a backup when the next save is done.
3111 With 2 \\[universal-argument]'s, 3114 Prefixed with two \\[universal-argument]'s,
3112 unconditionally makes the previous version into a backup file. 3115 unconditionally makes the previous version into a backup file.
3113 With 3 \\[universal-argument]'s, marks this version 3116 Prefixed with three \\[universal-argument]'s, marks this version
3114 to become a backup when the next save is done, 3117 to become a backup when the next save is done,
3115 and unconditionally makes the previous version into a backup file. 3118 and unconditionally makes the previous version into a backup file.
3116 3119
3117 With argument of 0, never make the previous version into a backup file. 3120 With a numeric argument of 0, never make the previous version
3121 into a backup file.
3118 3122
3119 If a file's name is FOO, the names of its numbered backup versions are 3123 If a file's name is FOO, the names of its numbered backup versions are
3120 FOO.~i~ for various integers i. A non-numbered backup file is called FOO~. 3124 FOO.~i~ for various integers i. A non-numbered backup file is called FOO~.
3121 Numeric backups (rather than FOO~) will be made if value of 3125 Numeric backups (rather than FOO~) will be made if value of
3122 `version-control' is not the atom `never' and either there are already 3126 `version-control' is not the atom `never' and either there are already