+2007-11-11 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * vc.el (vc-start-entry): Fix setting the in the case the function
+ is called from vc-dired. Use when instead of if where
+ appropriate.
+
2007-11-11 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* ps-print.el (ps-do-despool): Do not force ps-lpr-switches to be a
\(current one if no file). AFTER-HOOK specifies the local value
for vc-log-operation-hook."
(let ((parent
- (if (and files (equal (length files) 1))
- (get-file-buffer (car files))
- (current-buffer))))
- (if vc-before-checkin-hook
- (if files
- (with-current-buffer parent
- (run-hooks 'vc-before-checkin-hook))
- (run-hooks 'vc-before-checkin-hook)))
+ (if (eq major-mode 'vc-dired-mode)
+ ;; If we are called from VC dired, the parent buffer is
+ ;; the current buffer.
+ (current-buffer)
+ (if (and files (equal (length files) 1))
+ (get-file-buffer (car files))
+ (current-buffer)))))
+ (when vc-before-checkin-hook
+ (if files
+ (with-current-buffer parent
+ (run-hooks 'vc-before-checkin-hook))
+ (run-hooks 'vc-before-checkin-hook)))
(if (and comment (not initial-contents))
(set-buffer (get-buffer-create "*VC-log*"))
(pop-to-buffer (get-buffer-create "*VC-log*")))
;;(if file (vc-mode-line file))
(vc-log-edit files)
(make-local-variable 'vc-log-after-operation-hook)
- (if after-hook
- (setq vc-log-after-operation-hook after-hook))
+ (when after-hook
+ (setq vc-log-after-operation-hook after-hook))
(setq vc-log-operation action)
(setq vc-log-revision rev)
(when comment