Hello
This is a bizarre problem.
Consider the function vc-register. I can call it
interactively or I can put it in the after-save-hook (just
for testing purposes)
(add-hook (make-local-variable 'after-save-hook) 'vc-register)
And it behaves as expected.
However I have a second function ensure-in-vc-or-check-in,
(see below)
that function should checkin or register the file, when
called interactively it behaves as expected.
When putting it in the above hook
(add-hook (make-local-variable 'after-save-hook) 'ensure-in-vc-or-check-in)
Then it behaves as expected concerning the checkin but when
it has to register a file the VC-log buffer for the initial
comment is not displayed! It is there but not displayed so
completing the register is cumbersome.
Anybody can explain this to me?
Thanks
Uwe Brauer
(defun ensure-in-vc-or-check-in ()
"Automatically checkin file ,v can be in the same directory or in the
subdirectory RCS. The idea is to call that function only for files
not for buffers. See the function ensure-in-vc-or-check-in-modes
which could be use in an apropriate HOOK."
(interactive)
(when (buffer-file-name)
(if (or (and (file-exists-p (format "%s,v" (buffer-file-name))))
(and (file-exists-p (format "RCS/%s,v" (file-name-nondirectory
buffer-file-name)))))
(progn
(vc-checkin (buffer-file-name) nil "")
(vc-toggle-read-only)
(message "Checked in"))
(progn
(vc-register)))))
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta