Mercurial > emacs
diff lisp/progmodes/etags.el @ 106236:4436585c0829
* progmodes/meta-mode.el (meta-complete-symbol):
* progmodes/etags.el (complete-tag): Use completion-in-region.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 25 Nov 2009 06:08:42 +0000 |
parents | 26baacb565b0 |
children | a72f79f89185 |
line wrap: on
line diff
--- a/lisp/progmodes/etags.el Wed Nov 25 06:02:01 2009 +0000 +++ b/lisp/progmodes/etags.el Wed Nov 25 06:08:42 2009 +0000 @@ -2047,28 +2047,13 @@ (get major-mode 'find-tag-default-function) 'find-tag-default))) (comp-table (tags-lazy-completion-table)) - beg - completion) + beg) (or pattern (error "Nothing to complete")) (search-backward pattern) (setq beg (point)) (forward-char (length pattern)) - (setq completion (try-completion pattern comp-table)) - (cond ((eq completion t)) - ((null completion) - (message "Can't find completion for \"%s\"" pattern) - (ding)) - ((not (string= pattern completion)) - (delete-region beg (point)) - (insert completion)) - (t - (message "Making completion list...") - (with-output-to-temp-buffer "*Completions*" - (display-completion-list - (all-completions pattern comp-table nil) - pattern)) - (message "Making completion list...%s" "done"))))) + (completion-in-region beg (point) comp-table))) (dolist (x '("^No tags table in use; use .* to select one$" "^There is no default tag$"