:group 'vc)
(defcustom vc-delete-logbuf-window t
- "If non-nil, delete the *VC-log* buffer and window after each logical action.
+ "If non-nil, delete the log buffer and window after each logical action.
If nil, bury that buffer instead.
This is most useful if you have multiple windows on a frame and would like to
preserve the setting."
;; In a log entry buffer, this is a local variable
;; that points to the buffer for which it was made
-;; (either a file, or a VC directory buffer).
+;; (either a file, or a directory buffer).
(defvar vc-parent-buffer nil)
(put 'vc-parent-buffer 'permanent-local t)
(defvar vc-parent-buffer-name nil)
(concat " " (propertize "[waiting...]"
'face 'mode-line-emphasis
'help-echo
- "A VC command is in progress in this buffer"))))
+ "A command is in progress in this buffer"))))
(defun vc-exec-after (code)
"Eval CODE when the current buffer's process is done.
;; Set up key bindings for use while editing log messages
(defun vc-log-edit (fileset)
- "Set up `log-edit' for use with VC on FILE."
+ "Set up `log-edit' for use on FILE."
(setq default-directory
(with-current-buffer vc-parent-buffer default-directory))
(log-edit 'vc-finish-logentry
(set-buffer-modified-p nil)
(setq buffer-file-name nil))
-(defun vc-start-logentry (files extra comment initial-contents msg action &optional after-hook)
+(defun vc-start-logentry (files extra comment initial-contents msg logbuf action &optional after-hook)
"Accept a comment for an operation on FILES with extra data EXTRA.
-If COMMENT is nil, pop up a VC-log buffer, emit MSG, and set the
+If COMMENT is nil, pop up a LOGBUF buffer, emit MSG, and set the
action on close to ACTION. If COMMENT is a string and
INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial
contents of the log entry buffer. If COMMENT is a string and
(get-file-buffer (car files))
(current-buffer)))))
(if (and comment (not initial-contents))
- (set-buffer (get-buffer-create "*VC-log*"))
- (pop-to-buffer (get-buffer-create "*VC-log*")))
+ (set-buffer (get-buffer-create logbuf))
+ (pop-to-buffer (get-buffer-create logbuf)))
(set (make-local-variable 'vc-parent-buffer) parent)
(set (make-local-variable 'vc-parent-buffer-name)
(concat " from " (buffer-name vc-parent-buffer)))
(unless vc-log-operation
(error "No log operation is pending"))
;; save the parameters held in buffer-local variables
- (let ((log-operation vc-log-operation)
+ (let ((logbuf (current-buffer))
+ (log-operation vc-log-operation)
(log-fileset vc-log-fileset)
(log-extra vc-log-extra)
(log-entry (buffer-string))
log-extra
log-entry))
;; Remove checkin window (after the checkin so that if that fails
- ;; we don't zap the *VC-log* buffer and the typing therein).
+ ;; we don't zap the log buffer and the typing therein).
;; -- IMO this should be replaced with quit-window
- (let ((logbuf (get-buffer "*VC-log*")))
- (cond ((and logbuf vc-delete-logbuf-window)
- (delete-windows-on logbuf (selected-frame))
- ;; Kill buffer and delete any other dedicated windows/frames.
- (kill-buffer logbuf))
- (logbuf (pop-to-buffer "*VC-log*")
- (bury-buffer)
- (pop-to-buffer tmp-vc-parent-buffer))))
+ (cond ((and logbuf vc-delete-logbuf-window)
+ (delete-windows-on logbuf (selected-frame))
+ ;; Kill buffer and delete any other dedicated windows/frames.
+ (kill-buffer logbuf))
+ (logbuf (pop-to-buffer logbuf)
+ (bury-buffer)
+ (pop-to-buffer tmp-vc-parent-buffer)))
;; Now make sure we see the expanded headers
(when log-fileset
(mapc
;; Must be in sync with vc-default-status-printer.
(forward-char 25))
-(defun vc-dir-prepare-status-buffer (dir &optional create-new)
- "Find a *vc-dir* buffer showing DIR, or create a new one."
+(defun vc-dir-prepare-status-buffer (bname dir &optional create-new)
+ "Find a buffer named BNAME showing DIR, or create a new one."
(setq dir (expand-file-name dir))
- (let* ((bname "*vc-dir*")
- ;; Look for another *vc-dir* buffer visiting the same directory.
- (buf (save-excursion
+ (let*
+ ;; Look for another buffer name BNAME visiting the same directory.
+ ((buf (save-excursion
(unless create-new
(dolist (buffer (buffer-list))
(set-buffer buffer)
(string= (expand-file-name default-directory) dir))
(return buffer)))))))
(or buf
- ;; Create a new *vc-dir* buffer.
+ ;; Create a new buffer named BNAME.
(with-current-buffer (create-file-buffer bname)
(cd dir)
(vc-setup-buffer (current-buffer))
(current-buffer)))))
(defvar vc-dir-menu-map
- (let ((map (make-sparse-keymap "VC-dir")))
+ (let ((map (make-sparse-keymap)))
(define-key map [quit]
'(menu-item "Quit" quit-window
:help "Quit"))
'(menu-item
;; This is used so that client modes can add mode-specific
;; menu items to vc-dir-menu-map.
- "*vc-dir*" ,vc-dir-menu-map :filter vc-dir-menu-map-filter))
+ "*vc-dispatcher*" ,vc-dir-menu-map :filter vc-dir-menu-map-filter))
map)
"Keymap for directory buffer.")
With a prefix argument mark all files.
If the current entry is a directory, mark all child files.
-The VC commands operate on files that are on the same state.
+The commands operate on files that are on the same state.
This command is intended to make it easy to select all files that
share the same state."
(interactive "P")
With a prefix argument unmark all files.
If the current entry is a directory, unmark all the child files.
-The VC commands operate on files that are on the same state.
+The commands operate on files that are on the same state.
This command is intended to make it easy to deselect all files
that share the same state."
(interactive "P")
directory is marked
u - marks a file/directory or if the region is active, unmark all the files
in region.
-M - if the cursor is on a file: mark all the files with the same VC state as
+M - if the cursor is on a file: mark all the files with the same state as
the current file
- if the cursor is on a directory: mark all child files
- with a prefix argument: mark all files
-U - if the cursor is on a file: unmark all the files with the same VC state
+U - if the cursor is on a file: unmark all the files with the same state
as the current file
- if the cursor is on a directory: unmark all child files
- with a prefix argument: unmark all files