diff options
| author | Miles Bader | 2006-06-07 18:05:10 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-06-07 18:05:10 +0000 |
| commit | b883cdb2fefa8ea9c3b0d82eba7a9ee792f871bb (patch) | |
| tree | de3804210a8cd955e0d3b9abc15679480930bc82 /lisp/complete.el | |
| parent | 885b7d0991bd4b4b8f4bd1d3cd21c18a697bbce2 (diff) | |
| parent | 26c9afc3239e18b03537faaea33e3e82e28099e6 (diff) | |
| download | emacs-b883cdb2fefa8ea9c3b0d82eba7a9ee792f871bb.tar.gz emacs-b883cdb2fefa8ea9c3b0d82eba7a9ee792f871bb.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 285-296)
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: admin/FOR-RELEASE: Update refcard section.
* gnus--rel--5.10 (patch 102-104)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-64
Diffstat (limited to 'lisp/complete.el')
| -rw-r--r-- | lisp/complete.el | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/complete.el b/lisp/complete.el index 6620db860c3..d0e3fbe8ddf 100644 --- a/lisp/complete.el +++ b/lisp/complete.el | |||
| @@ -369,7 +369,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 369 | (str (buffer-substring beg end)) | 369 | (str (buffer-substring beg end)) |
| 370 | (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) | 370 | (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) |
| 371 | (ambig nil) | 371 | (ambig nil) |
| 372 | basestr | 372 | basestr origstr |
| 373 | env-on | 373 | env-on |
| 374 | regex | 374 | regex |
| 375 | p offset | 375 | p offset |
| @@ -415,7 +415,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 415 | (file-name-nondirectory dir)) | 415 | (file-name-nondirectory dir)) |
| 416 | "*/" file)) | 416 | "*/" file)) |
| 417 | (setq dir (file-name-directory dir))) | 417 | (setq dir (file-name-directory dir))) |
| 418 | (setq str (concat dir file)))) | 418 | (setq origstr str str (concat dir file)))) |
| 419 | 419 | ||
| 420 | ;; Look for wildcard expansions in directory name | 420 | ;; Look for wildcard expansions in directory name |
| 421 | (and filename | 421 | (and filename |
| @@ -443,7 +443,14 @@ of `minibuffer-completion-table' and the minibuffer contents.") | |||
| 443 | (setq str (concat dir (file-name-nondirectory str))) | 443 | (setq str (concat dir (file-name-nondirectory str))) |
| 444 | (insert str) | 444 | (insert str) |
| 445 | (setq end (+ beg (length str))))) | 445 | (setq end (+ beg (length str))))) |
| 446 | (setq filename nil table nil pred nil)))) | 446 | (if origstr |
| 447 | ;; If the wildcards were introduced by us, it's possible | ||
| 448 | ;; that read-file-name-internal (especially our | ||
| 449 | ;; PC-include-file advice) can still find matches for the | ||
| 450 | ;; original string even if we couldn't, so remove the | ||
| 451 | ;; added wildcards. | ||
| 452 | (setq str origstr) | ||
| 453 | (setq filename nil table nil pred nil))))) | ||
| 447 | 454 | ||
| 448 | ;; Strip directory name if appropriate | 455 | ;; Strip directory name if appropriate |
| 449 | (if filename | 456 | (if filename |
| @@ -943,10 +950,11 @@ absolute rather than relative to some directory on the SEARCH-PATH." | |||
| 943 | (if (string-match "<\\([^\"<>]*\\)>?\\'" (ad-get-arg 0)) | 950 | (if (string-match "<\\([^\"<>]*\\)>?\\'" (ad-get-arg 0)) |
| 944 | (let* ((string (ad-get-arg 0)) | 951 | (let* ((string (ad-get-arg 0)) |
| 945 | (action (ad-get-arg 2)) | 952 | (action (ad-get-arg 2)) |
| 946 | (name (substring string (match-beginning 1) (match-end 1))) | 953 | (name (match-string 1 string)) |
| 947 | (str2 (substring string (match-beginning 0))) | 954 | (str2 (substring string (match-beginning 0))) |
| 948 | (completion-table | 955 | (completion-table |
| 949 | (mapcar (lambda (x) (format "<%s>" x)) | 956 | (mapcar (lambda (x) |
| 957 | (format (if (string-match "/\\'" x) "<%s" "<%s>") x)) | ||
| 950 | (PC-include-file-all-completions | 958 | (PC-include-file-all-completions |
| 951 | name (PC-include-file-path))))) | 959 | name (PC-include-file-path))))) |
| 952 | (setq ad-return-value | 960 | (setq ad-return-value |