]> git.eshelyaron.com Git - emacs.git/commitdiff
Move functions from semantic.el to analyze.el to avoid warnings
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 14 Jun 2019 13:15:09 +0000 (15:15 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 14 Jun 2019 13:15:09 +0000 (15:15 +0200)
* lisp/cedet/semantic.el (semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): Add
autoloads for the moved functions.

* lisp/cedet/semantic/analyze.el
(semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): Move
here from semantic.el to avoid getting compilation warnings about
unknown slot `bounds'.

lisp/cedet/semantic.el
lisp/cedet/semantic/analyze.el

index 3c844610e4162f66300dc37bea22badb65368ae4..5e05d86d113d0709ef62927ddbe0af5e579d20c9 100644 (file)
@@ -1168,57 +1168,6 @@ Semantic mode.
     ;; re-activated.
     (setq semantic-new-buffer-fcn-was-run nil)))
 
-;;; Completion At Point functions
-(defun semantic-analyze-completion-at-point-function ()
-  "Return possible analysis completions at point.
-The completions provided are via `semantic-analyze-possible-completions'.
-This function can be used by `completion-at-point-functions'."
-  (when (semantic-active-p)
-    (let* ((ctxt (semantic-analyze-current-context))
-           (possible (semantic-analyze-possible-completions ctxt)))
-
-      ;; The return from this is either:
-      ;; nil - not applicable here.
-      ;; A list: (START END COLLECTION . PROPS)
-      (when possible
-        (list (car (oref ctxt bounds))
-              (cdr (oref ctxt bounds))
-              possible))
-      )))
-
-(defun semantic-analyze-notc-completion-at-point-function ()
-  "Return possible analysis completions at point.
-The completions provided are via `semantic-analyze-possible-completions',
-but with the `no-tc' option passed in, which means constraints based
-on what is being assigned to are ignored.
-This function can be used by `completion-at-point-functions'."
-  (when (semantic-active-p)
-    (let* ((ctxt (semantic-analyze-current-context))
-           (possible (semantic-analyze-possible-completions ctxt 'no-tc)))
-
-      (when possible
-        (list (car (oref ctxt bounds))
-              (cdr (oref ctxt bounds))
-              possible))
-      )))
-
-(defun semantic-analyze-nolongprefix-completion-at-point-function ()
-  "Return possible analysis completions at point.
-The completions provided are via `semantic-analyze-possible-completions',
-but with the `no-tc' and `no-longprefix' option passed in, which means
-constraints resulting in a long multi-symbol dereference are ignored.
-This function can be used by `completion-at-point-functions'."
-  (when (semantic-active-p)
-    (let* ((ctxt (semantic-analyze-current-context))
-           (possible (semantic-analyze-possible-completions
-                      ctxt 'no-tc 'no-longprefix)))
-
-      (when possible
-        (list (car (oref ctxt bounds))
-              (cdr (oref ctxt bounds))
-              possible))
-      )))
-
 ;;; Autoload some functions that are not in semantic/loaddefs
 
 (autoload 'global-semantic-idle-completions-mode "semantic/idle"
@@ -1259,6 +1208,16 @@ Call `semantic-symref-hits-in-region' to identify local references." t nil)
 (autoload 'srecode-template-setup-parser "srecode/srecode-template"
   "Set up buffer for parsing SRecode template files." t nil)
 
+(autoload 'semantic-analyze-completion-at-point-function "semantic/analyze"
+  "Return possible analysis completions at point.")
+
+(autoload 'semantic-analyze-notc-completion-at-point-function "semantic/analyze"
+  "Return possible analysis completions at point.")
+
+(autoload 'semantic-analyze-nolongprefix-completion-at-point-function
+  "semantic/analyze"
+  "Return possible analysis completions at point.")
+
 (provide 'semantic)
 
 ;; Semantic-util is a part of the semantic API.  Include it last
index 8f1d92822e6e173b70013c990dd18c136b66f9ca..6851ad556a76b8ee5fa79a051c65bd7e52e01a10 100644 (file)
@@ -819,6 +819,58 @@ CONTEXT's content is described in `semantic-analyze-current-context'."
    (get-buffer-window "*Semantic Context Analysis*"))
   )
 
+
+;;; Completion At Point functions
+(defun semantic-analyze-completion-at-point-function ()
+  "Return possible analysis completions at point.
+The completions provided are via `semantic-analyze-possible-completions'.
+This function can be used by `completion-at-point-functions'."
+  (when (semantic-active-p)
+    (let* ((ctxt (semantic-analyze-current-context))
+           (possible (semantic-analyze-possible-completions ctxt)))
+
+      ;; The return from this is either:
+      ;; nil - not applicable here.
+      ;; A list: (START END COLLECTION . PROPS)
+      (when possible
+        (list (car (oref ctxt bounds))
+              (cdr (oref ctxt bounds))
+              possible))
+      )))
+
+(defun semantic-analyze-notc-completion-at-point-function ()
+  "Return possible analysis completions at point.
+The completions provided are via `semantic-analyze-possible-completions',
+but with the `no-tc' option passed in, which means constraints based
+on what is being assigned to are ignored.
+This function can be used by `completion-at-point-functions'."
+  (when (semantic-active-p)
+    (let* ((ctxt (semantic-analyze-current-context))
+           (possible (semantic-analyze-possible-completions ctxt 'no-tc)))
+
+      (when possible
+        (list (car (oref ctxt bounds))
+              (cdr (oref ctxt bounds))
+              possible))
+      )))
+
+(defun semantic-analyze-nolongprefix-completion-at-point-function ()
+  "Return possible analysis completions at point.
+The completions provided are via `semantic-analyze-possible-completions',
+but with the `no-tc' and `no-longprefix' option passed in, which means
+constraints resulting in a long multi-symbol dereference are ignored.
+This function can be used by `completion-at-point-functions'."
+  (when (semantic-active-p)
+    (let* ((ctxt (semantic-analyze-current-context))
+           (possible (semantic-analyze-possible-completions
+                      ctxt 'no-tc 'no-longprefix)))
+
+      (when possible
+        (list (car (oref ctxt bounds))
+              (cdr (oref ctxt bounds))
+              possible))
+      )))
+
 (provide 'semantic/analyze)
 
 ;; Local variables: