diff options
| author | Juanma Barranquero | 2008-06-27 23:29:15 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-06-27 23:29:15 +0000 |
| commit | a1fc8acb0f12b9e6fca1025409d6fb729e47fbdc (patch) | |
| tree | d526342a551954c440192853ae560c816d88927a /lisp | |
| parent | 7992f52c275cba357e300cd7add2c53eb1b5dc6c (diff) | |
| download | emacs-a1fc8acb0f12b9e6fca1025409d6fb729e47fbdc.tar.gz emacs-a1fc8acb0f12b9e6fca1025409d6fb729e47fbdc.zip | |
* vc-dir.el (vc-dir): Complete only directory names.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/vc-dir.el | 25 |
2 files changed, 18 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10a68c7a92e..1df394338dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-06-27 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * vc-dir.el (vc-dir): Complete only directory names. | ||
| 4 | |||
| 1 | 2008-06-27 Jason Rumney <jasonr@gnu.org> | 5 | 2008-06-27 Jason Rumney <jasonr@gnu.org> |
| 2 | 6 | ||
| 3 | * w32-fns.el (top-level): Unconditionally define all charsets. | 7 | * w32-fns.el (top-level): Unconditionally define all charsets. |
| @@ -8,7 +12,7 @@ | |||
| 8 | the CC Mode specific functions; this is no longer needed, since | 12 | the CC Mode specific functions; this is no longer needed, since |
| 9 | {beginning,end}-of-defun now pass ARG to ...-of-defun-function. | 13 | {beginning,end}-of-defun now pass ARG to ...-of-defun-function. |
| 10 | 14 | ||
| 11 | * progmodes/cc-defs.el (c-emacs-features): new feature | 15 | * progmodes/cc-defs.el (c-emacs-features): New feature |
| 12 | 'argumentative-bod-function. | 16 | 'argumentative-bod-function. |
| 13 | 17 | ||
| 14 | 2008-06-27 John Paul Wallington <jpw@pobox.com> | 18 | 2008-06-27 John Paul Wallington <jpw@pobox.com> |
diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el index 68abb053a31..17f8b5d91cb 100644 --- a/lisp/vc-dir.el +++ b/lisp/vc-dir.el | |||
| @@ -27,13 +27,13 @@ | |||
| 27 | ;; This implementation was inspired by PCL-CVS. | 27 | ;; This implementation was inspired by PCL-CVS. |
| 28 | ;; Many people contributed comments, ideas and code to this | 28 | ;; Many people contributed comments, ideas and code to this |
| 29 | ;; implementation. These include: | 29 | ;; implementation. These include: |
| 30 | ;; | 30 | ;; |
| 31 | ;; Alexandre Julliard <julliard@winehq.org> | 31 | ;; Alexandre Julliard <julliard@winehq.org> |
| 32 | ;; Stefan Monnier <monnier@iro.umontreal.ca> | 32 | ;; Stefan Monnier <monnier@iro.umontreal.ca> |
| 33 | ;; Tom Tromey <tromey@redhat.com> | 33 | ;; Tom Tromey <tromey@redhat.com> |
| 34 | 34 | ||
| 35 | ;;; Commentary: | 35 | ;;; Commentary: |
| 36 | ;; | 36 | ;; |
| 37 | 37 | ||
| 38 | ;;; Todo: see vc.el. | 38 | ;;; Todo: see vc.el. |
| 39 | 39 | ||
| @@ -339,7 +339,7 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc." | |||
| 339 | vc-ewoc (vc-dir-create-fileinfo | 339 | vc-ewoc (vc-dir-create-fileinfo |
| 340 | rd nil nil nil (expand-file-name default-directory)))) | 340 | rd nil nil nil (expand-file-name default-directory)))) |
| 341 | (setq node (ewoc-nth vc-ewoc 0))) | 341 | (setq node (ewoc-nth vc-ewoc 0))) |
| 342 | 342 | ||
| 343 | (while (and entry node) | 343 | (while (and entry node) |
| 344 | (let* ((entryfile (car entry)) | 344 | (let* ((entryfile (car entry)) |
| 345 | (entrydir (file-name-directory (expand-file-name entryfile))) | 345 | (entrydir (file-name-directory (expand-file-name entryfile))) |
| @@ -359,7 +359,7 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc." | |||
| 359 | (setf (vc-dir-fileinfo->extra (ewoc-data node)) (nth 2 entry)) | 359 | (setf (vc-dir-fileinfo->extra (ewoc-data node)) (nth 2 entry)) |
| 360 | (setf (vc-dir-fileinfo->needs-update (ewoc-data node)) nil) | 360 | (setf (vc-dir-fileinfo->needs-update (ewoc-data node)) nil) |
| 361 | (ewoc-invalidate vc-ewoc node) | 361 | (ewoc-invalidate vc-ewoc node) |
| 362 | (setq entries (cdr entries)) | 362 | (setq entries (cdr entries)) |
| 363 | (setq entry (car entries)) | 363 | (setq entry (car entries)) |
| 364 | (setq node (ewoc-next vc-ewoc node))) | 364 | (setq node (ewoc-next vc-ewoc node))) |
| 365 | (t | 365 | (t |
| @@ -712,7 +712,7 @@ child files." | |||
| 712 | (setq data (ewoc-data crt)) | 712 | (setq data (ewoc-data crt)) |
| 713 | (vc-dir-node-directory crt)))) | 713 | (vc-dir-node-directory crt)))) |
| 714 | (unless (vc-dir-fileinfo->directory data) | 714 | (unless (vc-dir-fileinfo->directory data) |
| 715 | (push | 715 | (push |
| 716 | (cons (expand-file-name (vc-dir-fileinfo->name data)) | 716 | (cons (expand-file-name (vc-dir-fileinfo->name data)) |
| 717 | (vc-dir-fileinfo->state data)) | 717 | (vc-dir-fileinfo->state data)) |
| 718 | result)))) | 718 | result)))) |
| @@ -739,11 +739,11 @@ If it is a file, return the corresponding cons for the file itself." | |||
| 739 | (setq data (ewoc-data crt)) | 739 | (setq data (ewoc-data crt)) |
| 740 | (vc-dir-node-directory crt)))) | 740 | (vc-dir-node-directory crt)))) |
| 741 | (unless (vc-dir-fileinfo->directory data) | 741 | (unless (vc-dir-fileinfo->directory data) |
| 742 | (push | 742 | (push |
| 743 | (cons (expand-file-name (vc-dir-fileinfo->name data)) | 743 | (cons (expand-file-name (vc-dir-fileinfo->name data)) |
| 744 | (vc-dir-fileinfo->state data)) | 744 | (vc-dir-fileinfo->state data)) |
| 745 | result)))) | 745 | result)))) |
| 746 | (push | 746 | (push |
| 747 | (cons (expand-file-name (vc-dir-fileinfo->name crt-data)) | 747 | (cons (expand-file-name (vc-dir-fileinfo->name crt-data)) |
| 748 | (vc-dir-fileinfo->state crt-data)) result)) | 748 | (vc-dir-fileinfo->state crt-data)) result)) |
| 749 | result)) | 749 | result)) |
| @@ -752,7 +752,7 @@ If it is a file, return the corresponding cons for the file itself." | |||
| 752 | "Update the entries for FILE in any directory buffers that list it." | 752 | "Update the entries for FILE in any directory buffers that list it." |
| 753 | (let ((file (or fname (expand-file-name buffer-file-name)))) | 753 | (let ((file (or fname (expand-file-name buffer-file-name)))) |
| 754 | (if (file-directory-p file) | 754 | (if (file-directory-p file) |
| 755 | ;; FIXME: Maybe this should never happen? | 755 | ;; FIXME: Maybe this should never happen? |
| 756 | ;; FIXME: But it is useful to update the state of a directory | 756 | ;; FIXME: But it is useful to update the state of a directory |
| 757 | ;; (more precisely the files in the directory) after some VC | 757 | ;; (more precisely the files in the directory) after some VC |
| 758 | ;; operations. | 758 | ;; operations. |
| @@ -958,7 +958,7 @@ outside of VC) and one wants to do some operation on it." | |||
| 958 | (setq only-files-list (vc-dir-marked-only-files-and-states)))) | 958 | (setq only-files-list (vc-dir-marked-only-files-and-states)))) |
| 959 | (let ((crt (vc-dir-current-file))) | 959 | (let ((crt (vc-dir-current-file))) |
| 960 | (setq files (list crt)) | 960 | (setq files (list crt)) |
| 961 | (when state-model-only-files | 961 | (when state-model-only-files |
| 962 | (setq only-files-list (vc-dir-child-files-and-states))))) | 962 | (setq only-files-list (vc-dir-child-files-and-states))))) |
| 963 | 963 | ||
| 964 | (when state-model-only-files | 964 | (when state-model-only-files |
| @@ -981,7 +981,8 @@ With a prefix argument ask what VC backend to use." | |||
| 981 | (interactive | 981 | (interactive |
| 982 | (list | 982 | (list |
| 983 | (read-file-name "VC status for directory: " | 983 | (read-file-name "VC status for directory: " |
| 984 | default-directory default-directory t) | 984 | default-directory default-directory t |
| 985 | nil #'file-directory-p) | ||
| 985 | (if current-prefix-arg | 986 | (if current-prefix-arg |
| 986 | (intern | 987 | (intern |
| 987 | (completing-read | 988 | (completing-read |
| @@ -1028,8 +1029,8 @@ With a prefix argument ask what VC backend to use." | |||
| 1028 | 'face | 1029 | 'face |
| 1029 | (if isdir 'font-lock-comment-delimiter-face 'font-lock-function-name-face) | 1030 | (if isdir 'font-lock-comment-delimiter-face 'font-lock-function-name-face) |
| 1030 | 'help-echo | 1031 | 'help-echo |
| 1031 | (if isdir | 1032 | (if isdir |
| 1032 | "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu" | 1033 | "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu" |
| 1033 | "File\nmouse-3: Pop-up menu") | 1034 | "File\nmouse-3: Pop-up menu") |
| 1034 | 'mouse-face 'highlight)))) | 1035 | 'mouse-face 'highlight)))) |
| 1035 | 1036 | ||