summaryrefslogtreecommitdiff
path: root/lisp/cedet/srecode
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/srecode')
-rw-r--r--lisp/cedet/srecode/args.el2
-rw-r--r--lisp/cedet/srecode/compile.el13
-rw-r--r--lisp/cedet/srecode/cpp.el7
-rw-r--r--lisp/cedet/srecode/ctxt.el2
-rw-r--r--lisp/cedet/srecode/dictionary.el21
-rw-r--r--lisp/cedet/srecode/document.el11
-rw-r--r--lisp/cedet/srecode/el.el2
-rw-r--r--lisp/cedet/srecode/expandproto.el2
-rw-r--r--lisp/cedet/srecode/extract.el20
-rw-r--r--lisp/cedet/srecode/fields.el31
-rw-r--r--lisp/cedet/srecode/filters.el2
-rw-r--r--lisp/cedet/srecode/find.el23
-rw-r--r--lisp/cedet/srecode/getset.el4
-rw-r--r--lisp/cedet/srecode/insert.el17
-rw-r--r--lisp/cedet/srecode/java.el2
-rw-r--r--lisp/cedet/srecode/map.el6
-rw-r--r--lisp/cedet/srecode/mode.el35
-rw-r--r--lisp/cedet/srecode/srt-mode.el16
-rw-r--r--lisp/cedet/srecode/srt.el8
-rw-r--r--lisp/cedet/srecode/table.el6
-rw-r--r--lisp/cedet/srecode/template.el8
-rw-r--r--lisp/cedet/srecode/texi.el4
22 files changed, 120 insertions, 122 deletions
diff --git a/lisp/cedet/srecode/args.el b/lisp/cedet/srecode/args.el
index 24c5f22f2e7..79d2700c5d9 100644
--- a/lisp/cedet/srecode/args.el
+++ b/lisp/cedet/srecode/args.el
@@ -1,4 +1,4 @@
-;;; srecode/args.el --- Provide some simple template arguments
+;;; srecode/args.el --- Provide some simple template arguments -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el
index 7146b643836..15107ef1e43 100644
--- a/lisp/cedet/srecode/compile.el
+++ b/lisp/cedet/srecode/compile.el
@@ -1,4 +1,4 @@
-;;; srecode/compile --- Compilation of srecode template files.
+;;; srecode/compile --- Compilation of srecode template files. -*- lexical-binding: t; -*-
;; Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc.
@@ -110,7 +110,12 @@ stack is broken."
:type (or null string)
:documentation
"If there is a colon in the inserter's name, it represents
-additional static argument data."))
+additional static argument data.")
+ (key :initform nil :allocation :class
+ :documentation
+ "The character code used to identify inserters of this style.
+All children of this class should specify `key' slot with appropriate
+:initform value."))
"This represents an item to be inserted via a template macro.
Plain text strings are not handled via this baseclass."
:abstract t)
@@ -499,7 +504,7 @@ PROPS are additional properties that might need to be passed
to the inserter constructor."
;;(message "Compile: %s %S" name props)
(if (not key)
- (apply 'srecode-template-inserter-variable name props)
+ (apply #'make-instance 'srecode-template-inserter-variable name props)
(let ((classes (eieio-class-children 'srecode-template-inserter))
(new nil))
;; Loop over the various subclasses and
@@ -510,7 +515,7 @@ to the inserter constructor."
(when (and (not (class-abstract-p (car classes)))
(equal (oref-default (car classes) key) key))
;; Create the new class, and apply state.
- (setq new (apply (car classes) name props))
+ (setq new (apply #'make-instance (car classes) name props))
(srecode-inserter-apply-state new STATE)
)
(setq classes (cdr classes)))
diff --git a/lisp/cedet/srecode/cpp.el b/lisp/cedet/srecode/cpp.el
index 1b9610f3f1b..dc5e8da5cdb 100644
--- a/lisp/cedet/srecode/cpp.el
+++ b/lisp/cedet/srecode/cpp.el
@@ -1,4 +1,4 @@
-;;; srecode/cpp.el --- C++ specific handlers for Semantic Recoder
+;;; srecode/cpp.el --- C++ specific handlers for Semantic Recoder -*- lexical-binding: t; -*-
;; Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
@@ -44,7 +44,6 @@
A dictionary entry of the named PREFIX_NAMESPACE with the value
NAMESPACE:: is created for each namespace unless the current
buffer contains a using NAMESPACE; statement."
- :group 'srecode-cpp
:type '(repeat string))
;;; :c ARGUMENT HANDLING
@@ -165,7 +164,7 @@ specified in a C file."
;; when they make sense. My best bet would be
;; (semantic-tag-function-parent tag), but it is not there, when
;; the function is defined in the scope of a class.
- (let ((member t)
+ (let (;; (member t)
(templates (semantic-tag-get-attribute tag :template))
(modifiers (semantic-tag-modifiers tag)))
@@ -186,7 +185,7 @@ specified in a C file."
;; When the function is a member function, it can have
;; additional modifiers.
- (when member
+ (when t ;; member
;; For member functions, constness is called
;; 'methodconst-flag'.
diff --git a/lisp/cedet/srecode/ctxt.el b/lisp/cedet/srecode/ctxt.el
index 20334f95838..c49237b94cf 100644
--- a/lisp/cedet/srecode/ctxt.el
+++ b/lisp/cedet/srecode/ctxt.el
@@ -1,4 +1,4 @@
-;;; srecode/ctxt.el --- Derive a context from the source buffer.
+;;; srecode/ctxt.el --- Derive a context from the source buffer. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el
index c1fe4b2c34e..5da045e17f1 100644
--- a/lisp/cedet/srecode/dictionary.el
+++ b/lisp/cedet/srecode/dictionary.el
@@ -1,4 +1,4 @@
-;;; srecode/dictionary.el --- Dictionary code for the semantic recoder.
+;;; srecode/dictionary.el --- Dictionary code for the semantic recoder. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
@@ -443,8 +443,8 @@ The root dictionary is usually for a current or active insertion."
;; for use in converting the compound value into something insertable.
(cl-defmethod srecode-compound-toString ((cp srecode-dictionary-compound-value)
- function
- dictionary)
+ _function
+ _dictionary)
"Convert the compound dictionary value CP to a string.
If FUNCTION is non-nil, then FUNCTION is somehow applied to an aspect
of the compound value. The FUNCTION could be a fraction
@@ -457,14 +457,15 @@ standard out is a buffer, and using `insert'."
(eieio-object-name cp))
(cl-defmethod srecode-dump ((cp srecode-dictionary-compound-value)
- &optional indent)
+ &optional _indent)
"Display information about this compound value."
(princ (eieio-object-name cp))
)
-(cl-defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable)
- function
- dictionary)
+(cl-defmethod srecode-compound-toString
+ ((cp srecode-dictionary-compound-variable)
+ _function
+ dictionary)
"Convert the compound dictionary variable value CP into a string.
FUNCTION and DICTIONARY are as for the baseclass."
(require 'srecode/insert)
@@ -606,9 +607,9 @@ STATE is the current compiler state."
(require 'srecode/find)
(let* ((modesym major-mode)
(start (current-time))
- (junk (or (progn (srecode-load-tables-for-mode modesym)
- (srecode-get-mode-table modesym))
- (error "No table found for mode %S" modesym)))
+ (_ (or (progn (srecode-load-tables-for-mode modesym)
+ (srecode-get-mode-table modesym))
+ (error "No table found for mode %S" modesym)))
(dict (srecode-create-dictionary (current-buffer)))
)
(message "Creating a dictionary took %.2f seconds."
diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el
index 0d1a4c01d3c..270b80d9013 100644
--- a/lisp/cedet/srecode/document.el
+++ b/lisp/cedet/srecode/document.el
@@ -1,4 +1,4 @@
-;;; srecode/document.el --- Documentation (comment) generation
+;;; srecode/document.el --- Documentation (comment) generation -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -88,7 +88,6 @@ versions of names. This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
RESULT is a string."
- :group 'document
:type '(repeat (cons (regexp :tag "Regexp")
(string :tag "Doc Text"))))
@@ -144,7 +143,6 @@ A string may end in a space, in which case, last-alist is searched to
see how best to describe what can be returned.
Doesn't always work correctly, but that is just because English
doesn't always work correctly."
- :group 'document
:type '(repeat (cons (regexp :tag "Regexp")
(string :tag "Doc Text"))))
@@ -175,7 +173,6 @@ versions of names. This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
RESULT is a string."
- :group 'document
:type '(repeat (cons (regexp :tag "Regexp")
(string :tag "Doc Text"))))
@@ -192,7 +189,6 @@ This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
RESULT is a string."
- :group 'document
:type '(repeat (cons (regexp :tag "Regexp")
(string :tag "Doc Text"))))
@@ -213,7 +209,6 @@ This is an alist with each element of the form:
MATCH is a regexp to match in the type field.
RESULT is a string, which can contain %s, which is replaced with
`match-string' 1."
- :group 'document
:type '(repeat (cons (regexp :tag "Regexp")
(string :tag "Doc Text"))))
@@ -233,7 +228,6 @@ MATCH is a regexp to match in the type field.
RESULT is a string of text to use to describe MATCH.
When one is encountered, document-insert-parameters will automatically
place this comment after the parameter name."
- :group 'document
:type '(repeat (cons (regexp :tag "Regexp")
(string :tag "Doc Text"))))
@@ -258,7 +252,6 @@ This is an alist with each element of the form:
(MATCH . RESULT)
MATCH is a regexp to match in the type field.
RESULT is a string."
- :group 'document
:type '(repeat (cons (regexp :tag "Regexp")
(string :tag "Doc Text"))))
@@ -716,7 +709,7 @@ allocating something based on its type."
(setq al (cdr al)))))
news))
-(defun srecode-document-parameter-comment (param &optional commentlist)
+(defun srecode-document-parameter-comment (param &optional _commentlist)
"Convert tag or string PARAM into a name,comment pair.
Optional COMMENTLIST is list of previously existing comments to
use instead in alist form. If the name doesn't appear in the list of
diff --git a/lisp/cedet/srecode/el.el b/lisp/cedet/srecode/el.el
index 7e9dd10fd42..974a4fac727 100644
--- a/lisp/cedet/srecode/el.el
+++ b/lisp/cedet/srecode/el.el
@@ -1,4 +1,4 @@
-;;; srecode/el.el --- Emacs Lisp specific arguments
+;;; srecode/el.el --- Emacs Lisp specific arguments -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
diff --git a/lisp/cedet/srecode/expandproto.el b/lisp/cedet/srecode/expandproto.el
index cdb29d16b71..a40d5aec24d 100644
--- a/lisp/cedet/srecode/expandproto.el
+++ b/lisp/cedet/srecode/expandproto.el
@@ -1,4 +1,4 @@
-;;; srecode/expandproto.el --- Expanding prototypes.
+;;; srecode/expandproto.el --- Expanding prototypes. -*- lexical-binding: t; -*-
;; Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
diff --git a/lisp/cedet/srecode/extract.el b/lisp/cedet/srecode/extract.el
index 625b854b776..9e6a98fd769 100644
--- a/lisp/cedet/srecode/extract.el
+++ b/lisp/cedet/srecode/extract.el
@@ -1,4 +1,4 @@
-;;; srecode/extract.el --- Extract content from previously inserted macro.
+;;; srecode/extract.el --- Extract content from previously inserted macro. -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -139,24 +139,24 @@ Uses STATE to maintain the current extraction state."
;;; Inserter Base Extractors
;;
-(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter))
+(cl-defmethod srecode-inserter-do-extract-p ((_ins srecode-template-inserter))
"Return non-nil if this inserter can extract values."
nil)
-(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter)
- start end dict state)
+(cl-defmethod srecode-inserter-extract ((_ins srecode-template-inserter)
+ _start _end _dict _state)
"Extract text from START/END and store in DICT.
Return nil as this inserter will extract nothing."
nil)
;;; Variable extractor is simple and can extract later.
;;
-(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-variable))
+(cl-defmethod srecode-inserter-do-extract-p ((_ins srecode-template-inserter-variable))
"Return non-nil if this inserter can extract values."
'later)
(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-variable)
- start end vdict state)
+ start end vdict _state)
"Extract text from START/END and store in VDICT.
Return t if something was extracted.
Return nil if this inserter doesn't need to extract anything."
@@ -168,12 +168,12 @@ Return nil if this inserter doesn't need to extract anything."
;;; Section Inserter
;;
-(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-section-start))
+(cl-defmethod srecode-inserter-do-extract-p ((_ins srecode-template-inserter-section-start))
"Return non-nil if this inserter can extract values."
'now)
(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-section-start)
- start end indict state)
+ _start _end indict state)
"Extract text from START/END and store in INDICT.
Return the starting location of the first plain-text match.
Return nil if nothing was extracted."
@@ -201,12 +201,12 @@ Return nil if nothing was extracted."
;;; Include Extractor must extract now.
;;
-(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-include))
+(cl-defmethod srecode-inserter-do-extract-p ((_ins srecode-template-inserter-include))
"Return non-nil if this inserter can extract values."
'now)
(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-include)
- start end dict state)
+ start _end dict state)
"Extract text from START/END and store in DICT.
Return the starting location of the first plain-text match.
Return nil if nothing was extracted."
diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el
index 71613bcc2a3..e65e3194320 100644
--- a/lisp/cedet/srecode/fields.el
+++ b/lisp/cedet/srecode/fields.el
@@ -1,4 +1,4 @@
-;;; srecode/fields.el --- Handling type-in fields in a buffer.
+;;; srecode/fields.el --- Handling type-in fields in a buffer. -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
;;
@@ -193,7 +193,7 @@ If SET-TO is a string, then replace the text of OLAID with SET-TO."
"Manage a buffer region in which fields exist.")
(cl-defmethod initialize-instance ((ir srecode-template-inserted-region)
- &rest args)
+ &rest _args)
"Initialize IR, capturing the active fields, and creating the overlay."
;; Fill in the fields
(oset ir fields srecode-field-archive)
@@ -221,7 +221,7 @@ If SET-TO is a string, then replace the text of OLAID with SET-TO."
(oset ir active-region ir)
;; Setup the post command hook.
- (add-hook 'post-command-hook 'srecode-field-post-command t t)
+ (add-hook 'post-command-hook #'srecode-field-post-command t t)
)
(cl-defmethod srecode-delete ((ir srecode-template-inserted-region))
@@ -229,12 +229,11 @@ If SET-TO is a string, then replace the text of OLAID with SET-TO."
;; Clear us out of the baseclass.
(oset ir active-region nil)
;; Clear our fields.
- (mapc 'srecode-delete (oref ir fields))
+ (mapc #'srecode-delete (oref ir fields))
;; Call to our base
(cl-call-next-method)
;; Clear our hook.
- (remove-hook 'post-command-hook 'srecode-field-post-command t)
- )
+ (remove-hook 'post-command-hook #'srecode-field-post-command t))
(defsubst srecode-active-template-region ()
"Return the active region for template fields."
@@ -246,7 +245,7 @@ If SET-TO is a string, then replace the text of OLAID with SET-TO."
)
(if (not ar)
;; Find a bug and fix it.
- (remove-hook 'post-command-hook 'srecode-field-post-command t)
+ (remove-hook 'post-command-hook #'srecode-field-post-command t)
(if (srecode-point-in-region-p ar)
nil ;; Keep going
;; We moved out of the template. Cancel the edits.
@@ -277,16 +276,16 @@ Try to use this to provide useful completion when available.")
(defvar srecode-field-keymap
(let ((km (make-sparse-keymap)))
- (define-key km "\C-i" 'srecode-field-next)
- (define-key km "\M-\C-i" 'srecode-field-prev)
- (define-key km "\C-e" 'srecode-field-end)
- (define-key km "\C-a" 'srecode-field-start)
- (define-key km "\M-m" 'srecode-field-start)
- (define-key km "\C-c\C-c" 'srecode-field-exit-ask)
+ (define-key km "\C-i" #'srecode-field-next)
+ (define-key km "\M-\C-i" #'srecode-field-prev)
+ (define-key km "\C-e" #'srecode-field-end)
+ (define-key km "\C-a" #'srecode-field-start)
+ (define-key km "\M-m" #'srecode-field-start)
+ (define-key km "\C-c\C-c" #'srecode-field-exit-ask)
km)
"Keymap applied to field overlays.")
-(cl-defmethod initialize-instance ((field srecode-field) &optional args)
+(cl-defmethod initialize-instance ((field srecode-field) &optional _args)
"Initialize FIELD, being sure it archived."
(add-to-list 'srecode-field-archive field t)
(cl-call-next-method)
@@ -327,7 +326,7 @@ Try to use this to provide useful completion when available.")
(defvar srecode-field-replication-max-size 100
"Maximum size of a field before canceling replication.")
-(defun srecode-field-mod-hook (ol after start end &optional pre-len)
+(defun srecode-field-mod-hook (ol after _start _end &optional _pre-len)
"Modification hook for the field overlay.
OL is the overlay.
AFTER is non-nil if it is called after the change.
@@ -374,7 +373,7 @@ AFTER is non-nil if it is called after the change.
START and END are the bounds of the change.
PRE-LEN is used in the after mode for the length of the changed text."
(when after
- (let* ((field (overlay-get ol 'srecode))
+ (let* (;; (field (overlay-get ol 'srecode))
)
(move-overlay ol (overlay-start ol) end)
(srecode-field-mod-hook ol after start end pre-len))
diff --git a/lisp/cedet/srecode/filters.el b/lisp/cedet/srecode/filters.el
index 4a996cf6f12..b76ce2c94bf 100644
--- a/lisp/cedet/srecode/filters.el
+++ b/lisp/cedet/srecode/filters.el
@@ -1,4 +1,4 @@
-;;; srecode/filters.el --- Filters for use in template variables.
+;;; srecode/filters.el --- Filters for use in template variables. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
diff --git a/lisp/cedet/srecode/find.el b/lisp/cedet/srecode/find.el
index aec73dce5a5..1c208d0f328 100644
--- a/lisp/cedet/srecode/find.el
+++ b/lisp/cedet/srecode/find.el
@@ -1,4 +1,4 @@
-;;;; srecode/find.el --- Tools for finding templates in the database.
+;;;; srecode/find.el --- Tools for finding templates in the database. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
@@ -58,17 +58,14 @@ See `srecode-get-maps' for more.
APPNAME is the name of an application. In this case,
all template files for that application will be loaded."
(let ((files
- (if appname
- (apply 'append
- (mapcar
+ (apply #'append
+ (mapcar
+ (if appname
(lambda (map)
(srecode-map-entries-for-app-and-mode map appname mmode))
- (srecode-get-maps)))
- (apply 'append
- (mapcar
(lambda (map)
- (srecode-map-entries-for-mode map mmode))
- (srecode-get-maps)))))
+ (srecode-map-entries-for-mode map mmode)))
+ (srecode-get-maps))))
)
;; Don't recurse if we are already the 'default state.
(when (not (eq mmode 'default))
@@ -112,8 +109,8 @@ If TAB is nil, then always return t."
;; Find a given template based on name, and features of the current
;; buffer.
(cl-defmethod srecode-template-get-table ((tab srecode-template-table)
- template-name &optional
- context application)
+ template-name &optional
+ context _application)
"Find in the template in table TAB, the template with TEMPLATE-NAME.
Optional argument CONTEXT specifies that the template should part
of a particular context.
@@ -218,7 +215,7 @@ tables that do not belong to an application will be searched."
(defvar srecode-read-template-name-history nil
"History for completing reads for template names.")
-(defun srecode-user-template-p (template)
+(defun srecode-user-template-p (_template)
"Non-nil if TEMPLATE is intended for user insertion.
Templates not matching this predicate are used for code
generation or other internal purposes."
@@ -264,7 +261,7 @@ with `srecode-calculate-context'."
;; the prefix for the completing read
(concat (nth 0 ctxt) ":"))))
-(defun srecode-read-template-name (prompt &optional initial hist default)
+(defun srecode-read-template-name (prompt &optional initial hist _default)
"Completing read for Semantic Recoder template names.
PROMPT is used to query for the name of the template desired.
INITIAL is the initial string to use.
diff --git a/lisp/cedet/srecode/getset.el b/lisp/cedet/srecode/getset.el
index 1e4888655f9..ce4c818c709 100644
--- a/lisp/cedet/srecode/getset.el
+++ b/lisp/cedet/srecode/getset.el
@@ -1,4 +1,4 @@
-;;; srecode/getset.el --- Package for inserting new get/set methods.
+;;; srecode/getset.el --- Package for inserting new get/set methods. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
@@ -33,6 +33,8 @@
(defvar srecode-insert-getset-fully-automatic-flag nil
"Non-nil means accept choices srecode comes up with without asking.")
+(defvar srecode-semantic-selected-tag)
+
;;;###autoload
(defun srecode-insert-getset (&optional class-in field-in)
"Insert get/set methods for the current class.
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el
index ab0503c8d36..f20842b1d8a 100644
--- a/lisp/cedet/srecode/insert.el
+++ b/lisp/cedet/srecode/insert.el
@@ -89,6 +89,8 @@ DICT-ENTRIES are additional dictionary values to add."
;; for this insertion step.
))
+(eieio-declare-slots (point :allocation :class))
+
(defun srecode-insert-fcn (template dictionary &optional stream skipresolver)
"Insert TEMPLATE using DICTIONARY into STREAM.
Optional SKIPRESOLVER means to avoid refreshing the tag list,
@@ -134,13 +136,13 @@ has set everything up already."
)
(srecode-insert-method template dictionary))
;; Handle specialization of the POINT inserter.
- (when (and (bufferp standard-output)
- (slot-boundp 'srecode-template-inserter-point 'point)
- )
- (set-buffer standard-output)
- (setq end-mark (point-marker))
- (goto-char (oref-default 'srecode-template-inserter-point point)))
- (oset-default 'srecode-template-inserter-point point eieio-unbound)
+ (when (bufferp standard-output)
+ (let ((point (oref-default 'srecode-template-inserter-point point)))
+ (when point
+ (set-buffer standard-output)
+ (setq end-mark (point-marker))
+ (goto-char point))))
+ (oset-default 'srecode-template-inserter-point point nil)
;; Return the end-mark.
(or end-mark (point)))
@@ -733,6 +735,7 @@ DEPTH.")
"The character code used to identify inserters of this style.")
(point :type (or null marker)
:allocation :class
+ :initform nil
:documentation
"Record the value of (point) in this class slot.
It is the responsibility of the inserter algorithm to clear this
diff --git a/lisp/cedet/srecode/java.el b/lisp/cedet/srecode/java.el
index 768d48a7c5b..0f0a80ee299 100644
--- a/lisp/cedet/srecode/java.el
+++ b/lisp/cedet/srecode/java.el
@@ -1,4 +1,4 @@
-;;; srecode/java.el --- Srecode Java support
+;;; srecode/java.el --- Srecode Java support -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el
index a94db0bb8d9..254b15e6e04 100644
--- a/lisp/cedet/srecode/map.el
+++ b/lisp/cedet/srecode/map.el
@@ -1,4 +1,4 @@
-;;; srecode/map.el --- Manage a template file map
+;;; srecode/map.el --- Manage a template file map -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -245,7 +245,7 @@ Optional argument RESET forces a reset of the current map."
(princ "\n")
))
-(defun srecode-map-file-still-valid-p (filename map)
+(defun srecode-map-file-still-valid-p (filename _map)
"Return t if FILENAME should be in MAP still."
(let ((valid nil))
(and (file-exists-p filename)
@@ -407,7 +407,7 @@ Return non-nil if the map changed."
"Global load path for SRecode template files."
:group 'srecode
:type '(repeat file)
- :set 'srecode-map-load-path-set)
+ :set #'srecode-map-load-path-set)
(provide 'srecode/map)
diff --git a/lisp/cedet/srecode/mode.el b/lisp/cedet/srecode/mode.el
index 159dc7a999b..9b1c8491a12 100644
--- a/lisp/cedet/srecode/mode.el
+++ b/lisp/cedet/srecode/mode.el
@@ -1,4 +1,4 @@
-;;; srecode/mode.el --- Minor mode for managing and using SRecode templates
+;;; srecode/mode.el --- Minor mode for managing and using SRecode templates -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -54,14 +54,14 @@
(defvar srecode-prefix-map
(let ((km (make-sparse-keymap)))
;; Basic template codes
- (define-key km "/" 'srecode-insert)
- (define-key km [insert] 'srecode-insert)
- (define-key km "." 'srecode-insert-again)
- (define-key km "E" 'srecode-edit)
+ (define-key km "/" #'srecode-insert)
+ (define-key km [insert] #'srecode-insert)
+ (define-key km "." #'srecode-insert-again)
+ (define-key km "E" #'srecode-edit)
;; Template indirect binding
(let ((k ?a))
(while (<= k ?z)
- (define-key km (format "%c" k) 'srecode-bind-insert)
+ (define-key km (format "%c" k) #'srecode-bind-insert)
(setq k (1+ k))))
km)
"Keymap used behind the srecode prefix key in srecode minor mode.")
@@ -141,16 +141,17 @@ non-nil if the minor mode is enabled.
;; this mode first.
(if srecode-minor-mode
(if (not (apply
- 'append
+ #'append
(mapcar (lambda (map)
(srecode-map-entries-for-mode map major-mode))
(srecode-get-maps))))
(setq srecode-minor-mode nil)
;; Else, we have success, do stuff
- (add-hook 'cedet-m3-menu-do-hooks 'srecode-m3-items nil t)
- )
- (remove-hook 'cedet-m3-menu-do-hooks 'srecode-m3-items t)
- )
+ ;; FIXME: Where are `cedet-m3-menu-do-hooks' nor `srecode-m3-items'?
+ (when (fboundp 'srecode-m3-items)
+ (add-hook 'cedet-m3-menu-do-hooks #'srecode-m3-items nil t)))
+ (when (fboundp 'srecode-m3-items)
+ (remove-hook 'cedet-m3-menu-do-hooks #'srecode-m3-items t)))
;; Run hooks if we are turning this on.
(when srecode-minor-mode
(run-hooks 'srecode-minor-mode-hook))
@@ -170,7 +171,7 @@ non-nil if the minor mode is enabled.
;;; Menu Filters
;;
-(defun srecode-minor-mode-templates-menu (menu-def)
+(defun srecode-minor-mode-templates-menu (_menu-def)
"Create a menu item of cascading filters active for this mode.
MENU-DEF is the menu to bind this into."
;; Doing this SEGVs Emacs on windows.
@@ -223,13 +224,11 @@ MENU-DEF is the menu to bind this into."
(if bind
(concat name " (" bind ")")
name)
- `(lambda () (interactive)
- (srecode-insert (concat ,ctxt ":" ,name)))
+ (lambda () (interactive)
+ (srecode-insert (concat ctxt ":" name)))
t)))
- (setcdr ctxtcons (cons
- new
- (cdr ctxtcons)))))
+ (push new (cdr ctxtcons))))
(setq ltab (cdr ltab))))
(setq subtab (cdr subtab)))
@@ -246,7 +245,7 @@ MENU-DEF is the menu to bind this into."
(defvar srecode-minor-mode-generators nil
"List of code generators to be displayed in the srecoder menu.")
-(defun srecode-minor-mode-generate-menu (menu-def)
+(defun srecode-minor-mode-generate-menu (_menu-def)
"Create a menu item of cascading filters active for this mode.
MENU-DEF is the menu to bind this into."
;; Doing this SEGVs Emacs on windows.
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index bbe1e5e469c..71579158494 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -1,4 +1,4 @@
-;;; srecode/srt-mode.el --- Major mode for writing screcode macros
+;;; srecode/srt-mode.el --- Major mode for writing screcode macros -*- lexical-binding: t; -*-
;; Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc.
@@ -181,9 +181,9 @@ we can tell font lock about them.")
(defvar srecode-template-mode-map
(let ((km (make-sparse-keymap)))
- (define-key km "\C-c\C-c" 'srecode-compile-templates)
- (define-key km "\C-c\C-m" 'srecode-macro-help)
- (define-key km "/" 'srecode-self-insert-complete-end-macro)
+ (define-key km "\C-c\C-c" #'srecode-compile-templates)
+ (define-key km "\C-c\C-m" #'srecode-macro-help)
+ (define-key km "/" #'srecode-self-insert-complete-end-macro)
km)
"Keymap used in srecode mode.")
@@ -205,7 +205,7 @@ we can tell font lock about them.")
((?_ . "w") (?- . "w")))))
;;;###autoload
-(defalias 'srt-mode 'srecode-template-mode)
+(defalias 'srt-mode #'srecode-template-mode)
;;; Template Commands
;;
@@ -436,7 +436,7 @@ Moves to the end of one named section."
(when point (goto-char (point)))
(let* ((tag (semantic-current-tag))
(args (semantic-tag-function-arguments tag))
- (argsym (mapcar 'intern args))
+ (argsym (mapcar #'intern args))
(argvars nil)
;; Create a temporary dictionary in which the
;; arguments can be resolved so we can extract
@@ -475,7 +475,7 @@ section or ? for an ask variable."
(ee (regexp-quote (srecode-template-get-escape-end)))
(start (point))
(macrostart nil)
- (raw nil)
+ ;; (raw nil)
)
(when (and tag (semantic-tag-of-class-p tag 'function)
(srecode-in-macro-p point)
@@ -627,7 +627,7 @@ section or ? for an ask variable."
context-return)))
(define-mode-local-override semantic-analyze-possible-completions
- srecode-template-mode (context &rest flags)
+ 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))))
diff --git a/lisp/cedet/srecode/srt.el b/lisp/cedet/srecode/srt.el
index e222997708b..161b5105b51 100644
--- a/lisp/cedet/srecode/srt.el
+++ b/lisp/cedet/srecode/srt.el
@@ -1,4 +1,4 @@
-;;; srecode/srt.el --- argument handlers for SRT files
+;;; srecode/srt.el --- argument handlers for SRT files -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -43,7 +43,7 @@ DEFAULT is the default if RET is hit."
(currfcn (semantic-current-tag))
)
(srecode-resolve-argument-list
- (mapcar 'read
+ (mapcar #'read
(semantic-tag-get-attribute currfcn :arguments))
newdict)
@@ -56,7 +56,7 @@ DEFAULT is the default if RET is hit."
(defvar srecode-read-major-mode-history nil
"History for `srecode-read-variable-name'.")
-(defun srecode-read-major-mode-name (prompt &optional initial hist default)
+(defun srecode-read-major-mode-name (prompt &optional initial hist _default)
"Read in the name of a desired `major-mode'.
PROMPT is the prompt to use.
INITIAL is the initial string.
@@ -64,7 +64,7 @@ HIST is the history value, otherwise `srecode-read-variable-name-history'
is used.
DEFAULT is the default if RET is hit."
(completing-read prompt obarray
- (lambda (s) (string-match "-mode$" (symbol-name s)))
+ (lambda (s) (string-match "-mode\\'" (symbol-name s)))
nil initial (or hist 'srecode-read-major-mode-history))
)
diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el
index 60a466f89d9..7ce5cc73b61 100644
--- a/lisp/cedet/srecode/table.el
+++ b/lisp/cedet/srecode/table.el
@@ -1,4 +1,4 @@
-;;; srecode/table.el --- Tables of Semantic Recoders
+;;; srecode/table.el --- Tables of Semantic Recoders -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
@@ -169,7 +169,7 @@ calculate all inherited templates from parent modes."
:modetables nil
:tables nil)))
;; Save this new mode table in that mode's variable.
- (eval `(setq-mode-local ,mode srecode-table ,new))
+ (eval `(setq-mode-local ,mode srecode-table ,new) t)
new))))
@@ -184,7 +184,7 @@ INIT are the initialization parameters for the new template table."
(let* ((mt (srecode-make-mode-table mode))
(old (srecode-mode-table-find mt file))
(attr (file-attributes file))
- (new (apply 'srecode-template-table
+ (new (apply #'srecode-template-table
(file-name-nondirectory file)
:file file
:filesize (file-attribute-size attr)
diff --git a/lisp/cedet/srecode/template.el b/lisp/cedet/srecode/template.el
index e9e5115128f..1f6f0d345da 100644
--- a/lisp/cedet/srecode/template.el
+++ b/lisp/cedet/srecode/template.el
@@ -1,4 +1,4 @@
-;;; srecode/template.el --- SRecoder template language parser support.
+;;; srecode/template.el --- SRecoder template language parser support. -*- lexical-binding: t; -*-
;; Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc.
@@ -49,11 +49,11 @@
(setq
;; Lexical Analysis
- semantic-lex-analyzer 'wisent-srecode-template-lexer
+ semantic-lex-analyzer #'wisent-srecode-template-lexer
;; Parsing
;; Environment
- semantic-imenu-summary-function 'semantic-format-tag-name
- imenu-create-index-function 'semantic-create-imenu-index
+ semantic-imenu-summary-function #'semantic-format-tag-name
+ imenu-create-index-function #'semantic-create-imenu-index
semantic-command-separation-character "\n"
semantic-lex-comment-regex ";;"
;; Speedbar
diff --git a/lisp/cedet/srecode/texi.el b/lisp/cedet/srecode/texi.el
index 892ae4e2e31..1312a55a898 100644
--- a/lisp/cedet/srecode/texi.el
+++ b/lisp/cedet/srecode/texi.el
@@ -1,4 +1,4 @@
-;;; srecode/texi.el --- Srecode texinfo support.
+;;; srecode/texi.el --- Srecode texinfo support. -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -224,7 +224,7 @@ Takes a few very generic guesses as to what the formatting is."
;; Return our modified doc string.
docstring))
-(defun srecode-texi-massage-to-texinfo (tag buffer string)
+(defun srecode-texi-massage-to-texinfo (_tag buffer string)
"Massage TAG's documentation from BUFFER as STRING.
This is to take advantage of TeXinfo's markup symbols."
(save-excursion