diff options
| author | Stefan Monnier | 2008-05-27 01:13:25 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-05-27 01:13:25 +0000 |
| commit | 35611703323d2eb4db7db059c1899b5e1ea83576 (patch) | |
| tree | bd51229bbcf3f90cab22c942d898bd8c579c4ebe | |
| parent | 1fb5aad76f8336192851cfa231a568d062b97ccb (diff) | |
| download | emacs-35611703323d2eb4db7db059c1899b5e1ea83576.tar.gz emacs-35611703323d2eb4db7db059c1899b5e1ea83576.zip | |
(vc-string-prefix-p): New function.
(vc-dir-parent-marked-p): Use it.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/vc-dispatcher.el | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b097d2d851..9965fa6a27f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-05-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc-dispatcher.el (vc-string-prefix-p): New function. | ||
| 4 | (vc-dir-parent-marked-p): Use it. | ||
| 5 | |||
| 1 | 2008-05-27 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2008-05-27 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * vc.el (Problems): Remove fixed issues. | 8 | * vc.el (Problems): Remove fixed issues. |
| @@ -6,14 +11,14 @@ | |||
| 6 | (vc-make-backend-object): Fix name. | 11 | (vc-make-backend-object): Fix name. |
| 7 | (vc-dir-show-fileentry): Fix docstring. | 12 | (vc-dir-show-fileentry): Fix docstring. |
| 8 | (vc-dir-refresh): Use vc-dir-backend. Fix docstring. | 13 | (vc-dir-refresh): Use vc-dir-backend. Fix docstring. |
| 9 | (vc-dir-refresh-files): Use vc-dir-backend. Fix docstring. Reset | 14 | (vc-dir-refresh-files): Use vc-dir-backend. Fix docstring. |
| 10 | the state for directories. | 15 | Reset the state for directories. |
| 11 | (vc-dir-headers): Align labels. | 16 | (vc-dir-headers): Align labels. |
| 12 | (vc-default-status-printer): Do no call prettify-state-info. | 17 | (vc-default-status-printer): Do no call prettify-state-info. |
| 13 | (vc-deduce-fileset): Replace implementation with one based on a | 18 | (vc-deduce-fileset): Replace implementation with one based on a |
| 14 | working older version. | 19 | working older version. |
| 15 | (vc-next-action): Use the new form of vc-deduce-fileset. Fix | 20 | (vc-next-action): Use the new form of vc-deduce-fileset. |
| 16 | dealing with unregistered files. | 21 | Fix dealing with unregistered files. |
| 17 | 22 | ||
| 18 | * vc-dispatcher.el (vc-resynch-window): Fix mode-line updating. | 23 | * vc-dispatcher.el (vc-resynch-window): Fix mode-line updating. |
| 19 | (vc-dir-menu-map): Fix menu title for the menu bar and the popup menu. | 24 | (vc-dir-menu-map): Fix menu title for the menu bar and the popup menu. |
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el index 8e9cf21d3c7..116e9476bf3 100644 --- a/lisp/vc-dispatcher.el +++ b/lisp/vc-dispatcher.el | |||
| @@ -1024,6 +1024,10 @@ If a prefix argument is given, move by that many lines." | |||
| 1024 | (funcall mark-unmark-function)))) | 1024 | (funcall mark-unmark-function)))) |
| 1025 | (funcall mark-unmark-function))) | 1025 | (funcall mark-unmark-function))) |
| 1026 | 1026 | ||
| 1027 | (defun vc-string-prefix-p (prefix string) | ||
| 1028 | (and (>= (length string) (length prefix)) | ||
| 1029 | (eq t (compare-strings prefix nil nil string nil (length prefix))))) | ||
| 1030 | |||
| 1027 | (defun vc-dir-parent-marked-p (arg) | 1031 | (defun vc-dir-parent-marked-p (arg) |
| 1028 | ;; Return nil if none of the parent directories of arg is marked. | 1032 | ;; Return nil if none of the parent directories of arg is marked. |
| 1029 | (let* ((argdir (vc-dir-node-directory arg)) | 1033 | (let* ((argdir (vc-dir-node-directory arg)) |
| @@ -1036,7 +1040,7 @@ If a prefix argument is given, move by that many lines." | |||
| 1036 | (setq data (ewoc-data crt)) | 1040 | (setq data (ewoc-data crt)) |
| 1037 | (setq dir (vc-dir-node-directory crt)) | 1041 | (setq dir (vc-dir-node-directory crt)) |
| 1038 | (when (and (vc-dir-fileinfo->directory data) | 1042 | (when (and (vc-dir-fileinfo->directory data) |
| 1039 | (string-equal (substring argdir 0 (length dir)) dir)) | 1043 | (vc-string-prefix-p dir argdir)) |
| 1040 | (when (vc-dir-fileinfo->marked data) | 1044 | (when (vc-dir-fileinfo->marked data) |
| 1041 | (error "Cannot mark `%s', parent directory `%s' marked" | 1045 | (error "Cannot mark `%s', parent directory `%s' marked" |
| 1042 | (vc-dir-fileinfo->name (ewoc-data arg)) | 1046 | (vc-dir-fileinfo->name (ewoc-data arg)) |