aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-05-27 00:10:53 +0000
committerDan Nicolaescu2008-05-27 00:10:53 +0000
commitdff34e7e981f957c59ec3744203f0290e1f0f4c6 (patch)
tree44dd4a90d29f52f949cd0506486fed385216e26d
parent476b4d351826011835e82a2736eacc81958de272 (diff)
downloademacs-dff34e7e981f957c59ec3744203f0290e1f0f4c6.tar.gz
emacs-dff34e7e981f957c59ec3744203f0290e1f0f4c6.zip
(Problems): Remove fixed issues.
(vc-dir-headers): Align labels. (vc-default-status-printer): Do no call prettify-state-info.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/vc.el27
2 files changed, 17 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f1f0a3a14d9..d28ce69ea23 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -8,6 +8,8 @@
8 (vc-dir-refresh): Use vc-dir-backend. Fix docstring. 8 (vc-dir-refresh): Use vc-dir-backend. Fix docstring.
9 (vc-dir-refresh-files): Use vc-dir-backend. Fix docstring. Reset 9 (vc-dir-refresh-files): Use vc-dir-backend. Fix docstring. Reset
10 the state for directories. 10 the state for directories.
11 (vc-dir-headers): Align labels.
12 (vc-default-status-printer): Do no call prettify-state-info.
11 13
12 * vc-dispatcher.el (vc-resynch-window): Fix mode-line updating. 14 * vc-dispatcher.el (vc-resynch-window): Fix mode-line updating.
13 (vc-dir-menu-map): Fix menu title for the menu bar and the popup menu. 15 (vc-dir-menu-map): Fix menu title for the menu bar and the popup menu.
diff --git a/lisp/vc.el b/lisp/vc.el
index 77a72f56962..d47f3469e3f 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -652,10 +652,6 @@
652;; created from more than one file. The error is: 652;; created from more than one file. The error is:
653;; vc-derived-from-dir-mode: Lisp nesting exceeds `max-lisp-eval-depth'. 653;; vc-derived-from-dir-mode: Lisp nesting exceeds `max-lisp-eval-depth'.
654;; 654;;
655;; - the vc-dir display is now bogus for git and mercurial.
656;;
657;; - the CVS vc-dir display is now incorrect from some states.
658;;
659;; - the *vc-dir* buffer is not updated correctly anymore after VC 655;; - the *vc-dir* buffer is not updated correctly anymore after VC
660;; operations that change the file state. 656;; operations that change the file state.
661;; 657;;
@@ -1808,18 +1804,21 @@ See Info node `Merging'."
1808 1804
1809(defun vc-default-status-extra-headers (backend dir) 1805(defun vc-default-status-extra-headers (backend dir)
1810 ;; Be loud by default to remind people to add code to display 1806 ;; Be loud by default to remind people to add code to display
1811 ;; backend specific headers. 1807 ;; backend specific headers.
1812 ;; XXX: change this to return nil before the release. 1808 ;; XXX: change this to return nil before the release.
1813 "Extra : Add backend specific headers here") 1809 (concat
1810 (propertize "Extra : " 'face 'font-lock-type-face)
1811 (propertize "Please add backend specific headers here. It's easy!"
1812 'face 'font-lock-warning-face)))
1814 1813
1815(defun vc-dir-headers (backend dir) 1814(defun vc-dir-headers (backend dir)
1816 "Display the headers in the *VC status* buffer. 1815 "Display the headers in the *VC dir* buffer.
1817It calls the `status-extra-headers' backend method to display backend 1816It calls the `status-extra-headers' backend method to display backend
1818specific headers." 1817specific headers."
1819 (concat 1818 (concat
1820 (propertize "VC backend: " 'face 'font-lock-type-face) 1819 (propertize "VC backend : " 'face 'font-lock-type-face)
1821 (propertize (format "%s\n" backend) 'face 'font-lock-variable-name-face) 1820 (propertize (format "%s\n" backend) 'face 'font-lock-variable-name-face)
1822 (propertize "Working dir: " 'face 'font-lock-type-face) 1821 (propertize "Working dir: " 'face 'font-lock-type-face)
1823 (propertize (format "%s\n" dir) 'face 'font-lock-variable-name-face) 1822 (propertize (format "%s\n" dir) 'face 'font-lock-variable-name-face)
1824 (vc-call-backend backend 'status-extra-headers dir) 1823 (vc-call-backend backend 'status-extra-headers dir)
1825 "\n")) 1824 "\n"))
@@ -1829,15 +1828,19 @@ specific headers."
1829 ;; If you change the layout here, change vc-dir-move-to-goal-column. 1828 ;; If you change the layout here, change vc-dir-move-to-goal-column.
1830 (let* ((isdir (vc-dir-fileinfo->directory fileentry)) 1829 (let* ((isdir (vc-dir-fileinfo->directory fileentry))
1831 (state (if isdir 'DIRECTORY (vc-dir-fileinfo->state fileentry))) 1830 (state (if isdir 'DIRECTORY (vc-dir-fileinfo->state fileentry)))
1832 (filename (vc-dir-fileinfo->name fileentry)) 1831 (filename (vc-dir-fileinfo->name fileentry)))
1833 (prettified (if isdir state (vc-call-backend backend 'prettify-state-info filename)))) 1832 ;; FIXME: Backends that want to print the state in a different way
1833 ;; can do it by defining the `status-printer' function. Using
1834 ;; `prettify-state-info' adds two extra vc-calls per item, which
1835 ;; is too expensive.
1836 ;;(prettified (if isdir state (vc-call-backend backend 'prettify-state-info filename))))
1834 (insert 1837 (insert
1835 (propertize 1838 (propertize
1836 (format "%c" (if (vc-dir-fileinfo->marked fileentry) ?* ? )) 1839 (format "%c" (if (vc-dir-fileinfo->marked fileentry) ?* ? ))
1837 'face 'font-lock-type-face) 1840 'face 'font-lock-type-face)
1838 " " 1841 " "
1839 (propertize 1842 (propertize
1840 (format "%-20s" prettified) 1843 (format "%-20s" state)
1841 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) 1844 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face)
1842 ((memq state '(missing conflict)) 'font-lock-warning-face) 1845 ((memq state '(missing conflict)) 'font-lock-warning-face)
1843 (t 'font-lock-variable-name-face)) 1846 (t 'font-lock-variable-name-face))