diff options
| author | Eric S. Raymond | 2008-05-16 22:42:36 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2008-05-16 22:42:36 +0000 |
| commit | 7c2ec3f97517f249902d26040e2f571852a4791b (patch) | |
| tree | e8bcb9c1bdf764516f2591a7ea20ab988d205150 | |
| parent | c8039c6b14d6fdb9d121129e42b376eaa43a67cd (diff) | |
| download | emacs-7c2ec3f97517f249902d26040e2f571852a4791b.tar.gz emacs-7c2ec3f97517f249902d26040e2f571852a4791b.zip | |
Use state prettyprinter in vc-dir buffers.
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/vc1-xtra.texi | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/vc.el | 18 |
4 files changed, 24 insertions, 11 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 54528646c7c..a8410167cf7 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-05-16 Eric S. Raymond <esr@snark.thyrsus.com> | ||
| 2 | |||
| 3 | * vc2-xtra.texi: Mofify an example so it reflects what vc.el | ||
| 4 | now does. | ||
| 5 | |||
| 1 | 2008-05-15 Eric S. Raymond <esr@snark.thyrsus.com> | 6 | 2008-05-15 Eric S. Raymond <esr@snark.thyrsus.com> |
| 2 | 7 | ||
| 3 | * vc2-xtra.texi, emacs.texi, files.texi: Snapshots node renamed to | 8 | * vc2-xtra.texi, emacs.texi, files.texi: Snapshots node renamed to |
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index a9e081cb63b..8c0dc501070 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi | |||
| @@ -43,8 +43,8 @@ output is used. Here is an example using RCS: | |||
| 43 | @smallexample | 43 | @smallexample |
| 44 | @group | 44 | @group |
| 45 | DIRECTORY ./ | 45 | DIRECTORY ./ |
| 46 | edited file1.c | 46 | (modified) file1.c |
| 47 | up-to-date file2.c | 47 | (update) file2.c |
| 48 | @end group | 48 | @end group |
| 49 | @end smallexample | 49 | @end smallexample |
| 50 | 50 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e38b1236dc..17f42d14d5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | <<<<<<< ChangeLog | ||
| 2 | 2008-05-16 Eric S. Raymond <esr@snark.thyrsus.com> | ||
| 3 | |||
| 4 | * vc.el (vc-default-status-printer) | ||
| 5 | (vc-default-prettify-state-info): Enhance the state prettyprinter | ||
| 6 | to deall better with unknown states and indirect through it when | ||
| 7 | painting vc-dir buffers. | ||
| 8 | |||
| 1 | 2008-05-16 John Paul Wallington <jpw@pobox.com> | 9 | 2008-05-16 John Paul Wallington <jpw@pobox.com> |
| 2 | 10 | ||
| 3 | * vc-dispatcher.el (top-level): Don't require cl when compiling. | 11 | * vc-dispatcher.el (top-level): Don't require cl when compiling. |
diff --git a/lisp/vc.el b/lisp/vc.el index bcb5fd18d8b..73f0f8a013a 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -1808,24 +1808,24 @@ specific headers." | |||
| 1808 | (defun vc-default-status-printer (backend fileentry) | 1808 | (defun vc-default-status-printer (backend fileentry) |
| 1809 | "Pretty print FILEENTRY." | 1809 | "Pretty print FILEENTRY." |
| 1810 | ;; If you change the layout here, change vc-dir-move-to-goal-column. | 1810 | ;; If you change the layout here, change vc-dir-move-to-goal-column. |
| 1811 | (let ((state | 1811 | (let* ((isdir (vc-dir-fileinfo->directory fileentry)) |
| 1812 | (if (vc-dir-fileinfo->directory fileentry) | 1812 | (state (if isdir 'DIRECTORY (vc-dir-fileinfo->state fileentry))) |
| 1813 | 'DIRECTORY | 1813 | (filename (vc-dir-fileinfo->name fileentry)) |
| 1814 | (vc-dir-fileinfo->state fileentry)))) | 1814 | (prettified (if isdir state (vc-call-backend backend 'prettify-state-info filename)))) |
| 1815 | (insert | 1815 | (insert |
| 1816 | (propertize | 1816 | (propertize |
| 1817 | (format "%c" (if (vc-dir-fileinfo->marked fileentry) ?* ? )) | 1817 | (format "%c" (if (vc-dir-fileinfo->marked fileentry) ?* ? )) |
| 1818 | 'face 'font-lock-type-face) | 1818 | 'face 'font-lock-type-face) |
| 1819 | " " | 1819 | " " |
| 1820 | (propertize | 1820 | (propertize |
| 1821 | (format "%-20s" state) | 1821 | (format "%-20s" prettified) |
| 1822 | 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) | 1822 | 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) |
| 1823 | ((memq state '(missing conflict)) 'font-lock-warning-face) | 1823 | ((memq state '(missing conflict)) 'font-lock-warning-face) |
| 1824 | (t 'font-lock-variable-name-face)) | 1824 | (t 'font-lock-variable-name-face)) |
| 1825 | 'mouse-face 'highlight) | 1825 | 'mouse-face 'highlight) |
| 1826 | " " | 1826 | " " |
| 1827 | (propertize | 1827 | (propertize |
| 1828 | (format "%s" (vc-dir-fileinfo->name fileentry)) | 1828 | (format "%s" filename) |
| 1829 | 'face 'font-lock-function-name-face | 1829 | 'face 'font-lock-function-name-face |
| 1830 | 'mouse-face 'highlight)))) | 1830 | 'mouse-face 'highlight)))) |
| 1831 | 1831 | ||
| @@ -2643,16 +2643,16 @@ to provide the `find-revision' operation instead." | |||
| 2643 | (let* ((state (vc-state file)) | 2643 | (let* ((state (vc-state file)) |
| 2644 | (statestring | 2644 | (statestring |
| 2645 | (cond | 2645 | (cond |
| 2646 | ((stringp state) (concat "(" state ")")) | 2646 | ((stringp state) (concat "(locked:" state ")")) |
| 2647 | ((eq state 'edited) "(modified)") | 2647 | ((eq state 'edited) "(modified)") |
| 2648 | ((eq state 'needs-merge) "(merge)") | 2648 | ((eq state 'needs-merge) "(merge)") |
| 2649 | ((eq state 'needs-update) "(update)") | 2649 | ((eq state 'needs-update) "(update)") |
| 2650 | ((eq state 'added) "(added)") | 2650 | ((eq state 'added) "(added)") |
| 2651 | ((eq state 'removed) "(removed)") | 2651 | ((eq state 'removed) "(removed)") |
| 2652 | ((eq state 'ignored) "(ignored)") | 2652 | ((eq state 'ignored) "(ignored)") |
| 2653 | ((eq state 'unregistered) "?") | 2653 | ((eq state 'unregistered) "(unregistered)") |
| 2654 | ((eq state 'unlocked-changes) "(stale)") | 2654 | ((eq state 'unlocked-changes) "(stale)") |
| 2655 | ((not state) "(unknown)"))) | 2655 | (t (concat "(unknown:" state ")")))) |
| 2656 | (buffer | 2656 | (buffer |
| 2657 | (get-file-buffer file)) | 2657 | (get-file-buffer file)) |
| 2658 | (modflag | 2658 | (modflag |