aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2008-05-15 14:32:49 +0000
committerEric S. Raymond2008-05-15 14:32:49 +0000
commitd536a90488590768607dd4586eec21e9e9a71446 (patch)
tree7c56f57218ce869ba8df192c5db9df359edc498c
parent97275f80a9c17f3fb6c8cd126fda6038d0ab6cb3 (diff)
downloademacs-d536a90488590768607dd4586eec21e9e9a71446.tar.gz
emacs-d536a90488590768607dd4586eec21e9e9a71446.zip
Remove assumptions about buffer names.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/vc-dispatcher.el30
-rw-r--r--lisp/vc.el2
3 files changed, 19 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 15445ce113b..96f0d611113 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -5,6 +5,9 @@
5 5
6 * vc.el, vc-dispatcher.el (vc-dir-menu-map-filter): Moved. 6 * vc.el, vc-dispatcher.el (vc-dir-menu-map-filter): Moved.
7 7
8 * vc.el, vc-dispatcher.el (vc-dir-menu-map): Remove assumption
9 about buffer names.
10
82008-05-15 Glenn Morris <rgm@gnu.org> 112008-05-15 Glenn Morris <rgm@gnu.org>
9 12
10 * vc-hooks.el (vc-directory-resynch-file): Fix declaration. 13 * vc-hooks.el (vc-directory-resynch-file): Fix declaration.
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el
index f04dc4dc7cd..e117622b7af 100644
--- a/lisp/vc-dispatcher.el
+++ b/lisp/vc-dispatcher.el
@@ -162,7 +162,7 @@ preserve the setting."
162 162
163;; In a log entry buffer, this is a local variable 163;; In a log entry buffer, this is a local variable
164;; that points to the buffer for which it was made 164;; that points to the buffer for which it was made
165;; (either a file, or a VC directory buffer). 165;; (either a file, or a directory buffer).
166(defvar vc-parent-buffer nil) 166(defvar vc-parent-buffer nil)
167(put 'vc-parent-buffer 'permanent-local t) 167(put 'vc-parent-buffer 'permanent-local t)
168(defvar vc-parent-buffer-name nil) 168(defvar vc-parent-buffer-name nil)
@@ -239,7 +239,7 @@ Another is that undo information is not kept."
239 (concat " " (propertize "[waiting...]" 239 (concat " " (propertize "[waiting...]"
240 'face 'mode-line-emphasis 240 'face 'mode-line-emphasis
241 'help-echo 241 'help-echo
242 "A VC command is in progress in this buffer")))) 242 "A command is in progress in this buffer"))))
243 243
244(defun vc-exec-after (code) 244(defun vc-exec-after (code)
245 "Eval CODE when the current buffer's process is done. 245 "Eval CODE when the current buffer's process is done.
@@ -521,7 +521,7 @@ NOT-URGENT means it is ok to continue if the user says not to save."
521;; Set up key bindings for use while editing log messages 521;; Set up key bindings for use while editing log messages
522 522
523(defun vc-log-edit (fileset) 523(defun vc-log-edit (fileset)
524 "Set up `log-edit' for use with VC on FILE." 524 "Set up `log-edit' for use on FILE."
525 (setq default-directory 525 (setq default-directory
526 (with-current-buffer vc-parent-buffer default-directory)) 526 (with-current-buffer vc-parent-buffer default-directory))
527 (log-edit 'vc-finish-logentry 527 (log-edit 'vc-finish-logentry
@@ -677,12 +677,12 @@ See `run-hooks'."
677 ;; Must be in sync with vc-default-status-printer. 677 ;; Must be in sync with vc-default-status-printer.
678 (forward-char 25)) 678 (forward-char 25))
679 679
680(defun vc-dir-prepare-status-buffer (dir &optional create-new) 680(defun vc-dir-prepare-status-buffer (bname dir &optional create-new)
681 "Find a *vc-dir* buffer showing DIR, or create a new one." 681 "Find a buffer named BNAME showing DIR, or create a new one."
682 (setq dir (expand-file-name dir)) 682 (setq dir (expand-file-name dir))
683 (let* ((bname "*vc-dir*") 683 (let*
684 ;; Look for another *vc-dir* buffer visiting the same directory. 684 ;; Look for another buffer name BNAME visiting the same directory.
685 (buf (save-excursion 685 ((buf (save-excursion
686 (unless create-new 686 (unless create-new
687 (dolist (buffer (buffer-list)) 687 (dolist (buffer (buffer-list))
688 (set-buffer buffer) 688 (set-buffer buffer)
@@ -690,7 +690,7 @@ See `run-hooks'."
690 (string= (expand-file-name default-directory) dir)) 690 (string= (expand-file-name default-directory) dir))
691 (return buffer))))))) 691 (return buffer)))))))
692 (or buf 692 (or buf
693 ;; Create a new *vc-dir* buffer. 693 ;; Create a new buffer named BNAME.
694 (with-current-buffer (create-file-buffer bname) 694 (with-current-buffer (create-file-buffer bname)
695 (cd dir) 695 (cd dir)
696 (vc-setup-buffer (current-buffer)) 696 (vc-setup-buffer (current-buffer))
@@ -700,7 +700,7 @@ See `run-hooks'."
700 (current-buffer))))) 700 (current-buffer)))))
701 701
702(defvar vc-dir-menu-map 702(defvar vc-dir-menu-map
703 (let ((map (make-sparse-keymap "VC-dir"))) 703 (let ((map (make-sparse-keymap)))
704 (define-key map [quit] 704 (define-key map [quit]
705 '(menu-item "Quit" quit-window 705 '(menu-item "Quit" quit-window
706 :help "Quit")) 706 :help "Quit"))
@@ -801,7 +801,7 @@ See `run-hooks'."
801 '(menu-item 801 '(menu-item
802 ;; This is used so that client modes can add mode-specific 802 ;; This is used so that client modes can add mode-specific
803 ;; menu items to vc-dir-menu-map. 803 ;; menu items to vc-dir-menu-map.
804 "*vc-dir*" ,vc-dir-menu-map :filter vc-dir-menu-map-filter)) 804 "*vc-dispatcher*" ,vc-dir-menu-map :filter vc-dir-menu-map-filter))
805 map) 805 map)
806 "Keymap for directory buffer.") 806 "Keymap for directory buffer.")
807 807
@@ -1099,7 +1099,7 @@ line."
1099With a prefix argument mark all files. 1099With a prefix argument mark all files.
1100If the current entry is a directory, mark all child files. 1100If the current entry is a directory, mark all child files.
1101 1101
1102The VC commands operate on files that are on the same state. 1102The commands operate on files that are on the same state.
1103This command is intended to make it easy to select all files that 1103This command is intended to make it easy to select all files that
1104share the same state." 1104share the same state."
1105 (interactive "P") 1105 (interactive "P")
@@ -1176,7 +1176,7 @@ line."
1176With a prefix argument unmark all files. 1176With a prefix argument unmark all files.
1177If the current entry is a directory, unmark all the child files. 1177If the current entry is a directory, unmark all the child files.
1178 1178
1179The VC commands operate on files that are on the same state. 1179The commands operate on files that are on the same state.
1180This command is intended to make it easy to deselect all files 1180This command is intended to make it easy to deselect all files
1181that share the same state." 1181that share the same state."
1182 (interactive "P") 1182 (interactive "P")
@@ -1316,11 +1316,11 @@ m - marks a file/directory or if the region is active, mark all the files
1316 directory is marked 1316 directory is marked
1317u - marks a file/directory or if the region is active, unmark all the files 1317u - marks a file/directory or if the region is active, unmark all the files
1318 in region. 1318 in region.
1319M - if the cursor is on a file: mark all the files with the same VC state as 1319M - if the cursor is on a file: mark all the files with the same state as
1320 the current file 1320 the current file
1321 - if the cursor is on a directory: mark all child files 1321 - if the cursor is on a directory: mark all child files
1322 - with a prefix argument: mark all files 1322 - with a prefix argument: mark all files
1323U - if the cursor is on a file: unmark all the files with the same VC state 1323U - if the cursor is on a file: unmark all the files with the same state
1324 as the current file 1324 as the current file
1325 - if the cursor is on a directory: unmark all child files 1325 - if the cursor is on a directory: unmark all child files
1326 - with a prefix argument: unmark all files 1326 - with a prefix argument: unmark all files
diff --git a/lisp/vc.el b/lisp/vc.el
index 0f522ffb9c4..90d2bde0df2 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1983,7 +1983,7 @@ outside of VC) and one wants to do some operation on it."
1983(defun vc-dir (dir) 1983(defun vc-dir (dir)
1984 "Show the VC status for DIR." 1984 "Show the VC status for DIR."
1985 (interactive "DVC status for directory: ") 1985 (interactive "DVC status for directory: ")
1986 (pop-to-buffer (vc-dir-prepare-status-buffer dir)) 1986 (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir))
1987 (if (and (derived-mode-p 'vc-dir-mode) (boundp 'client-object)) 1987 (if (and (derived-mode-p 'vc-dir-mode) (boundp 'client-object))
1988 (vc-dir-refresh) 1988 (vc-dir-refresh)
1989 ;; Otherwise, initialize a new view using the dispatcher layer 1989 ;; Otherwise, initialize a new view using the dispatcher layer