diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-26 15:19:31 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-26 15:19:31 -0500 |
commit | 49bad2a0a662794089506a964cb7b470aff13826 (patch) | |
tree | d7aa80cd56ff48086b56c72b30d2762cace0581d /lisp/cedet/semantic/analyze/complete.el | |
parent | 496fa1c03b1b3ce4aa9872751e9fac45167766c2 (diff) | |
download | emacs-49bad2a0a662794089506a964cb7b470aff13826.tar.gz |
* lisp/cedet/semantic/analyze*.el: Use lexical-binding
* lisp/cedet/semantic/analyze.el: Use lexical-binding.
Rename the dynbound var `prefixtypes` to `semantic--prefixtypes`.
(semantic--prefixtypes): Declare var.
* lisp/cedet/semantic/analyze/complete.el: Use lexical-binding.
(semantic--prefixtypes): Declare var.
(semantic-analyze-possible-completions-default): Remove unused var `any`.
Rename `prefixtypes` to `semantic--prefixtypes`.
* lisp/cedet/semantic/analyze/debug.el: Use lexical-binding.
(semantic-analyzer-debug-global-symbol): Remove no-op use of `prefixtypes`.
* lisp/cedet/semantic/analyze/refs.el:
* lisp/cedet/semantic/analyze/fcn.el: Use lexical-binding.
Diffstat (limited to 'lisp/cedet/semantic/analyze/complete.el')
-rw-r--r-- | lisp/cedet/semantic/analyze/complete.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/cedet/semantic/analyze/complete.el b/lisp/cedet/semantic/analyze/complete.el index e8139ab1aea..ccf405d62e2 100644 --- a/lisp/cedet/semantic/analyze/complete.el +++ b/lisp/cedet/semantic/analyze/complete.el @@ -1,4 +1,4 @@ -;;; semantic/analyze/complete.el --- Smart Completions +;;; semantic/analyze/complete.el --- Smart Completions -*- lexical-binding: t; -*- ;; Copyright (C) 2007-2021 Free Software Foundation, Inc. @@ -45,7 +45,7 @@ "For the tag TYPE, return any constant symbols of TYPE. Used as options when completing.") -(defun semantic-analyze-type-constants-default (type) +(defun semantic-analyze-type-constants-default (_type) "Do nothing with TYPE." nil) @@ -54,7 +54,7 @@ Used as options when completing.") (let ((origc tags)) ;; Accept only tags that are of the datatype specified by ;; the desired classes. - (setq tags (apply 'nconc ;; All input lists are permutable. + (setq tags (apply #'nconc ;; All input lists are permutable. (mapcar (lambda (class) (semantic-find-tags-by-class class origc)) classlist))) @@ -109,6 +109,8 @@ in a buffer." (when (called-interactively-p 'any) (error "Buffer was not parsed by Semantic.")))) +(defvar semantic--prefixtypes) + (defun semantic-analyze-possible-completions-default (context &optional flags) "Default method for producing smart completions. Argument CONTEXT is an object specifying the locally derived context. @@ -121,14 +123,14 @@ FLAGS can be any number of: (desired-type (semantic-analyze-type-constraint a)) (desired-class (oref a prefixclass)) (prefix (oref a prefix)) - (prefixtypes (oref a prefixtypes)) + (semantic--prefixtypes (oref a prefixtypes)) (completetext nil) (completetexttype nil) (scope (oref a scope)) (localvar (when scope (oref scope localvar))) (origc nil) (c nil) - (any nil) + ;; (any nil) (do-typeconstraint (not (memq 'no-tc flags))) (do-longprefix (not (memq 'no-longprefix flags))) (do-unique (not (memq 'no-unique flags))) @@ -138,7 +140,7 @@ FLAGS can be any number of: ;; If we are not doing the long prefix, shorten all the key ;; elements. (setq prefix (list (car (reverse prefix))) - prefixtypes nil)) + semantic--prefixtypes nil)) ;; Calculate what our prefix string is so that we can ;; find all our matching text. @@ -155,7 +157,7 @@ FLAGS can be any number of: ;; The prefixtypes should always be at least 1 less than ;; the prefix since the type is never looked up for the last ;; item when calculating a sequence. - (setq completetexttype (car (reverse prefixtypes))) + (setq completetexttype (car (reverse semantic--prefixtypes))) (when (or (not completetexttype) (not (and (semantic-tag-p completetexttype) (eq (semantic-tag-class completetexttype) 'type)))) |