[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 72e1e30: * lisp/cedet/semantic/analyze/complete.el:
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master 72e1e30: * lisp/cedet/semantic/analyze/complete.el: Fix completion-at-point |
Date: |
Wed, 23 Oct 2019 16:15:46 -0400 (EDT) |
branch: master
commit 72e1e30afeb3e69797fb43af216e9d8c4945359f
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* 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.
---
lisp/cedet/semantic/analyze/complete.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/cedet/semantic/analyze/complete.el
b/lisp/cedet/semantic/analyze/complete.el
index b471c0d..b473ade 100644
--- a/lisp/cedet/semantic/analyze/complete.el
+++ b/lisp/cedet/semantic/analyze/complete.el
@@ -93,8 +93,10 @@ in a buffer."
context
(semantic-analyze-current-context context)))
(ans (if (not context)
- (error "Nothing to complete")
- (:override))))
+ (when (called-interactively-p 'any)
+ (error "Nothing to complete"))
+ (with-demoted-errors "%S"
+ (:override)))))
;; If interactive, display them.
(when (called-interactively-p 'any)
(with-output-to-temp-buffer "*Possible Completions*"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 72e1e30: * lisp/cedet/semantic/analyze/complete.el: Fix completion-at-point,
Stefan Monnier <=