Changeset 4091 for trunk/lisp/complete.el
- Timestamp:
- 05/27/06 10:35:24 (2 years ago)
- Files:
-
- trunk/lisp/complete.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/complete.el
r4073 r4091 370 370 (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) 371 371 (ambig nil) 372 basestr 372 basestr origstr 373 373 env-on 374 374 regex … … 416 416 "*/" file)) 417 417 (setq dir (file-name-directory dir))) 418 (setq str (concat dir file))))418 (setq origstr str str (concat dir file)))) 419 419 420 420 ;; Look for wildcard expansions in directory name … … 444 444 (insert str) 445 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 455 ;; Strip directory name if appropriate … … 944 951 (let* ((string (ad-get-arg 0)) 945 952 (action (ad-get-arg 2)) 946 (name ( substring string (match-beginning 1) (match-end 1)))953 (name (match-string 1 string)) 947 954 (str2 (substring string (match-beginning 0))) 948 955 (completion-table 949 (mapcar (lambda (x) (format "<%s>" x)) 956 (mapcar (lambda (x) 957 (format (if (string-match "/\\'" x) "<%s" "<%s>") x)) 950 958 (PC-include-file-all-completions 951 959 name (PC-include-file-path)))))
