aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2019-10-23 16:15:41 -0400
committerStefan Monnier2019-10-23 16:15:41 -0400
commit72e1e30afeb3e69797fb43af216e9d8c4945359f (patch)
tree0c463630876a8ce841dca367943e78fe52be4b35
parentb7037662e1111d55218fb2345f9ebb9ed3ebef13 (diff)
downloademacs-72e1e30afeb3e69797fb43af216e9d8c4945359f.tar.gz
emacs-72e1e30afeb3e69797fb43af216e9d8c4945359f.zip
* lisp/cedet/semantic/analyze/complete.el: Fix completion-at-point
Completion tables are not supposed to signal errors: emacs -q M-x semantic-mode ; visit a file supported by semantic, such as a C file ; put cursor in a blank space M-x completion-at-point It will error with: "Nothing to complete" (semantic-analyze-possible-completions): Return nil instead of signaling errors.
-rw-r--r--lisp/cedet/semantic/analyze/complete.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/cedet/semantic/analyze/complete.el b/lisp/cedet/semantic/analyze/complete.el
index b471c0d1a13..b473ade1594 100644
--- a/lisp/cedet/semantic/analyze/complete.el
+++ b/lisp/cedet/semantic/analyze/complete.el
@@ -93,8 +93,10 @@ in a buffer."
93 context 93 context
94 (semantic-analyze-current-context context))) 94 (semantic-analyze-current-context context)))
95 (ans (if (not context) 95 (ans (if (not context)
96 (error "Nothing to complete") 96 (when (called-interactively-p 'any)
97 (:override)))) 97 (error "Nothing to complete"))
98 (with-demoted-errors "%S"
99 (:override)))))
98 ;; If interactive, display them. 100 ;; If interactive, display them.
99 (when (called-interactively-p 'any) 101 (when (called-interactively-p 'any)
100 (with-output-to-temp-buffer "*Possible Completions*" 102 (with-output-to-temp-buffer "*Possible Completions*"