]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/cedet/ (semantic-analyze-possible-completions): Add `flags` arg
authorEric Ludlam <ericludlam@gmail.com>
Thu, 31 Oct 2019 23:10:58 +0000 (19:10 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 31 Oct 2019 23:10:58 +0000 (19:10 -0400)
* 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.

lisp/cedet/semantic/bovine/make.el
lisp/cedet/semantic/grammar.el
lisp/cedet/semantic/texi.el
lisp/cedet/srecode/srt-mode.el

index 3676c6972f21668f1829220dfe7c5fb05410f953..01a15b82322dc488aac7e5ee6556d5790121a3c3 100644 (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)
index 813580ba6c2d814f9c0d962cc049638f506ed154..53b5ea61f2dedb01b39da8318da9463d09d72d8c 100644 (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)
index d0e6ad83b2a8e12f6c9340c081a5a8e6f38acacc..7d663f3e3ac88ec3d588d9c3d0bff1cc1a9c1d0b 100644 (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
index 5e7c7c111a390a0736c62b971f89ce33b44dec76..ac74949627ee82ccb4512a7afccc32fee2989a8f 100644 (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))))