Show
Ignore:
Timestamp:
05/27/06 10:35:24 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/complete.el

    r4073 r4091  
    370370         (incname (and filename (string-match "<\\([^\"<>]*\\)>?$" str))) 
    371371         (ambig nil) 
    372          basestr 
     372         basestr origstr 
    373373         env-on 
    374374         regex 
     
    416416                                  "*/" file)) 
    417417               (setq dir (file-name-directory dir))) 
    418              (setq str (concat dir file)))) 
     418             (setq origstr str str (concat dir file)))) 
    419419 
    420420      ;; Look for wildcard expansions in directory name 
     
    444444                     (insert str) 
    445445                     (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))))) 
    447454 
    448455      ;; Strip directory name if appropriate 
     
    944951      (let* ((string (ad-get-arg 0)) 
    945952             (action (ad-get-arg 2)) 
    946              (name (substring string (match-beginning 1) (match-end 1))) 
     953             (name (match-string 1 string)) 
    947954             (str2 (substring string (match-beginning 0))) 
    948955             (completion-table 
    949               (mapcar (lambda (x) (format "<%s>" x)) 
     956              (mapcar (lambda (x) 
     957                        (format (if (string-match "/\\'" x) "<%s" "<%s>") x)) 
    950958                      (PC-include-file-all-completions 
    951959                       name (PC-include-file-path)))))