diff options
| author | André Spiegel | 2002-10-11 09:36:00 +0000 |
|---|---|---|
| committer | André Spiegel | 2002-10-11 09:36:00 +0000 |
| commit | b9a35ba58aa485460e2afd2a52ad86c3efb34065 (patch) | |
| tree | 7a6c2c760e4f9a4741e6d8f8524f0cb96665e3a7 | |
| parent | 6c150da9f5f6353dc8cc92df81989b7d5325dcd4 (diff) | |
| download | emacs-b9a35ba58aa485460e2afd2a52ad86c3efb34065.tar.gz emacs-b9a35ba58aa485460e2afd2a52ad86c3efb34065.zip | |
(vc-dired-reformat-line): As a temporary fix, remove all text
properties from the reformatted line.
| -rw-r--r-- | lisp/vc.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index da128e5320e..f900fc05d26 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 7 | ;; Keywords: tools | 7 | ;; Keywords: tools |
| 8 | 8 | ||
| 9 | ;; $Id: vc.el,v 1.341 2002/10/07 16:50:43 monnier Exp $ | 9 | ;; $Id: vc.el,v 1.342 2002/10/08 15:31:43 monnier Exp $ |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -2171,12 +2171,12 @@ There is a special command, `*l', to mark all files currently locked." | |||
| 2171 | ((eq state 'needs-patch) "(patch)") | 2171 | ((eq state 'needs-patch) "(patch)") |
| 2172 | ((eq state 'unlocked-changes) "(stale)")))) | 2172 | ((eq state 'unlocked-changes) "(stale)")))) |
| 2173 | 2173 | ||
| 2174 | (defun vc-dired-reformat-line (x) | 2174 | (defun vc-dired-reformat-line (vc-info) |
| 2175 | "Reformat a directory-listing line. | 2175 | "Reformat a directory-listing line. |
| 2176 | Replace various columns with version control information. | 2176 | Replace various columns with version control information, VC-INFO. |
| 2177 | This code, like dired, assumes UNIX -l format." | 2177 | This code, like dired, assumes UNIX -l format." |
| 2178 | (beginning-of-line) | 2178 | (beginning-of-line) |
| 2179 | (let ((pos (point)) limit perm date-and-file) | 2179 | (let ((pos (point)) limit) |
| 2180 | (end-of-line) | 2180 | (end-of-line) |
| 2181 | (setq limit (point)) | 2181 | (setq limit (point)) |
| 2182 | (goto-char pos) | 2182 | (goto-char pos) |
| @@ -2191,10 +2191,16 @@ This code, like dired, assumes UNIX -l format." | |||
| 2191 | (re-search-forward ;; OS/2 -l format, no links, owner, group | 2191 | (re-search-forward ;; OS/2 -l format, no links, owner, group |
| 2192 | "^\\(..[drwxlts-]+ \\) *[0-9]+\\( .*\\)" | 2192 | "^\\(..[drwxlts-]+ \\) *[0-9]+\\( .*\\)" |
| 2193 | limit t)) | 2193 | limit t)) |
| 2194 | (setq perm (match-string 1) | 2194 | (let ((replacement (concat (match-string 1) |
| 2195 | date-and-file (match-string 2)) | 2195 | (substring (concat vc-info " ") |
| 2196 | (setq x (substring (concat x " ") 0 10)) | 2196 | 0 10) |
| 2197 | (replace-match (concat perm x date-and-file))))) | 2197 | (match-string 2)))) |
| 2198 | ;; FIXME: Clear the text properties to make it work, because with | ||
| 2199 | ;; a straightforward replacement, they will get messed up. | ||
| 2200 | ;; Eventually, the text properties should be transformed correctly, | ||
| 2201 | ;; not removed. | ||
| 2202 | (set-text-properties 0 (length replacement) nil replacement) | ||
| 2203 | (replace-match replacement))))) | ||
| 2198 | 2204 | ||
| 2199 | (defun vc-dired-hook () | 2205 | (defun vc-dired-hook () |
| 2200 | "Reformat the listing according to version control. | 2206 | "Reformat the listing according to version control. |