aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-06-16 20:36:55 +0000
committerStefan Monnier2008-06-16 20:36:55 +0000
commit7b74a6f9f0da0023dfb1aefab6d064f3587da4a4 (patch)
treeaaf4b850ff1c2a4560878d4fa14820011d552141
parent93eed26bfbe11048c2d885017504591ad3cbd3c8 (diff)
downloademacs-7b74a6f9f0da0023dfb1aefab6d064f3587da4a4.tar.gz
emacs-7b74a6f9f0da0023dfb1aefab6d064f3587da4a4.zip
(vc-dir-child-files): Use vc-string-prefix-p.
(vc-dir-marked-only-files): vc-string-prefix-p.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc-dispatcher.el35
2 files changed, 21 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f5118a38210..d8f54c5979a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-06-16 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * vc-dispatcher.el (vc-dir-child-files): Use vc-string-prefix-p.
4 (vc-dir-marked-only-files): vc-string-prefix-p.
5
12008-06-16 Nick Roberts <nickrob@snap.net.nz> 62008-06-16 Nick Roberts <nickrob@snap.net.nz>
2 7
3 * progmodes/gdb-ui.el (gdb-memory-set-address) 8 * progmodes/gdb-ui.el (gdb-memory-set-address)
@@ -7,7 +12,7 @@
7 12
82008-06-16 Derek Upham <sand@blarg.net> (tiny change) 132008-06-16 Derek Upham <sand@blarg.net> (tiny change)
9 14
10 * nxml/nxml-mode.el (nxml-mode): Use run-mode-hooks. 15 * nxml/nxml-mode.el (nxml-mode): Use run-mode-hooks.
11 16
122008-06-16 Juanma Barranquero <lekktu@gmail.com> 172008-06-16 Juanma Barranquero <lekktu@gmail.com>
13 18
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el
index 066e45f08cc..c21be117f18 100644
--- a/lisp/vc-dispatcher.el
+++ b/lisp/vc-dispatcher.el
@@ -1258,13 +1258,10 @@ that share the same state."
1258 data) 1258 data)
1259 (while 1259 (while
1260 (and (setq crt (ewoc-next vc-ewoc crt)) 1260 (and (setq crt (ewoc-next vc-ewoc crt))
1261 (string-equal 1261 (vc-string-prefix-p dir
1262 (substring 1262 (progn
1263 (progn 1263 (setq data (ewoc-data crt))
1264 (setq data (ewoc-data crt)) 1264 (vc-dir-node-directory crt))))
1265 (vc-dir-node-directory crt))
1266 0 dirlen)
1267 dir))
1268 (unless (vc-dir-fileinfo->directory data) 1265 (unless (vc-dir-fileinfo->directory data)
1269 (push (expand-file-name (vc-dir-fileinfo->name data)) result)))) 1266 (push (expand-file-name (vc-dir-fileinfo->name data)) result))))
1270 (push (expand-file-name (vc-dir-fileinfo->name crt-data)) result) 1267 (push (expand-file-name (vc-dir-fileinfo->name crt-data)) result)
@@ -1277,20 +1274,16 @@ that share the same state."
1277If it is a file, return the file itself." 1274If it is a file, return the file itself."
1278 (let* ((crt (ewoc-locate vc-ewoc)) 1275 (let* ((crt (ewoc-locate vc-ewoc))
1279 (crt-data (ewoc-data crt)) 1276 (crt-data (ewoc-data crt))
1280 result) 1277 result)
1281 (if (vc-dir-fileinfo->directory crt-data) 1278 (if (vc-dir-fileinfo->directory crt-data)
1282 (let* ((dir (vc-dir-fileinfo->directory crt-data)) 1279 (let* ((dir (vc-dir-fileinfo->directory crt-data))
1283 (dirlen (length dir)) 1280 (dirlen (length dir))
1284 data) 1281 data)
1285 (while 1282 (while
1286 (and (setq crt (ewoc-next vc-ewoc crt)) 1283 (and (setq crt (ewoc-next vc-ewoc crt))
1287 (string-equal 1284 (vc-string-prefix-p dir (progn
1288 (substring 1285 (setq data (ewoc-data crt))
1289 (progn 1286 (vc-dir-node-directory crt))))
1290 (setq data (ewoc-data crt))
1291 (vc-dir-node-directory crt))
1292 0 dirlen)
1293 dir))
1294 (unless (vc-dir-fileinfo->directory data) 1287 (unless (vc-dir-fileinfo->directory data)
1295 (push (expand-file-name (vc-dir-fileinfo->name data)) result)))) 1288 (push (expand-file-name (vc-dir-fileinfo->name data)) result))))
1296 (push (expand-file-name (vc-dir-fileinfo->name crt-data)) result)) 1289 (push (expand-file-name (vc-dir-fileinfo->name crt-data)) result))
@@ -1315,19 +1308,21 @@ If it is a file, return the file itself."
1315 (let ((ddir (expand-file-name default-directory))) 1308 (let ((ddir (expand-file-name default-directory)))
1316 (when (vc-string-prefix-p ddir file) 1309 (when (vc-string-prefix-p ddir file)
1317 (let* 1310 (let*
1311 ;; FIXME: Any reason we don't use file-relative-name?
1318 ((file-short (substring file (length ddir))) 1312 ((file-short (substring file (length ddir)))
1319 (state 1313 (state (funcall (vc-client-object->file-to-state
1320 (funcall (vc-client-object->file-to-state vc-client-mode) 1314 vc-client-mode)
1321 file)) 1315 file))
1322 (extra 1316 (extra (funcall (vc-client-object->file-to-extra
1323 (funcall (vc-client-object->file-to-extra vc-client-mode) 1317 vc-client-mode)
1324 file)) 1318 file))
1325 (entry 1319 (entry
1326 (list file-short state extra))) 1320 (list file-short state extra)))
1327 (vc-dir-update (list entry) status-buf)))))) 1321 (vc-dir-update (list entry) status-buf))))))
1328 ;; We didn't find any vc-dir buffers, remove the hook, it is 1322 ;; We didn't find any vc-dir buffers, remove the hook, it is
1329 ;; not needed. 1323 ;; not needed.
1330 (unless found-vc-dir-buf (remove-hook 'after-save-hook 'vc-dir-resynch-file))))))) 1324 (unless found-vc-dir-buf
1325 (remove-hook 'after-save-hook 'vc-dir-resynch-file)))))))
1331 1326
1332(defun vc-dir-mode (client-object) 1327(defun vc-dir-mode (client-object)
1333 "Major mode for dispatcher directory buffers. 1328 "Major mode for dispatcher directory buffers.