* lisp/cedet/ (semantic-analyze-possible-completions): Add flags arg

* lisp/cedet/semantic/texi.el (semantic-analyze-possible-completions),
lisp/cedet/srecode/srt-mode.el (semantic-analyze-possible-completions),
lisp/cedet/semantic/bovine/make.el (semantic-analyze-possible-completions):
Add `flags` arg.
* lisp/cedet/semantic/grammar.el (semantic-analyze-possible-completions):
Add `flags` arg.  Reverse the found prefix.
(semantic-ctxt-current-class-list): Include token tags as things to
appear in non-lisp context.
This commit is contained in:
Eric Ludlam 2019-10-31 19:10:58 -04:00 committed by Stefan Monnier
parent cf59afb7e1
commit 9d209c9034
4 changed files with 6 additions and 6 deletions

View file

@ -175,7 +175,7 @@ This is the same as a regular prototype."
(semantic-format-tag-prototype tag parent color))
(define-mode-local-override semantic-analyze-possible-completions
makefile-mode (context)
makefile-mode (context &rest flags)
"Return a list of possible completions in a Makefile.
Uses default implementation, and also gets a list of filenames."
(require 'semantic/analyze/complete)

View file

@ -1777,7 +1777,7 @@ Only tags of type 'nonterminal will be so marked."
(if (semantic-grammar-in-lisp-p)
(with-mode-local emacs-lisp-mode
(semantic-ctxt-current-class-list))
'(nonterminal keyword))))
'(nonterminal token keyword))))
(define-mode-local-override semantic-ctxt-current-mode
semantic-grammar-mode (&optional point)
@ -1915,14 +1915,14 @@ Optional argument COLOR determines if color is added to the text."
context-return)))
(define-mode-local-override semantic-analyze-possible-completions
semantic-grammar-mode (context)
semantic-grammar-mode (context &rest flags)
"Return a list of possible completions based on CONTEXT."
(require 'semantic/analyze/complete)
(if (semantic-grammar-in-lisp-p)
(with-mode-local emacs-lisp-mode
(semantic-analyze-possible-completions context))
(with-current-buffer (oref context buffer)
(let* ((prefix (car (oref context prefix)))
(let* ((prefix (car (reverse (oref context prefix))))
(completetext (cond ((semantic-tag-p prefix)
(semantic-tag-name prefix))
((stringp prefix)

View file

@ -408,7 +408,7 @@ Optional argument POINT is where to look for the environment."
"List of commands that we might bother completing.")
(define-mode-local-override semantic-analyze-possible-completions
texinfo-mode (context)
texinfo-mode (context &rest flags)
"List smart completions at point.
Since texinfo is not a programming language the default version is not
useful. Instead, look at the current symbol. If it is a command

View file

@ -627,7 +627,7 @@ section or ? for an ask variable."
context-return)))
(define-mode-local-override semantic-analyze-possible-completions
srecode-template-mode (context)
srecode-template-mode (context &rest flags)
"Return a list of possible completions based on NONTEXT."
(with-current-buffer (oref context buffer)
(let* ((prefix (car (last (oref context prefix))))