diff options
| author | Dan Nicolaescu | 2008-05-12 16:37:30 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-05-12 16:37:30 +0000 |
| commit | 93614fc1f83ac10ea4bf179b85722ca7e724f31e (patch) | |
| tree | edeaa34d3733da8a1b9b61dc03615362c1b4bec0 | |
| parent | b257def74f82f6ec650636014ecd2acba76aaf3c (diff) | |
| download | emacs-93614fc1f83ac10ea4bf179b85722ca7e724f31e.tar.gz emacs-93614fc1f83ac10ea4bf179b85722ca7e724f31e.zip | |
(with-vc-file, edit-vc-file): Remove unused macros.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/vc.el | 39 |
2 files changed, 1 insertions, 39 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae63e0b4065..49388f59fbc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * vc.el (vc-annotate-show-diff-revision-at-line): Remove incorrect | 3 | * vc.el (vc-annotate-show-diff-revision-at-line): Remove incorrect |
| 4 | cons. Use vc-annotate-backend. | 4 | cons. Use vc-annotate-backend. |
| 5 | (with-vc-file, edit-vc-file): Remove unused macros. | ||
| 5 | 6 | ||
| 6 | 2008-05-12 Teodor Zlatanov <tzz@lifelogs.com> | 7 | 2008-05-12 Teodor Zlatanov <tzz@lifelogs.com> |
| 7 | 8 | ||
diff --git a/lisp/vc.el b/lisp/vc.el index 68f0aa2c464..c0998be883a 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -922,45 +922,6 @@ been updated to their corresponding values." | |||
| 922 | (put (intern file vc-file-prop-obarray) | 922 | (put (intern file vc-file-prop-obarray) |
| 923 | property (cdr setting)))))))) | 923 | property (cdr setting)))))))) |
| 924 | 924 | ||
| 925 | ;; Two macros for elisp programming | ||
| 926 | |||
| 927 | ;;;###autoload | ||
| 928 | (defmacro with-vc-file (file comment &rest body) | ||
| 929 | "Check out a writable copy of FILE if necessary, then execute BODY. | ||
| 930 | Check in FILE with COMMENT (a string) after BODY has been executed. | ||
| 931 | FILE is passed through `expand-file-name'; BODY executed within | ||
| 932 | `save-excursion'. If FILE is not under version control, or you are | ||
| 933 | using a locking version-control system and the file is locked by | ||
| 934 | somebody else, signal error." | ||
| 935 | (declare (debug t) (indent 2)) | ||
| 936 | (let ((filevar (make-symbol "file"))) | ||
| 937 | `(let ((,filevar (expand-file-name ,file))) | ||
| 938 | (or (vc-backend ,filevar) | ||
| 939 | (error "File not under version control: `%s'" file)) | ||
| 940 | (unless (vc-editable-p ,filevar) | ||
| 941 | (let ((state (vc-state ,filevar))) | ||
| 942 | (if (stringp state) | ||
| 943 | (error "`%s' is locking `%s'" state ,filevar) | ||
| 944 | (vc-checkout ,filevar t)))) | ||
| 945 | (save-excursion | ||
| 946 | ,@body) | ||
| 947 | (vc-checkin (list ,filevar) nil ,comment)))) | ||
| 948 | |||
| 949 | ;;;###autoload | ||
| 950 | (defmacro edit-vc-file (file comment &rest body) | ||
| 951 | "Edit FILE under version control, executing body. | ||
| 952 | Checkin with COMMENT after executing BODY. | ||
| 953 | This macro uses `with-vc-file', passing args to it. | ||
| 954 | However, before executing BODY, find FILE, and after BODY, save buffer." | ||
| 955 | (declare (debug t) (indent 2)) | ||
| 956 | (let ((filevar (make-symbol "file"))) | ||
| 957 | `(let ((,filevar (expand-file-name ,file))) | ||
| 958 | (with-vc-file | ||
| 959 | ,filevar ,comment | ||
| 960 | (set-buffer (find-file-noselect ,filevar)) | ||
| 961 | ,@body | ||
| 962 | (save-buffer))))) | ||
| 963 | |||
| 964 | ;;; Code for deducing what fileset and backend to assume | 925 | ;;; Code for deducing what fileset and backend to assume |
| 965 | 926 | ||
| 966 | (defun vc-responsible-backend (file &optional register) | 927 | (defun vc-responsible-backend (file &optional register) |