[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 595e12c 1/7: Move functions from semantic.el to ana
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 595e12c 1/7: Move functions from semantic.el to analyze.el to avoid warnings |
Date: |
Fri, 14 Jun 2019 09:48:07 -0400 (EDT) |
branch: master
commit 595e12c2da7b5053f56f57ba59a6156ac239bbf0
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Move functions from semantic.el to analyze.el to avoid warnings
* 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 | 61 +++++++-----------------------------------
lisp/cedet/semantic/analyze.el | 52 +++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+), 51 deletions(-)
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index 3c84461..5e05d86 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -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
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el
index 8f1d928..6851ad5 100644
--- a/lisp/cedet/semantic/analyze.el
+++ b/lisp/cedet/semantic/analyze.el
@@ -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:
- [Emacs-diffs] master updated (c213422 -> 5b525f4), Lars Ingebrigtsen, 2019/06/14
- [Emacs-diffs] master 2604ea8 4/7: srecode/dictionary compilation warning fix, Lars Ingebrigtsen, 2019/06/14
- [Emacs-diffs] master 98df06c 2/7: srecode-inserter-prin-example compilation fix, Lars Ingebrigtsen, 2019/06/14
- [Emacs-diffs] master 4d96ee4 3/7: srecode/dictionary compilation fix, Lars Ingebrigtsen, 2019/06/14
- [Emacs-diffs] master 51ba125 5/7: srecode/find compilation fix, Lars Ingebrigtsen, 2019/06/14
- [Emacs-diffs] master 9fac0e7 6/7: srecode/srt-mode compilation fix, Lars Ingebrigtsen, 2019/06/14
- [Emacs-diffs] master 595e12c 1/7: Move functions from semantic.el to analyze.el to avoid warnings,
Lars Ingebrigtsen <=
- [Emacs-diffs] master 5b525f4 7/7: Use cl-typep instead of obsolete predicate functions throughout cedet, Lars Ingebrigtsen, 2019/06/14