summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/analyze
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/semantic/analyze')
-rw-r--r--lisp/cedet/semantic/analyze/complete.el16
-rw-r--r--lisp/cedet/semantic/analyze/debug.el25
-rw-r--r--lisp/cedet/semantic/analyze/fcn.el4
-rw-r--r--lisp/cedet/semantic/analyze/refs.el4
4 files changed, 26 insertions, 23 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))))
diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el
index 4947368757e..69b3b9c8328 100644
--- a/lisp/cedet/semantic/analyze/debug.el
+++ b/lisp/cedet/semantic/analyze/debug.el
@@ -1,6 +1,6 @@
-;;; semantic/analyze/debug.el --- Debug the analyzer
+;;; semantic/analyze/debug.el --- Debug the analyzer -*- lexical-binding: t; -*-
-;;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -109,11 +109,11 @@ Argument COMP are possible completions here."
(condition-case err
(with-current-buffer origbuf
(let* ((position (or (cdr-safe (oref ctxt bounds)) (point)))
- (prefixtypes nil) ; Used as type return
+ ;; (semantic--prefixtypes nil) ; Used as type return
(scope (semantic-calculate-scope position))
)
(semantic-analyze-find-tag-sequence
- (list prefix "") scope 'prefixtypes)
+ (list prefix "") scope) ;; 'semantic--prefixtypes
)
)
(error (setq finderr err)))
@@ -149,7 +149,7 @@ path was setup incorrectly.\n")
(semantic-analyzer-debug-add-buttons)
))
-(defun semantic-analyzer-debug-missing-datatype (ctxt idx comp)
+(defun semantic-analyzer-debug-missing-datatype (ctxt idx _comp)
"Debug why we can't find a datatype entry for CTXT prefix at IDX.
Argument COMP are possible completions here."
(let* ((prefixitem (nth idx (oref ctxt prefix)))
@@ -593,19 +593,20 @@ Look for key expressions, and add push-buttons near them."
(setq-local semantic-analyzer-debug-orig orig-buffer)
;; First, add do-in buttons to recommendations.
(while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t)
- (let ((fcn (match-string 1)))
- (when (not (fboundp (intern-soft fcn)))
+ (let* ((fcn (match-string 1))
+ (fsym (intern-soft fcn)))
+ (when (not (fboundp fsym))
(error "Help Err: Can't find %s" fcn))
(end-of-line)
(insert " ")
(insert-button "[ Do It ]"
'mouse-face 'custom-button-pressed-face
'do-fcn fcn
- 'action `(lambda (arg)
- (let ((M semantic-analyzer-debug-orig))
- (set-buffer (marker-buffer M))
- (goto-char M))
- (call-interactively (quote ,(intern-soft fcn))))))))
+ 'action (lambda (_arg)
+ (let ((M semantic-analyzer-debug-orig))
+ (set-buffer (marker-buffer M))
+ (goto-char M))
+ (call-interactively fsym))))))
;; Do something else?
;; Clean up the mess
(set-buffer-modified-p nil))))
diff --git a/lisp/cedet/semantic/analyze/fcn.el b/lisp/cedet/semantic/analyze/fcn.el
index 10d11c33ebb..d47e8976e58 100644
--- a/lisp/cedet/semantic/analyze/fcn.el
+++ b/lisp/cedet/semantic/analyze/fcn.el
@@ -1,4 +1,4 @@
-;;; semantic/analyze/fcn.el --- Analyzer support functions.
+;;; semantic/analyze/fcn.el --- Analyzer support functions. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
@@ -55,7 +55,7 @@ Return the string representing the compound name.")
(defun semantic-analyze-unsplit-name-default (namelist)
"Concatenate the names in NAMELIST with a . between."
- (mapconcat 'identity namelist "."))
+ (mapconcat #'identity namelist "."))
;;; SELECTING
;;
diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el
index a39ff6f6736..31cbb9e1173 100644
--- a/lisp/cedet/semantic/analyze/refs.el
+++ b/lisp/cedet/semantic/analyze/refs.el
@@ -1,4 +1,4 @@
-;;; semantic/analyze/refs.el --- Analysis of the references between tags.
+;;; semantic/analyze/refs.el --- Analysis of the references between tags. -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -296,7 +296,7 @@ Only works for tags in the global namespace."
(let* ((classmatch (semantic-tag-class tag))
(RES
(semanticdb-find-tags-collector
- (lambda (table tags)
+ (lambda (_table tags)
(semantic-find-tags-by-class classmatch tags)
;; @todo - Add parent check also.
)