+2008-06-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc-dispatcher.el (vc-dir-child-files): Use vc-string-prefix-p.
+ (vc-dir-marked-only-files): vc-string-prefix-p.
+
2008-06-16 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-memory-set-address)
2008-06-16 Derek Upham <sand@blarg.net> (tiny change)
- * nxml/nxml-mode.el (nxml-mode): Use run-mode-hooks.
+ * nxml/nxml-mode.el (nxml-mode): Use run-mode-hooks.
2008-06-16 Juanma Barranquero <lekktu@gmail.com>
data)
(while
(and (setq crt (ewoc-next vc-ewoc crt))
- (string-equal
- (substring
- (progn
- (setq data (ewoc-data crt))
- (vc-dir-node-directory crt))
- 0 dirlen)
- dir))
+ (vc-string-prefix-p dir
+ (progn
+ (setq data (ewoc-data crt))
+ (vc-dir-node-directory crt))))
(unless (vc-dir-fileinfo->directory data)
(push (expand-file-name (vc-dir-fileinfo->name data)) result))))
(push (expand-file-name (vc-dir-fileinfo->name crt-data)) result)
If it is a file, return the file itself."
(let* ((crt (ewoc-locate vc-ewoc))
(crt-data (ewoc-data crt))
- result)
+ result)
(if (vc-dir-fileinfo->directory crt-data)
(let* ((dir (vc-dir-fileinfo->directory crt-data))
(dirlen (length dir))
data)
(while
(and (setq crt (ewoc-next vc-ewoc crt))
- (string-equal
- (substring
- (progn
- (setq data (ewoc-data crt))
- (vc-dir-node-directory crt))
- 0 dirlen)
- dir))
+ (vc-string-prefix-p dir (progn
+ (setq data (ewoc-data crt))
+ (vc-dir-node-directory crt))))
(unless (vc-dir-fileinfo->directory data)
(push (expand-file-name (vc-dir-fileinfo->name data)) result))))
(push (expand-file-name (vc-dir-fileinfo->name crt-data)) result))
(let ((ddir (expand-file-name default-directory)))
(when (vc-string-prefix-p ddir file)
(let*
+ ;; FIXME: Any reason we don't use file-relative-name?
((file-short (substring file (length ddir)))
- (state
- (funcall (vc-client-object->file-to-state vc-client-mode)
+ (state (funcall (vc-client-object->file-to-state
+ vc-client-mode)
file))
- (extra
- (funcall (vc-client-object->file-to-extra vc-client-mode)
+ (extra (funcall (vc-client-object->file-to-extra
+ vc-client-mode)
file))
(entry
(list file-short state extra)))
(vc-dir-update (list entry) status-buf))))))
;; We didn't find any vc-dir buffers, remove the hook, it is
;; not needed.
- (unless found-vc-dir-buf (remove-hook 'after-save-hook 'vc-dir-resynch-file)))))))
+ (unless found-vc-dir-buf
+ (remove-hook 'after-save-hook 'vc-dir-resynch-file)))))))
(defun vc-dir-mode (client-object)
"Major mode for dispatcher directory buffers.