summaryrefslogtreecommitdiff
path: root/lisp/bindings.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/bindings.el')
-rw-r--r--lisp/bindings.el21
1 files changed, 14 insertions, 7 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index c4c1c78674d..6e23b972ad9 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -678,13 +678,20 @@ With a prefix argument, this command does completion within
the collection of symbols listed in the index of the manual for the
language you are using."
(interactive "P")
- (if arg
- (info-complete-symbol)
- (if (fboundp 'complete-tag)
- (complete-tag)
- ;; Don't autoload etags if we have no tags table.
- (error "%s" (substitute-command-keys
- "No tags table loaded; use \\[visit-tags-table] to load one")))))
+ (cond (arg
+ (info-complete-symbol))
+ ;; Don't autoload etags if we have no tags table.
+ ((or tags-table-list
+ tags-file-name)
+ (complete-tag))
+ ((and (fboundp 'semantic-active-p)
+ (semantic-active-p)
+ (fboundp 'semantic-complete-symbol))
+ (semantic-complete-symbol))
+ (t
+ (error "%s" (substitute-command-keys
+ "No tags table loaded; \
+use \\[visit-tags-table] to load one")))))
;; Reduce total amount of space we must allocate during this function
;; that we will not need to keep permanently.