Mercurial > emacs
comparison lisp/vc-hooks.el @ 83250:89ac10c67e45
Merged from miles@gnu.org--gnu-2005 (patch 12-13, 79-90)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-79
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-80
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-81
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-82
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-83
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-84
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-85
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-86
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-87
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-88
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-89
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-90
Update from CVS: man/calc.texi: Add macro for LaTeX for info output.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-12
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-13
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-290
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 10 Feb 2005 20:43:55 +0000 |
parents | 549734260e34 aac0a33f5772 |
children | 360860a0006f |
comparison
equal
deleted
inserted
replaced
83249:267c2ab562ab | 83250:89ac10c67e45 |
---|---|
147 (const :tag "Don't stay local" nil) | 147 (const :tag "Don't stay local" nil) |
148 (list :format "\nExamine hostname and %v" :tag "Examine hostname ..." | 148 (list :format "\nExamine hostname and %v" :tag "Examine hostname ..." |
149 (set :format "%v" :inline t (const :format "%t" :tag "don't" except)) | 149 (set :format "%v" :inline t (const :format "%t" :tag "don't" except)) |
150 (regexp :format " stay local,\n%t: %v" :tag "if it matches") | 150 (regexp :format " stay local,\n%t: %v" :tag "if it matches") |
151 (repeat :format "%v%i\n" :inline t (regexp :tag "or")))) | 151 (repeat :format "%v%i\n" :inline t (regexp :tag "or")))) |
152 :version "21.4" | 152 :version "22.1" |
153 :group 'vc) | 153 :group 'vc) |
154 | 154 |
155 (defun vc-stay-local-p (file) | 155 (defun vc-stay-local-p (file) |
156 "Return non-nil if VC should stay local when handling FILE. | 156 "Return non-nil if VC should stay local when handling FILE. |
157 This uses the `repository-hostname' backend operation." | 157 This uses the `repository-hostname' backend operation." |
630 "Make a backup copy of FILE, which is assumed in sync with the repository. | 630 "Make a backup copy of FILE, which is assumed in sync with the repository. |
631 Before doing that, check if there are any old backups and get rid of them." | 631 Before doing that, check if there are any old backups and get rid of them." |
632 (unless (and (fboundp 'msdos-long-file-names) | 632 (unless (and (fboundp 'msdos-long-file-names) |
633 (not (with-no-warnings (msdos-long-file-names)))) | 633 (not (with-no-warnings (msdos-long-file-names)))) |
634 (vc-delete-automatic-version-backups file) | 634 (vc-delete-automatic-version-backups file) |
635 (copy-file file (vc-version-backup-file-name file) | 635 (condition-case nil |
636 nil 'keep-date))) | 636 (copy-file file (vc-version-backup-file-name file) |
637 nil 'keep-date) | |
638 ;; It's ok if it doesn't work (e.g. directory not writable), | |
639 ;; since this is just for efficiency. | |
640 (file-error | |
641 (message | |
642 (concat "Warning: Cannot make version backup; " | |
643 "diff/revert therefore not local")))))) | |
637 | 644 |
638 (defun vc-before-save () | 645 (defun vc-before-save () |
639 "Function to be called by `basic-save-buffer' (in files.el)." | 646 "Function to be called by `basic-save-buffer' (in files.el)." |
640 ;; If the file on disk is still in sync with the repository, | 647 ;; If the file on disk is still in sync with the repository, |
641 ;; and version backups should be made, copy the file to | 648 ;; and version backups should be made, copy the file to |