diff options
| author | Noah Friedman | 2002-12-02 08:51:39 +0000 |
|---|---|---|
| committer | Noah Friedman | 2002-12-02 08:51:39 +0000 |
| commit | 8e28519a402cdc97b2e7e578d680151deb1bc106 (patch) | |
| tree | 8003a55da66c73e46e3ff26032832c259207cc9b | |
| parent | 90a7967a9afaf184af086f61a0ccb675a99c4662 (diff) | |
| download | emacs-8e28519a402cdc97b2e7e578d680151deb1bc106.tar.gz emacs-8e28519a402cdc97b2e7e578d680151deb1bc106.zip | |
(PC-do-completion): Do not add wildcards to pattern unless filename is
non-nil.
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/complete.el | 33 |
2 files changed, 25 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4644d90c7a7..63b5174c308 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2002-12-02 Noah Friedman <friedman@splode.com> | ||
| 2 | |||
| 3 | * complete.el (PC-do-completion): Do not add wildcards to pattern | ||
| 4 | unless filename is non-nil. | ||
| 5 | |||
| 1 | 2002-12-02 Andreas Schwab <schwab@suse.de> | 6 | 2002-12-02 Andreas Schwab <schwab@suse.de> |
| 2 | 7 | ||
| 3 | * mwheel.el (mouse-wheel-scroll-amount): Fix customize type. | 8 | * mwheel.el (mouse-wheel-scroll-amount): Fix customize type. |
| @@ -61,13 +66,13 @@ | |||
| 61 | (mwheel-inhibit-click-timeout,mwheel-filter-click-events): New defuns. | 66 | (mwheel-inhibit-click-timeout,mwheel-filter-click-events): New defuns. |
| 62 | (mwheel-scroll): Add mwheel-filter-click-events as pre-command-hook. | 67 | (mwheel-scroll): Add mwheel-filter-click-events as pre-command-hook. |
| 63 | Start mwheel-inhibit-click-event-timer with timeout handler | 68 | Start mwheel-inhibit-click-event-timer with timeout handler |
| 64 | mwheel-inhibit-click-timeout. | 69 | mwheel-inhibit-click-timeout. |
| 65 | 70 | ||
| 66 | 2002-11-28 Nick Roberts <nick@nick.uklinux.net> | 71 | 2002-11-28 Nick Roberts <nick@nick.uklinux.net> |
| 67 | 72 | ||
| 68 | * tooltip.el (tooltip-gud-tips-setup): Remove. | 73 | * tooltip.el (tooltip-gud-tips-setup): Remove. |
| 69 | (tooltip-gud-debugger): Remove. | 74 | (tooltip-gud-debugger): Remove. |
| 70 | (tooltip-gud-print-command): Use gud-minor mode instead of | 75 | (tooltip-gud-print-command): Use gud-minor mode instead of |
| 71 | tooltip-gud-tips-setup and tooltip-gud-debugger. | 76 | tooltip-gud-tips-setup and tooltip-gud-debugger. |
| 72 | 77 | ||
| 73 | * gdb-ui.el (gdb-starting): Set gdb-running to t. | 78 | * gdb-ui.el (gdb-starting): Set gdb-running to t. |
diff --git a/lisp/complete.el b/lisp/complete.el index baa8a5a5f10..4f223365202 100644 --- a/lisp/complete.el +++ b/lisp/complete.el | |||
| @@ -383,7 +383,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 383 | (delete-region beg end) | 383 | (delete-region beg end) |
| 384 | (insert str) | 384 | (insert str) |
| 385 | (setq end (+ beg (length str))))) | 385 | (setq end (+ beg (length str))))) |
| 386 | 386 | ||
| 387 | ;; Prepare various delimiter strings | 387 | ;; Prepare various delimiter strings |
| 388 | (or (equal PC-word-delimiters PC-delims) | 388 | (or (equal PC-word-delimiters PC-delims) |
| 389 | (setq PC-delims PC-word-delimiters | 389 | (setq PC-delims PC-word-delimiters |
| @@ -392,17 +392,18 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 392 | PC-delims-list (append PC-delims nil))) | 392 | PC-delims-list (append PC-delims nil))) |
| 393 | 393 | ||
| 394 | ;; Add wildcards if necessary | 394 | ;; Add wildcards if necessary |
| 395 | (let ((dir (file-name-directory str)) | 395 | (and filename |
| 396 | (file (file-name-nondirectory str))) | 396 | (let ((dir (file-name-directory str)) |
| 397 | (while (and (stringp dir) (not (file-directory-p dir))) | 397 | (file (file-name-nondirectory str))) |
| 398 | (setq dir (directory-file-name dir)) | 398 | (while (and (stringp dir) (not (file-directory-p dir))) |
| 399 | (setq file (concat (replace-regexp-in-string | 399 | (setq dir (directory-file-name dir)) |
| 400 | PC-delim-regex "*\\&" | 400 | (setq file (concat (replace-regexp-in-string |
| 401 | (file-name-nondirectory dir)) | 401 | PC-delim-regex "*\\&" |
| 402 | "*/" file)) | 402 | (file-name-nondirectory dir)) |
| 403 | (setq dir (file-name-directory dir))) | 403 | "*/" file)) |
| 404 | (setq str (concat dir file))) | 404 | (setq dir (file-name-directory dir))) |
| 405 | 405 | (setq str (concat dir file)))) | |
| 406 | |||
| 406 | ;; Look for wildcard expansions in directory name | 407 | ;; Look for wildcard expansions in directory name |
| 407 | (and filename | 408 | (and filename |
| 408 | (string-match "\\*.*/" str) | 409 | (string-match "\\*.*/" str) |
| @@ -890,7 +891,7 @@ or properties are considered." | |||
| 890 | ;;; This is adapted from lib-complete.el, by Mike Williams. | 891 | ;;; This is adapted from lib-complete.el, by Mike Williams. |
| 891 | (defun PC-include-file-all-completions (file search-path &optional full) | 892 | (defun PC-include-file-all-completions (file search-path &optional full) |
| 892 | "Return all completions for FILE in any directory on SEARCH-PATH. | 893 | "Return all completions for FILE in any directory on SEARCH-PATH. |
| 893 | If optional third argument FULL is non-nil, returned pathnames should be | 894 | If optional third argument FULL is non-nil, returned pathnames should be |
| 894 | absolute rather than relative to some directory on the SEARCH-PATH." | 895 | absolute rather than relative to some directory on the SEARCH-PATH." |
| 895 | (setq search-path | 896 | (setq search-path |
| 896 | (mapcar (lambda (dir) | 897 | (mapcar (lambda (dir) |
| @@ -900,7 +901,7 @@ absolute rather than relative to some directory on the SEARCH-PATH." | |||
| 900 | ;; It's an absolute file name, so don't need search-path | 901 | ;; It's an absolute file name, so don't need search-path |
| 901 | (progn | 902 | (progn |
| 902 | (setq file (expand-file-name file)) | 903 | (setq file (expand-file-name file)) |
| 903 | (file-name-all-completions | 904 | (file-name-all-completions |
| 904 | (file-name-nondirectory file) (file-name-directory file))) | 905 | (file-name-nondirectory file) (file-name-directory file))) |
| 905 | (let ((subdir (file-name-directory file)) | 906 | (let ((subdir (file-name-directory file)) |
| 906 | (ndfile (file-name-nondirectory file)) | 907 | (ndfile (file-name-nondirectory file)) |
| @@ -918,9 +919,9 @@ absolute rather than relative to some directory on the SEARCH-PATH." | |||
| 918 | (if (file-directory-p dir) | 919 | (if (file-directory-p dir) |
| 919 | (progn | 920 | (progn |
| 920 | (setq file-lists | 921 | (setq file-lists |
| 921 | (cons | 922 | (cons |
| 922 | (mapcar (lambda (file) (concat subdir file)) | 923 | (mapcar (lambda (file) (concat subdir file)) |
| 923 | (file-name-all-completions ndfile | 924 | (file-name-all-completions ndfile |
| 924 | (car search-path))) | 925 | (car search-path))) |
| 925 | file-lists)))) | 926 | file-lists)))) |
| 926 | (setq search-path (cdr search-path)))) | 927 | (setq search-path (cdr search-path)))) |