Mercurial > emacs
comparison lisp/vc.el @ 90951:3619e7770f2e
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 793-802)
- Update from CVS
- Remove RCS keywords
- Merge from emacs--rel--22
* emacs--rel--22 (patch 42-50)
- Update from CVS
- Merge from gnus--rel--5.10
- Gnus ChangeLog tweaks
* gnus--rel--5.10 (patch 229-232)
- Merge from emacs--devo--0, emacs--rel--22
- ChangeLog tweak
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-223
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 16 Jun 2007 22:32:13 +0000 |
parents | d7172f202ab8 4d58251a76e1 |
children | 988f1edc9674 |
comparison
equal
deleted
inserted
replaced
90950:8568c29985a3 | 90951:3619e7770f2e |
---|---|
2094 (define-key map "v" vmap) | 2094 (define-key map "v" vmap) |
2095 (set-keymap-parent vmap vc-prefix-map) | 2095 (set-keymap-parent vmap vc-prefix-map) |
2096 (define-key vmap "t" 'vc-dired-toggle-terse-mode) | 2096 (define-key vmap "t" 'vc-dired-toggle-terse-mode) |
2097 map)) | 2097 map)) |
2098 | 2098 |
2099 (define-derived-mode vc-dired-mode dired-mode "Dired under VC" | 2099 (define-derived-mode vc-dired-mode dired-mode "Dired under " |
2100 "The major mode used in VC directory buffers. | 2100 "The major mode used in VC directory buffers. |
2101 | 2101 |
2102 It works like Dired, but lists only files under version control, with | 2102 It works like Dired, but lists only files under version control, with |
2103 the current VC state of each file being indicated in the place of the | 2103 the current VC state of each file being indicated in the place of the |
2104 file's link count, owner, group and size. Subdirectories are also | 2104 file's link count, owner, group and size. Subdirectories are also |
2154 (and (boundp 'vc-dired-switches) | 2154 (and (boundp 'vc-dired-switches) |
2155 vc-dired-switches | 2155 vc-dired-switches |
2156 (set (make-local-variable 'dired-actual-switches) | 2156 (set (make-local-variable 'dired-actual-switches) |
2157 vc-dired-switches)) | 2157 vc-dired-switches)) |
2158 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display) | 2158 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display) |
2159 (setq mode-name (concat mode-name (symbol-name (vc-responsible-backend | |
2160 default-directory)))) | |
2159 (setq vc-dired-mode t)) | 2161 (setq vc-dired-mode t)) |
2160 | 2162 |
2161 (defun vc-dired-toggle-terse-mode () | 2163 (defun vc-dired-toggle-terse-mode () |
2162 "Toggle terse display in VC Dired." | 2164 "Toggle terse display in VC Dired." |
2163 (interactive) | 2165 (interactive) |
2212 ;; subdir header line | 2214 ;; subdir header line |
2213 ((setq subdir (dired-get-subdir)) | 2215 ((setq subdir (dired-get-subdir)) |
2214 ;; if the backend supports it, get the state | 2216 ;; if the backend supports it, get the state |
2215 ;; of all files in this directory at once | 2217 ;; of all files in this directory at once |
2216 (let ((backend (vc-responsible-backend subdir))) | 2218 (let ((backend (vc-responsible-backend subdir))) |
2217 (if (vc-find-backend-function backend 'dir-state) | 2219 ;; check `backend' can really handle `subdir'. |
2220 (if (and (vc-call-backend backend 'responsible-p subdir) | |
2221 (vc-find-backend-function backend 'dir-state)) | |
2218 (vc-call-backend backend 'dir-state subdir))) | 2222 (vc-call-backend backend 'dir-state subdir))) |
2219 (forward-line 1) | 2223 (forward-line 1) |
2220 ;; erase (but don't remove) the "total" line | 2224 ;; erase (but don't remove) the "total" line |
2221 (delete-region (point) (line-end-position)) | 2225 (delete-region (point) (line-end-position)) |
2222 (beginning-of-line) | 2226 (beginning-of-line) |