- (setq start (point)))
- (setq pattern (buffer-substring-no-properties start (point)))
- (setq completion (try-completion pattern file-cache-alist))
- (setq all (all-completions pattern file-cache-alist nil))
- (cond ((eq completion t))
- ((null completion)
- (message "Can't find completion for \"%s\"" pattern)
- (ding))
- ((not (string= pattern completion))
- (delete-region start (point))
- (insert completion)
- )
- (t
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list all pattern))
- ))
- ))