aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2021-02-12 16:08:01 -0500
committerStefan Monnier2021-02-12 16:08:01 -0500
commitf8dbefbaa59bb17dd4a2dfa4d9ff560c46785792 (patch)
tree914e75a52a9af98ca11aaa55e4d9ff1b4f7f58d5
parent9518926220943d5c405e03d7352343341e07ba83 (diff)
downloademacs-f8dbefbaa59bb17dd4a2dfa4d9ff560c46785792.tar.gz
emacs-f8dbefbaa59bb17dd4a2dfa4d9ff560c46785792.zip
Use `declare` instead of `def-edebug-spec` in most places
* lisp/speedbar.el: Use lexical-binding. (speedbar-with-writable): Use `declare`. * lisp/subr.el (def-edebug-spec): Use `declare`. * lisp/cedet/ede/base.el: Use lexical-binding. (ede-with-projectfile): Use `declare`. (recentf-exclude): Declare var. * lisp/cedet/ede/pmake.el: Use lexical-binding. (ede-pmake-insert-variable-shared, ede-pmake-insert-variable-once): Use `declare`. * lisp/cedet/ede/proj-comp.el: Use lexical-binding. (ede-compiler-begin-unique, ede-compiler-only-once) (ede-linker-begin-unique, ede-linker-only-once): Use `declare`. * lisp/cedet/semantic/ctxt.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-context) (semantic-with-buffer-narrowed-to-command): Use `declare`. (semantic--progress-reporter): Declare var. (semantic-ctxt-end-of-symbol-default): Remove unused var `fieldsep`. * lisp/cedet/semantic/lex-spp.el: Use lexical-binding. (define-lex-spp-macro-declaration-analyzer) (define-lex-spp-include-analyzer, semantic-lex-with-macro-used) (define-lex-spp-macro-undeclaration-analyzer): Use `declare`. (semantic-lex-spp-symbol-remove): Rename arg to avoid colliding with dynamic variable `obarray`. (semantic-lex-spp-symbol-pop): Remove unused var `oldvalue`. (semantic-lex-spp-lex-text-string): Remove unused var `analyzer`. * lisp/cedet/semantic/lex.el (define-lex) (semantic-lex-unterminated-syntax-protection, define-lex-analyzer) (define-lex-regex-analyzer, define-lex-block-analyzer) (semantic-lex-catch-errors): Use `declare`. * lisp/cedet/semantic/tag.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-current-tag) (semantic-with-buffer-narrowed-to-tag): Use `declare`. * lisp/cedet/semantic/wisent.el: Use lexical-binding. (define-wisent-lexer): Use `declare`. * lisp/emacs-lisp/cl-lib.el (cl-pushnew): The arg to :test can be any form not just function form. * lisp/org/ob-comint.el (org-babel-comint-in-buffer) (org-babel-comint-with-output): Use `declare`. * lisp/org/ob-core.el (org-babel-map-src-blocks): Use `declare`. (org-babel-result-cond): Simplify edebug spec. * lisp/org/org-clock.el (org-with-clock-position, org-with-clock): * lisp/org/org-agenda.el (org-agenda-with-point-at-orig-entry): * lisp/org/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`. * lisp/textmodes/rst.el (push): Remove redundant edebug spec. * lisp/vc/pcvs-parse.el: Use lexical-binding. (cvs-parse-buffer): Rename arg to avoid dynbound conflict. (cvs-or): Use `declare`.
-rw-r--r--lisp/cedet/ede/base.el29
-rw-r--r--lisp/cedet/ede/pmake.el22
-rw-r--r--lisp/cedet/ede/proj-comp.el35
-rw-r--r--lisp/cedet/semantic/ctxt.el24
-rw-r--r--lisp/cedet/semantic/lex-spp.el55
-rw-r--r--lisp/cedet/semantic/lex.el38
-rw-r--r--lisp/cedet/semantic/tag.el14
-rw-r--r--lisp/cedet/semantic/wisent.el15
-rw-r--r--lisp/emacs-lisp/cl-lib.el2
-rw-r--r--lisp/eshell/esh-var.el2
-rw-r--r--lisp/org/ob-comint.el6
-rw-r--r--lisp/org/ob-core.el17
-rw-r--r--lisp/org/ob-tangle.el3
-rw-r--r--lisp/org/org-agenda.el2
-rw-r--r--lisp/org/org-clock.el6
-rw-r--r--lisp/org/org-pcomplete.el11
-rw-r--r--lisp/pcmpl-gnu.el8
-rw-r--r--lisp/pcmpl-linux.el6
-rw-r--r--lisp/pcmpl-unix.el2
-rw-r--r--lisp/pcmpl-x.el3
-rw-r--r--lisp/shell.el2
-rw-r--r--lisp/speedbar.el9
-rw-r--r--lisp/subr.el1
-rw-r--r--lisp/textmodes/rst.el4
-rw-r--r--lisp/vc/pcvs-parse.el15
25 files changed, 111 insertions, 220 deletions
diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el
index 810d6ef3bd4..3fcc023e0c6 100644
--- a/lisp/cedet/ede/base.el
+++ b/lisp/cedet/ede/base.el
@@ -1,4 +1,4 @@
1;;; ede/base.el --- Baseclasses for EDE. 1;;; ede/base.el --- Baseclasses for EDE -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2010-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
4 4
@@ -288,7 +288,7 @@ All specific project types must derive from this project."
288;; 288;;
289(defmacro ede-with-projectfile (obj &rest forms) 289(defmacro ede-with-projectfile (obj &rest forms)
290 "For the project in which OBJ resides, execute FORMS." 290 "For the project in which OBJ resides, execute FORMS."
291 (declare (indent 1)) 291 (declare (indent 1) (debug t))
292 (unless (symbolp obj) 292 (unless (symbolp obj)
293 (message "Beware! ede-with-projectfile's first arg is copied: %S" obj)) 293 (message "Beware! ede-with-projectfile's first arg is copied: %S" obj))
294 `(let* ((pf (if (obj-of-class-p ,obj 'ede-target) 294 `(let* ((pf (if (obj-of-class-p ,obj 'ede-target)
@@ -317,13 +317,15 @@ If set to nil, then the cache is not saved."
317(defvar ede-project-cache-files nil 317(defvar ede-project-cache-files nil
318 "List of project files EDE has seen before.") 318 "List of project files EDE has seen before.")
319 319
320(defvar recentf-exclude)
321
320(defun ede-save-cache () 322(defun ede-save-cache ()
321 "Save a cache of EDE objects that Emacs has seen before." 323 "Save a cache of EDE objects that Emacs has seen before."
322 (interactive) 324 (interactive)
323 (when ede-project-placeholder-cache-file 325 (when ede-project-placeholder-cache-file
324 (let ((p ede-projects) 326 (let ((p ede-projects)
325 (c ede-project-cache-files) 327 (c ede-project-cache-files)
326 (recentf-exclude '( (lambda (f) t) )) 328 (recentf-exclude `( ,(lambda (_) t) ))
327 ) 329 )
328 (condition-case nil 330 (condition-case nil
329 (progn 331 (progn
@@ -461,7 +463,7 @@ Not all buffers need headers, so return nil if no applicable."
461 (ede-buffer-header-file ede-object (current-buffer)) 463 (ede-buffer-header-file ede-object (current-buffer))
462 nil)) 464 nil))
463 465
464(cl-defmethod ede-buffer-header-file ((this ede-project) buffer) 466(cl-defmethod ede-buffer-header-file ((_this ede-project) _buffer)
465 "Return nil, projects don't have header files." 467 "Return nil, projects don't have header files."
466 nil) 468 nil)
467 469
@@ -487,12 +489,12 @@ Some projects may have multiple documentation files, so return a list."
487 (ede-buffer-documentation-files ede-object (current-buffer)) 489 (ede-buffer-documentation-files ede-object (current-buffer))
488 nil)) 490 nil))
489 491
490(cl-defmethod ede-buffer-documentation-files ((this ede-project) buffer) 492(cl-defmethod ede-buffer-documentation-files ((this ede-project) _buffer)
491 "Return all documentation in project THIS based on BUFFER." 493 "Return all documentation in project THIS based on BUFFER."
492 ;; Find the info node. 494 ;; Find the info node.
493 (ede-documentation this)) 495 (ede-documentation this))
494 496
495(cl-defmethod ede-buffer-documentation-files ((this ede-target) buffer) 497(cl-defmethod ede-buffer-documentation-files ((_this ede-target) buffer)
496 "Check for some documentation files for THIS. 498 "Check for some documentation files for THIS.
497Also do a quick check to see if there is a Documentation tag in this BUFFER." 499Also do a quick check to see if there is a Documentation tag in this BUFFER."
498 (with-current-buffer buffer 500 (with-current-buffer buffer
@@ -518,7 +520,7 @@ files in the project."
518 proj (cdr proj))) 520 proj (cdr proj)))
519 found)) 521 found))
520 522
521(cl-defmethod ede-documentation ((this ede-target)) 523(cl-defmethod ede-documentation ((_this ede-target))
522 "Return a list of files that provide documentation. 524 "Return a list of files that provide documentation.
523Documentation is not for object THIS, but is provided by THIS for other 525Documentation is not for object THIS, but is provided by THIS for other
524files in the project." 526files in the project."
@@ -529,7 +531,7 @@ files in the project."
529 (ede-html-documentation (ede-toplevel)) 531 (ede-html-documentation (ede-toplevel))
530 ) 532 )
531 533
532(cl-defmethod ede-html-documentation ((this ede-project)) 534(cl-defmethod ede-html-documentation ((_this ede-project))
533 "Return a list of HTML files provided by project THIS." 535 "Return a list of HTML files provided by project THIS."
534 536
535 ) 537 )
@@ -636,18 +638,7 @@ PROJECT-FILE-NAME is a name of project file (short name, like `pom.xml', etc."
636 (oset this directory (file-name-directory (oref this file)))) 638 (oset this directory (file-name-directory (oref this file))))
637 ) 639 )
638 640
639
640
641 641
642;;; Hooks & Autoloads
643;;
644;; These let us watch various activities, and respond appropriately.
645
646;; (add-hook 'edebug-setup-hook
647;; (lambda ()
648;; (def-edebug-spec ede-with-projectfile
649;; (form def-body))))
650
651(provide 'ede/base) 642(provide 'ede/base)
652 643
653;; Local variables: 644;; Local variables:
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el
index 4c948df4102..e1fe85659f8 100644
--- a/lisp/cedet/ede/pmake.el
+++ b/lisp/cedet/ede/pmake.el
@@ -1,4 +1,4 @@
1;;; ede-pmake.el --- EDE Generic Project Makefile code generator. 1;;; ede-pmake.el --- EDE Generic Project Makefile code generator -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2005, 2007-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2005, 2007-2021 Free Software Foundation, Inc.
4 4
@@ -241,6 +241,7 @@ MFILENAME is the makefile to generate."
241(defmacro ede-pmake-insert-variable-shared (varname &rest body) 241(defmacro ede-pmake-insert-variable-shared (varname &rest body)
242 "Add VARNAME into the current Makefile. 242 "Add VARNAME into the current Makefile.
243Execute BODY in a location where a value can be placed." 243Execute BODY in a location where a value can be placed."
244 (declare (debug t) (indent 1))
244 `(let ((addcr t) (v ,varname)) 245 `(let ((addcr t) (v ,varname))
245 (if (save-excursion 246 (if (save-excursion
246 (goto-char (point-max)) 247 (goto-char (point-max))
@@ -258,11 +259,11 @@ Execute BODY in a location where a value can be placed."
258 ,@body 259 ,@body
259 (if addcr (insert "\n")) 260 (if addcr (insert "\n"))
260 (goto-char (point-max)))) 261 (goto-char (point-max))))
261(put 'ede-pmake-insert-variable-shared 'lisp-indent-function 1)
262 262
263(defmacro ede-pmake-insert-variable-once (varname &rest body) 263(defmacro ede-pmake-insert-variable-once (varname &rest body)
264 "Add VARNAME into the current Makefile if it doesn't exist. 264 "Add VARNAME into the current Makefile if it doesn't exist.
265Execute BODY in a location where a value can be placed." 265Execute BODY in a location where a value can be placed."
266 (declare (debug t) (indent 1))
266 `(let ((addcr t) (v ,varname)) 267 `(let ((addcr t) (v ,varname))
267 (unless 268 (unless
268 (save-excursion 269 (save-excursion
@@ -271,7 +272,6 @@ Execute BODY in a location where a value can be placed."
271 ,@body 272 ,@body
272 (when addcr (insert "\n")) 273 (when addcr (insert "\n"))
273 (goto-char (point-max))))) 274 (goto-char (point-max)))))
274(put 'ede-pmake-insert-variable-once 'lisp-indent-function 1)
275 275
276;;; SOURCE VARIABLE NAME CONSTRUCTION 276;;; SOURCE VARIABLE NAME CONSTRUCTION
277 277
@@ -289,7 +289,7 @@ Change . to _ in the variable name."
289 289
290;;; DEPENDENCY FILE GENERATOR LISTS 290;;; DEPENDENCY FILE GENERATOR LISTS
291;; 291;;
292(cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target)) 292(cl-defmethod ede-proj-makefile-dependency-files ((_this ede-proj-target))
293 "Return a list of source files to convert to dependencies. 293 "Return a list of source files to convert to dependencies.
294Argument THIS is the target to get sources from." 294Argument THIS is the target to get sources from."
295 nil) 295 nil)
@@ -302,7 +302,7 @@ Argument THIS is the target to get sources from."
302Use CONFIGURATION as the current configuration to query." 302Use CONFIGURATION as the current configuration to query."
303 (cdr (assoc configuration (oref this configuration-variables)))) 303 (cdr (assoc configuration (oref this configuration-variables))))
304 304
305(cl-defmethod ede-proj-makefile-insert-variables-new ((this ede-proj-project)) 305(cl-defmethod ede-proj-makefile-insert-variables-new ((_this ede-proj-project))
306 "Insert variables needed by target THIS. 306 "Insert variables needed by target THIS.
307 307
308NOTE: Not yet in use! This is part of an SRecode conversion of 308NOTE: Not yet in use! This is part of an SRecode conversion of
@@ -420,7 +420,7 @@ Use CONFIGURATION as the current configuration to query."
420 (cdr (assoc configuration (oref this configuration-variables)))) 420 (cdr (assoc configuration (oref this configuration-variables))))
421 421
422(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile) 422(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile)
423 &optional moresource) 423 &optional _moresource)
424 "Insert variables needed by target THIS. 424 "Insert variables needed by target THIS.
425Optional argument MORESOURCE is a list of additional sources to add to the 425Optional argument MORESOURCE is a list of additional sources to add to the
426sources variable." 426sources variable."
@@ -449,12 +449,12 @@ sources variable."
449 (ede-proj-makefile-insert-variables linker))))) 449 (ede-proj-makefile-insert-variables linker)))))
450 450
451(cl-defmethod ede-proj-makefile-insert-automake-pre-variables 451(cl-defmethod ede-proj-makefile-insert-automake-pre-variables
452 ((this ede-proj-target)) 452 ((_this ede-proj-target))
453 "Insert variables needed by target THIS in Makefile.am before SOURCES." 453 "Insert variables needed by target THIS in Makefile.am before SOURCES."
454 nil) 454 nil)
455 455
456(cl-defmethod ede-proj-makefile-insert-automake-post-variables 456(cl-defmethod ede-proj-makefile-insert-automake-post-variables
457 ((this ede-proj-target)) 457 ((_this ede-proj-target))
458 "Insert variables needed by target THIS in Makefile.am after SOURCES." 458 "Insert variables needed by target THIS in Makefile.am after SOURCES."
459 nil) 459 nil)
460 460
@@ -511,7 +511,7 @@ Argument THIS is the project that should insert stuff."
511 (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets)) 511 (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets))
512 ) 512 )
513 513
514(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target)) 514(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((_this ede-proj-target))
515 "Insert any symbols that the DIST rule should depend on. 515 "Insert any symbols that the DIST rule should depend on.
516Argument THIS is the target that should insert stuff." 516Argument THIS is the target that should insert stuff."
517 nil) 517 nil)
@@ -530,7 +530,7 @@ Argument THIS is the target that should insert stuff."
530 (insert " " (ede-subproject-relative-path sproj)) 530 (insert " " (ede-subproject-relative-path sproj))
531 )))) 531 ))))
532 532
533(cl-defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project)) 533(cl-defmethod ede-proj-makefile-automake-insert-extradist ((_this ede-proj-project))
534 "Insert the EXTRADIST variable entries needed for Automake and EDE." 534 "Insert the EXTRADIST variable entries needed for Automake and EDE."
535 (proj-comp-insert-variable-once "EXTRA_DIST" (insert "Project.ede"))) 535 (proj-comp-insert-variable-once "EXTRA_DIST" (insert "Project.ede")))
536 536
@@ -602,7 +602,7 @@ Argument THIS is the target that should insert stuff."
602 "\t@false\n\n" 602 "\t@false\n\n"
603 "\n\n# End of Makefile\n"))) 603 "\n\n# End of Makefile\n")))
604 604
605(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target)) 605(cl-defmethod ede-proj-makefile-insert-rules ((_this ede-proj-target))
606 "Insert rules needed by THIS target." 606 "Insert rules needed by THIS target."
607 nil) 607 nil)
608 608
diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el
index 26aa66873a3..ba52784a7a8 100644
--- a/lisp/cedet/ede/proj-comp.el
+++ b/lisp/cedet/ede/proj-comp.el
@@ -1,4 +1,4 @@
1;;; ede/proj-comp.el --- EDE Generic Project compiler/rule driver 1;;; ede/proj-comp.el --- EDE Generic Project compiler/rule driver -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1999-2001, 2004-2005, 2007, 2009-2021 Free Software 3;; Copyright (C) 1999-2001, 2004-2005, 2007, 2009-2021 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
@@ -172,12 +172,12 @@ Adds this rule to a .PHONY list."))
172This is used when creating a Makefile to prevent duplicate variables and 172This is used when creating a Makefile to prevent duplicate variables and
173rules from being created.") 173rules from being created.")
174 174
175(cl-defmethod initialize-instance :after ((this ede-compiler) &rest fields) 175(cl-defmethod initialize-instance :after ((this ede-compiler) &rest _fields)
176 "Make sure that all ede compiler objects are cached in 176 "Make sure that all ede compiler objects are cached in
177`ede-compiler-list'." 177`ede-compiler-list'."
178 (add-to-list 'ede-compiler-list this)) 178 (add-to-list 'ede-compiler-list this))
179 179
180(cl-defmethod initialize-instance :after ((this ede-linker) &rest fields) 180(cl-defmethod initialize-instance :after ((this ede-linker) &rest _fields)
181 "Make sure that all ede compiler objects are cached in 181 "Make sure that all ede compiler objects are cached in
182`ede-linker-list'." 182`ede-linker-list'."
183 (add-to-list 'ede-linker-list this)) 183 (add-to-list 'ede-linker-list this))
@@ -185,11 +185,13 @@ rules from being created.")
185(defmacro ede-compiler-begin-unique (&rest body) 185(defmacro ede-compiler-begin-unique (&rest body)
186 "Execute BODY, making sure that `ede-current-build-list' is maintained. 186 "Execute BODY, making sure that `ede-current-build-list' is maintained.
187This will prevent rules from creating duplicate variables or rules." 187This will prevent rules from creating duplicate variables or rules."
188 (declare (indent 0) (debug t))
188 `(let ((ede-current-build-list nil)) 189 `(let ((ede-current-build-list nil))
189 ,@body)) 190 ,@body))
190 191
191(defmacro ede-compiler-only-once (object &rest body) 192(defmacro ede-compiler-only-once (object &rest body)
192 "Using OBJECT, execute BODY only once per Makefile generation." 193 "Using OBJECT, execute BODY only once per Makefile generation."
194 (declare (indent 1) (debug t))
193 `(if (not (member ,object ede-current-build-list)) 195 `(if (not (member ,object ede-current-build-list))
194 (progn 196 (progn
195 (add-to-list 'ede-current-build-list ,object) 197 (add-to-list 'ede-current-build-list ,object)
@@ -198,25 +200,18 @@ This will prevent rules from creating duplicate variables or rules."
198(defmacro ede-linker-begin-unique (&rest body) 200(defmacro ede-linker-begin-unique (&rest body)
199 "Execute BODY, making sure that `ede-current-build-list' is maintained. 201 "Execute BODY, making sure that `ede-current-build-list' is maintained.
200This will prevent rules from creating duplicate variables or rules." 202This will prevent rules from creating duplicate variables or rules."
203 (declare (indent 0) (debug t))
201 `(let ((ede-current-build-list nil)) 204 `(let ((ede-current-build-list nil))
202 ,@body)) 205 ,@body))
203 206
204(defmacro ede-linker-only-once (object &rest body) 207(defmacro ede-linker-only-once (object &rest body)
205 "Using OBJECT, execute BODY only once per Makefile generation." 208 "Using OBJECT, execute BODY only once per Makefile generation."
209 (declare (indent 1) (debug t))
206 `(if (not (member ,object ede-current-build-list)) 210 `(if (not (member ,object ede-current-build-list))
207 (progn 211 (progn
208 (add-to-list 'ede-current-build-list ,object) 212 (add-to-list 'ede-current-build-list ,object)
209 ,@body))) 213 ,@body)))
210 214
211(add-hook 'edebug-setup-hook
212 (lambda ()
213 (def-edebug-spec ede-compiler-begin-unique def-body)
214 (def-edebug-spec ede-compiler-only-once (form def-body))
215 (def-edebug-spec ede-linker-begin-unique def-body)
216 (def-edebug-spec ede-linker-only-once (form def-body))
217 (def-edebug-spec ede-pmake-insert-variable-shared (form def-body))
218 ))
219
220;;; Queries 215;;; Queries
221(defun ede-proj-find-compiler (compilers sourcetype) 216(defun ede-proj-find-compiler (compilers sourcetype)
222 "Return a compiler from the list COMPILERS that will compile SOURCETYPE." 217 "Return a compiler from the list COMPILERS that will compile SOURCETYPE."
@@ -246,7 +241,7 @@ This will prevent rules from creating duplicate variables or rules."
246 ) 241 )
247 (oref this autoconf))) 242 (oref this autoconf)))
248 243
249(cl-defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) 244(cl-defmethod ede-proj-flush-autoconf ((_this ede-compilation-program))
250 "Flush the configure file (current buffer) to accommodate THIS." 245 "Flush the configure file (current buffer) to accommodate THIS."
251 nil) 246 nil)
252 247
@@ -281,8 +276,8 @@ If this compiler creates code that can be linked together,
281then the object files created by the compiler are considered intermediate." 276then the object files created by the compiler are considered intermediate."
282 (oref this uselinker)) 277 (oref this uselinker))
283 278
284(cl-defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) 279(cl-defmethod ede-compiler-intermediate-object-variable ((_this ede-compiler)
285 targetname) 280 targetname)
286 "Return a string based on THIS representing a make object variable. 281 "Return a string based on THIS representing a make object variable.
287TARGETNAME is the name of the target that these objects belong to." 282TARGETNAME is the name of the target that these objects belong to."
288 (concat targetname "_OBJ")) 283 (concat targetname "_OBJ"))
@@ -343,16 +338,6 @@ compiler it decides to use after inserting in the rule."
343 commands)) 338 commands))
344 (insert "\n"))) 339 (insert "\n")))
345 340
346;;; Some details about our new macro
347;;
348(add-hook 'edebug-setup-hook
349 (lambda ()
350 (def-edebug-spec ede-compiler-begin-unique def-body)))
351(put 'ede-compiler-begin-unique 'lisp-indent-function 0)
352(put 'ede-compiler-only-once 'lisp-indent-function 1)
353(put 'ede-linker-begin-unique 'lisp-indent-function 0)
354(put 'ede-linker-only-once 'lisp-indent-function 1)
355
356(provide 'ede/proj-comp) 341(provide 'ede/proj-comp)
357 342
358;;; ede/proj-comp.el ends here 343;;; ede/proj-comp.el ends here
diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el
index 8d5b5dcdbdf..17ffaeff5e4 100644
--- a/lisp/cedet/semantic/ctxt.el
+++ b/lisp/cedet/semantic/ctxt.el
@@ -1,4 +1,4 @@
1;;; semantic/ctxt.el --- Context calculations for Semantic tools. 1;;; semantic/ctxt.el --- Context calculations for Semantic tools -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1999-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
4 4
@@ -137,18 +137,16 @@ Return non-nil if there is no upper context."
137 137
138(defmacro semantic-with-buffer-narrowed-to-context (&rest body) 138(defmacro semantic-with-buffer-narrowed-to-context (&rest body)
139 "Execute BODY with the buffer narrowed to the current context." 139 "Execute BODY with the buffer narrowed to the current context."
140 (declare (indent 0) (debug t))
140 `(save-restriction 141 `(save-restriction
141 (semantic-narrow-to-context) 142 (semantic-narrow-to-context)
142 ,@body)) 143 ,@body))
143(put 'semantic-with-buffer-narrowed-to-context 'lisp-indent-function 0)
144(add-hook 'edebug-setup-hook
145 (lambda ()
146 (def-edebug-spec semantic-with-buffer-narrowed-to-context
147 (def-body))))
148 144
149;;; Local Variables 145;;; Local Variables
150;; 146;;
151;; 147
148(defvar semantic--progress-reporter)
149
152(define-overloadable-function semantic-get-local-variables (&optional point) 150(define-overloadable-function semantic-get-local-variables (&optional point)
153 "Get the local variables based on POINT's context. 151 "Get the local variables based on POINT's context.
154Local variables are returned in Semantic tag format. 152Local variables are returned in Semantic tag format.
@@ -345,14 +343,10 @@ beginning and end of a command."
345 343
346(defmacro semantic-with-buffer-narrowed-to-command (&rest body) 344(defmacro semantic-with-buffer-narrowed-to-command (&rest body)
347 "Execute BODY with the buffer narrowed to the current command." 345 "Execute BODY with the buffer narrowed to the current command."
346 (declare (indent 0) (debug t))
348 `(save-restriction 347 `(save-restriction
349 (semantic-narrow-to-command) 348 (semantic-narrow-to-command)
350 ,@body)) 349 ,@body))
351(put 'semantic-with-buffer-narrowed-to-command 'lisp-indent-function 0)
352(add-hook 'edebug-setup-hook
353 (lambda ()
354 (def-edebug-spec semantic-with-buffer-narrowed-to-command
355 (def-body))))
356 350
357(define-overloadable-function semantic-ctxt-end-of-symbol (&optional point) 351(define-overloadable-function semantic-ctxt-end-of-symbol (&optional point)
358 "Move point to the end of the current symbol under POINT. 352 "Move point to the end of the current symbol under POINT.
@@ -374,7 +368,7 @@ work on C like languages."
374 ;; NOTE: The [ \n] expression below should used \\s-, but that 368 ;; NOTE: The [ \n] expression below should used \\s-, but that
375 ;; doesn't work in C since \n means end-of-comment, and isn't 369 ;; doesn't work in C since \n means end-of-comment, and isn't
376 ;; really whitespace. 370 ;; really whitespace.
377 (fieldsep (concat "[ \t\n\r]*\\(" fieldsep1 "\\)[ \t\n\r]*\\(\\w\\|\\s_\\)")) 371 ;;(fieldsep (concat "[ \t\n\r]*\\(" fieldsep1 "\\)[ \t\n\r]*\\(\\w\\|\\s_\\)"))
378 (case-fold-search semantic-case-fold) 372 (case-fold-search semantic-case-fold)
379 (continuesearch t) 373 (continuesearch t)
380 (end nil) 374 (end nil)
@@ -655,7 +649,7 @@ POINT defaults to the value of point in current buffer.
655You should override this function in multiple mode buffers to 649You should override this function in multiple mode buffers to
656determine which major mode apply at point.") 650determine which major mode apply at point.")
657 651
658(defun semantic-ctxt-current-mode-default (&optional point) 652(defun semantic-ctxt-current-mode-default (&optional _point)
659 "Return the major mode active at POINT. 653 "Return the major mode active at POINT.
660POINT defaults to the value of point in current buffer. 654POINT defaults to the value of point in current buffer.
661This default implementation returns the current major mode." 655This default implementation returns the current major mode."
@@ -671,7 +665,7 @@ The return value can be a mixed list of either strings (names of
671types that are in scope) or actual tags (type declared locally 665types that are in scope) or actual tags (type declared locally
672that may or may not have a name.)") 666that may or may not have a name.)")
673 667
674(defun semantic-ctxt-scoped-types-default (&optional point) 668(defun semantic-ctxt-scoped-types-default (&optional _point)
675 "Return a list of scoped types by name for the current context at POINT. 669 "Return a list of scoped types by name for the current context at POINT.
676This is very different for various languages, and does nothing unless 670This is very different for various languages, and does nothing unless
677overridden." 671overridden."
diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el
index 408011c6286..5675b9f3e37 100644
--- a/lisp/cedet/semantic/lex-spp.el
+++ b/lisp/cedet/semantic/lex-spp.el
@@ -1,4 +1,4 @@
1;;; semantic/lex-spp.el --- Semantic Lexical Pre-processor 1;;; semantic/lex-spp.el --- Semantic Lexical Pre-processor -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2006-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2021 Free Software Foundation, Inc.
4 4
@@ -106,22 +106,12 @@ added and removed from this symbol table.")
106Pushes NAME into the macro stack. The above stack is checked 106Pushes NAME into the macro stack. The above stack is checked
107by `semantic-lex-spp-symbol' to not return true for any symbol 107by `semantic-lex-spp-symbol' to not return true for any symbol
108currently being expanded." 108currently being expanded."
109 (declare (indent 1) (debug (symbolp def-body)))
109 `(unwind-protect 110 `(unwind-protect
110 (progn 111 (progn
111 (push ,name semantic-lex-spp-expanded-macro-stack) 112 (push ,name semantic-lex-spp-expanded-macro-stack)
112 ,@body) 113 ,@body)
113 (pop semantic-lex-spp-expanded-macro-stack))) 114 (pop semantic-lex-spp-expanded-macro-stack)))
114(put 'semantic-lex-with-macro-used 'lisp-indent-function 1)
115
116(add-hook
117 'edebug-setup-hook
118 #'(lambda ()
119
120 (def-edebug-spec semantic-lex-with-macro-used
121 (symbolp def-body)
122 )
123
124 ))
125 115
126;;; MACRO TABLE UTILS 116;;; MACRO TABLE UTILS
127;; 117;;
@@ -190,7 +180,7 @@ Disable debugging by entering nothing."
190 (setq semantic-lex-spp-debug-symbol nil) 180 (setq semantic-lex-spp-debug-symbol nil)
191 (setq semantic-lex-spp-debug-symbol sym))) 181 (setq semantic-lex-spp-debug-symbol sym)))
192 182
193(defmacro semantic-lex-spp-validate-value (name value) 183(defmacro semantic-lex-spp-validate-value (_name _value)
194 "Validate the NAME and VALUE of a macro before it is set." 184 "Validate the NAME and VALUE of a macro before it is set."
195; `(progn 185; `(progn
196; (when (not (semantic-lex-spp-value-valid-p ,value)) 186; (when (not (semantic-lex-spp-value-valid-p ,value))
@@ -212,12 +202,11 @@ the dynamic map."
212 (semantic-lex-spp-dynamic-map))) 202 (semantic-lex-spp-dynamic-map)))
213 value)) 203 value))
214 204
215(defsubst semantic-lex-spp-symbol-remove (name &optional obarray) 205(defsubst semantic-lex-spp-symbol-remove (name &optional map)
216 "Remove the spp symbol with NAME. 206 "Remove the spp symbol with NAME.
217If optional OBARRAY is non-nil, then use that obarray instead of 207If optional obarray MAP is non-nil, then use that obarray instead of
218the dynamic map." 208the dynamic map."
219 (unintern name (or obarray 209 (unintern name (or map (semantic-lex-spp-dynamic-map))))
220 (semantic-lex-spp-dynamic-map))))
221 210
222(defun semantic-lex-spp-symbol-push (name value) 211(defun semantic-lex-spp-symbol-push (name value)
223 "Push macro NAME with VALUE into the map. 212 "Push macro NAME with VALUE into the map.
@@ -246,7 +235,7 @@ Reverse with `semantic-lex-spp-symbol-pop'."
246 (stack (semantic-lex-spp-dynamic-map-stack)) 235 (stack (semantic-lex-spp-dynamic-map-stack))
247 (mapsym (intern name map)) 236 (mapsym (intern name map))
248 (stacksym (intern name stack)) 237 (stacksym (intern name stack))
249 (oldvalue nil) 238 ;; (oldvalue nil)
250 ) 239 )
251 (if (or (not (boundp stacksym) ) 240 (if (or (not (boundp stacksym) )
252 (= (length (symbol-value stacksym)) 0)) 241 (= (length (symbol-value stacksym)) 0))
@@ -324,7 +313,7 @@ For use with semanticdb restoration of state."
324 ;; Default obarray for below is the dynamic map. 313 ;; Default obarray for below is the dynamic map.
325 (semantic-lex-spp-symbol-set (car e) (cdr e)))) 314 (semantic-lex-spp-symbol-set (car e) (cdr e))))
326 315
327(defun semantic-lex-spp-reset-hook (start end) 316(defun semantic-lex-spp-reset-hook (start _end)
328 "Reset anything needed by SPP for parsing. 317 "Reset anything needed by SPP for parsing.
329In this case, reset the dynamic macro symbol table if 318In this case, reset the dynamic macro symbol table if
330START is (point-min). 319START is (point-min).
@@ -354,7 +343,7 @@ Return non-nil if it matches"
354 (string-match regex value)) 343 (string-match regex value))
355 )) 344 ))
356 345
357(defun semantic-lex-spp-simple-macro-to-macro-stream (val beg end argvalues) 346(defun semantic-lex-spp-simple-macro-to-macro-stream (val beg end _argvalues)
358 "Convert lexical macro contents VAL into a macro expansion stream. 347 "Convert lexical macro contents VAL into a macro expansion stream.
359These are for simple macro expansions that a user may have typed in directly. 348These are for simple macro expansions that a user may have typed in directly.
360As such, we need to analyze the input text, to figure out what kind of real 349As such, we need to analyze the input text, to figure out what kind of real
@@ -819,7 +808,7 @@ ARGVALUES are values for any arg list, or nil."
819;; An analyzer that will push tokens from a macro in place 808;; An analyzer that will push tokens from a macro in place
820;; of the macro symbol. 809;; of the macro symbol.
821;; 810;;
822(defun semantic-lex-spp-analyzer-do-replace (sym val beg end) 811(defun semantic-lex-spp-analyzer-do-replace (_sym val beg end)
823 "Do the lexical replacement for SYM with VAL. 812 "Do the lexical replacement for SYM with VAL.
824Argument BEG and END specify the bounds of SYM in the buffer." 813Argument BEG and END specify the bounds of SYM in the buffer."
825 (if (not val) 814 (if (not val)
@@ -1045,7 +1034,7 @@ and variable state from the current buffer."
1045 (fresh-toks nil) 1034 (fresh-toks nil)
1046 (toks nil) 1035 (toks nil)
1047 (origbuff (current-buffer)) 1036 (origbuff (current-buffer))
1048 (analyzer semantic-lex-analyzer) 1037 ;; (analyzer semantic-lex-analyzer)
1049 (important-vars '(semantic-lex-spp-macro-symbol-obarray 1038 (important-vars '(semantic-lex-spp-macro-symbol-obarray
1050 semantic-lex-spp-project-macro-symbol-obarray 1039 semantic-lex-spp-project-macro-symbol-obarray
1051 semantic-lex-spp-dynamic-macro-symbol-obarray 1040 semantic-lex-spp-dynamic-macro-symbol-obarray
@@ -1176,6 +1165,7 @@ of type `spp-macro-def' is to be created.
1176VALFORM are forms that return the value to be saved for this macro, or nil. 1165VALFORM are forms that return the value to be saved for this macro, or nil.
1177When implementing a macro, you can use `semantic-lex-spp-stream-for-macro' 1166When implementing a macro, you can use `semantic-lex-spp-stream-for-macro'
1178to convert text into a lexical stream for storage in the macro." 1167to convert text into a lexical stream for storage in the macro."
1168 (declare (debug (&define name stringp stringp form def-body)))
1179 (let ((start (make-symbol "start")) 1169 (let ((start (make-symbol "start"))
1180 (end (make-symbol "end")) 1170 (end (make-symbol "end"))
1181 (val (make-symbol "val")) 1171 (val (make-symbol "val"))
@@ -1209,6 +1199,7 @@ REGEXP is a regular expression for the analyzer to match.
1209See `define-lex-regex-analyzer' for more on regexp. 1199See `define-lex-regex-analyzer' for more on regexp.
1210TOKIDX is an index into REGEXP for which a new lexical token 1200TOKIDX is an index into REGEXP for which a new lexical token
1211of type `spp-macro-undef' is to be created." 1201of type `spp-macro-undef' is to be created."
1202 (declare (debug (&define name stringp stringp form)))
1212 (let ((start (make-symbol "start")) 1203 (let ((start (make-symbol "start"))
1213 (end (make-symbol "end"))) 1204 (end (make-symbol "end")))
1214 `(define-lex-regex-analyzer ,name 1205 `(define-lex-regex-analyzer ,name
@@ -1244,7 +1235,7 @@ Note: Not implemented yet."
1244 :group 'semantic 1235 :group 'semantic
1245 :type 'boolean) 1236 :type 'boolean)
1246 1237
1247(defun semantic-lex-spp-merge-header (name) 1238(defun semantic-lex-spp-merge-header (_name)
1248 "Extract and merge any macros from the header with NAME. 1239 "Extract and merge any macros from the header with NAME.
1249Finds the header file belonging to NAME, gets the macros 1240Finds the header file belonging to NAME, gets the macros
1250from that file, and then merge the macros with our current 1241from that file, and then merge the macros with our current
@@ -1269,6 +1260,7 @@ type of include. The return value should be of the form:
1269 (NAME . TYPE) 1260 (NAME . TYPE)
1270where NAME is the name of the include, and TYPE is the type of the include, 1261where NAME is the name of the include, and TYPE is the type of the include,
1271where a valid symbol is `system', or nil." 1262where a valid symbol is `system', or nil."
1263 (declare (debug (&define name stringp stringp form def-body)))
1272 (let ((start (make-symbol "start")) 1264 (let ((start (make-symbol "start"))
1273 (end (make-symbol "end")) 1265 (end (make-symbol "end"))
1274 (val (make-symbol "val")) 1266 (val (make-symbol "val"))
@@ -1369,23 +1361,6 @@ If BUFFER is not provided, use the current buffer."
1369 (princ "\n") 1361 (princ "\n")
1370 )))) 1362 ))))
1371 1363
1372;;; EDEBUG Handlers
1373;;
1374(add-hook
1375 'edebug-setup-hook
1376 #'(lambda ()
1377
1378 (def-edebug-spec define-lex-spp-macro-declaration-analyzer
1379 (&define name stringp stringp form def-body)
1380 )
1381
1382 (def-edebug-spec define-lex-spp-macro-undeclaration-analyzer
1383 (&define name stringp stringp form)
1384 )
1385
1386 (def-edebug-spec define-lex-spp-include-analyzer
1387 (&define name stringp stringp form def-body))))
1388
1389(provide 'semantic/lex-spp) 1364(provide 'semantic/lex-spp)
1390 1365
1391;; Local variables: 1366;; Local variables:
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index ae70d5c730a..b3399aa2e62 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -760,6 +760,7 @@ If two analyzers can match the same text, it is important to order the
760analyzers so that the one you want to match first occurs first. For 760analyzers so that the one you want to match first occurs first. For
761example, it is good to put a number analyzer in front of a symbol 761example, it is good to put a number analyzer in front of a symbol
762analyzer which might mistake a number for a symbol." 762analyzer which might mistake a number for a symbol."
763 (declare (debug (&define name stringp (&rest symbolp))))
763 `(defun ,name (start end &optional depth length) 764 `(defun ,name (start end &optional depth length)
764 ,(concat doc "\nSee `semantic-lex' for more information.") 765 ,(concat doc "\nSee `semantic-lex' for more information.")
765 ;; Make sure the state of block parsing starts over. 766 ;; Make sure the state of block parsing starts over.
@@ -1064,14 +1065,13 @@ the desired syntax, and a position returned.
1064If `debug-on-error' is set, errors are not caught, so that you can 1065If `debug-on-error' is set, errors are not caught, so that you can
1065debug them. 1066debug them.
1066Avoid using a large FORMS since it is duplicated." 1067Avoid using a large FORMS since it is duplicated."
1068 (declare (indent 1) (debug t))
1067 `(if (and debug-on-error semantic-lex-debug-analyzers) 1069 `(if (and debug-on-error semantic-lex-debug-analyzers)
1068 (progn ,@forms) 1070 (progn ,@forms)
1069 (condition-case nil 1071 (condition-case nil
1070 (progn ,@forms) 1072 (progn ,@forms)
1071 (error 1073 (error
1072 (semantic-lex-unterminated-syntax-detected ,syntax))))) 1074 (semantic-lex-unterminated-syntax-detected ,syntax)))))
1073(put 'semantic-lex-unterminated-syntax-protection
1074 'lisp-indent-function 1)
1075 1075
1076(defmacro define-lex-analyzer (name doc condition &rest forms) 1076(defmacro define-lex-analyzer (name doc condition &rest forms)
1077 "Create a single lexical analyzer NAME with DOC. 1077 "Create a single lexical analyzer NAME with DOC.
@@ -1096,6 +1096,7 @@ Proper action in FORMS is to move the value of `semantic-lex-end-point' to
1096after the location of the analyzed entry, and to add any discovered tokens 1096after the location of the analyzed entry, and to add any discovered tokens
1097at the beginning of `semantic-lex-token-stream'. 1097at the beginning of `semantic-lex-token-stream'.
1098This can be done by using `semantic-lex-push-token'." 1098This can be done by using `semantic-lex-push-token'."
1099 (declare (debug (&define name stringp form def-body)))
1099 `(eval-and-compile 1100 `(eval-and-compile
1100 (defvar ,name nil ,doc) 1101 (defvar ,name nil ,doc)
1101 (defun ,name nil) 1102 (defun ,name nil)
@@ -1122,6 +1123,7 @@ This can be done by using `semantic-lex-push-token'."
1122 "Create a lexical analyzer with NAME and DOC that will match REGEXP. 1123 "Create a lexical analyzer with NAME and DOC that will match REGEXP.
1123FORMS are evaluated upon a successful match. 1124FORMS are evaluated upon a successful match.
1124See `define-lex-analyzer' for more about analyzers." 1125See `define-lex-analyzer' for more about analyzers."
1126 (declare (debug (&define name stringp form def-body)))
1125 `(define-lex-analyzer ,name 1127 `(define-lex-analyzer ,name
1126 ,doc 1128 ,doc
1127 (looking-at ,regexp) 1129 (looking-at ,regexp)
@@ -1139,6 +1141,8 @@ expression.
1139FORMS are evaluated upon a successful match BEFORE the new token is 1141FORMS are evaluated upon a successful match BEFORE the new token is
1140created. It is valid to ignore FORMS. 1142created. It is valid to ignore FORMS.
1141See `define-lex-analyzer' for more about analyzers." 1143See `define-lex-analyzer' for more about analyzers."
1144 (declare (debug
1145 (&define name stringp form symbolp [ &optional form ] def-body)))
1142 `(define-lex-analyzer ,name 1146 `(define-lex-analyzer ,name
1143 ,doc 1147 ,doc
1144 (looking-at ,regexp) 1148 (looking-at ,regexp)
@@ -1163,6 +1167,7 @@ where BLOCK-SYM is the symbol returned in a block token. OPEN-DELIM
1163and CLOSE-DELIM are respectively the open and close delimiters 1167and CLOSE-DELIM are respectively the open and close delimiters
1164identifying a block. OPEN-SYM and CLOSE-SYM are respectively the 1168identifying a block. OPEN-SYM and CLOSE-SYM are respectively the
1165symbols returned in open and close tokens." 1169symbols returned in open and close tokens."
1170 (declare (debug (&define name stringp form (&rest form))))
1166 (let ((specs (cons spec1 specs)) 1171 (let ((specs (cons spec1 specs))
1167 spec open olist clist) 1172 spec open olist clist)
1168 (while specs 1173 (while specs
@@ -1684,6 +1689,7 @@ the error will be caught here without the buffer's cache being thrown
1684out of date. 1689out of date.
1685If there is an error, the syntax that failed is returned. 1690If there is an error, the syntax that failed is returned.
1686If there is no error, then the last value of FORMS is returned." 1691If there is no error, then the last value of FORMS is returned."
1692 (declare (indent 1) (debug (symbolp def-body)))
1687 (let ((ret (make-symbol "ret")) 1693 (let ((ret (make-symbol "ret"))
1688 (syntax (make-symbol "syntax")) 1694 (syntax (make-symbol "syntax"))
1689 (start (make-symbol "start")) 1695 (start (make-symbol "start"))
@@ -1707,36 +1713,8 @@ If there is no error, then the last value of FORMS is returned."
1707 ;;(message "Buffer not currently parsable (%S)." ,ret) 1713 ;;(message "Buffer not currently parsable (%S)." ,ret)
1708 (semantic-parse-tree-unparseable)) 1714 (semantic-parse-tree-unparseable))
1709 ,ret))) 1715 ,ret)))
1710(put 'semantic-lex-catch-errors 'lisp-indent-function 1)
1711 1716
1712 1717
1713;;; Interfacing with edebug
1714;;
1715(add-hook
1716 'edebug-setup-hook
1717 #'(lambda ()
1718
1719 (def-edebug-spec define-lex
1720 (&define name stringp (&rest symbolp))
1721 )
1722 (def-edebug-spec define-lex-analyzer
1723 (&define name stringp form def-body)
1724 )
1725 (def-edebug-spec define-lex-regex-analyzer
1726 (&define name stringp form def-body)
1727 )
1728 (def-edebug-spec define-lex-simple-regex-analyzer
1729 (&define name stringp form symbolp [ &optional form ] def-body)
1730 )
1731 (def-edebug-spec define-lex-block-analyzer
1732 (&define name stringp form (&rest form))
1733 )
1734 (def-edebug-spec semantic-lex-catch-errors
1735 (symbolp def-body)
1736 )
1737
1738 ))
1739
1740;;; Compatibility with Semantic 1.x lexical analysis 1718;;; Compatibility with Semantic 1.x lexical analysis
1741 1719
1742(defvar semantic-flex-tokens semantic-lex-tokens 1720(defvar semantic-flex-tokens semantic-lex-tokens
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index 85defe4f2c0..3d7bce8657a 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -1,4 +1,4 @@
1;;; semantic/tag.el --- tag creation and access 1;;; semantic/tag.el --- Tag creation and access -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1999-2005, 2007-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2005, 2007-2021 Free Software Foundation, Inc.
4 4
@@ -1038,25 +1038,17 @@ See `semantic-tag-bounds'."
1038 1038
1039(defmacro semantic-with-buffer-narrowed-to-current-tag (&rest body) 1039(defmacro semantic-with-buffer-narrowed-to-current-tag (&rest body)
1040 "Execute BODY with the buffer narrowed to the current tag." 1040 "Execute BODY with the buffer narrowed to the current tag."
1041 (declare (indent 0) (debug t))
1041 `(save-restriction 1042 `(save-restriction
1042 (semantic-narrow-to-tag (semantic-current-tag)) 1043 (semantic-narrow-to-tag (semantic-current-tag))
1043 ,@body)) 1044 ,@body))
1044(put 'semantic-with-buffer-narrowed-to-current-tag 'lisp-indent-function 0)
1045(add-hook 'edebug-setup-hook
1046 (lambda ()
1047 (def-edebug-spec semantic-with-buffer-narrowed-to-current-tag
1048 (def-body))))
1049 1045
1050(defmacro semantic-with-buffer-narrowed-to-tag (tag &rest body) 1046(defmacro semantic-with-buffer-narrowed-to-tag (tag &rest body)
1051 "Narrow to TAG, and execute BODY." 1047 "Narrow to TAG, and execute BODY."
1048 (declare (indent 1) (debug t))
1052 `(save-restriction 1049 `(save-restriction
1053 (semantic-narrow-to-tag ,tag) 1050 (semantic-narrow-to-tag ,tag)
1054 ,@body)) 1051 ,@body))
1055(put 'semantic-with-buffer-narrowed-to-tag 'lisp-indent-function 1)
1056(add-hook 'edebug-setup-hook
1057 (lambda ()
1058 (def-edebug-spec semantic-with-buffer-narrowed-to-tag
1059 (def-body))))
1060 1052
1061;;; Tag Hooks 1053;;; Tag Hooks
1062;; 1054;;
diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el
index d5b73244a08..ecd96831352 100644
--- a/lisp/cedet/semantic/wisent.el
+++ b/lisp/cedet/semantic/wisent.el
@@ -1,4 +1,4 @@
1;;; semantic/wisent.el --- Wisent - Semantic gateway 1;;; semantic/wisent.el --- Wisent - Semantic gateway -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2001-2007, 2009-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2001-2007, 2009-2021 Free Software Foundation, Inc.
4 4
@@ -69,6 +69,7 @@ Returned tokens must have the form:
69 (TOKSYM VALUE START . END) 69 (TOKSYM VALUE START . END)
70 70
71where VALUE is the buffer substring between START and END positions." 71where VALUE is the buffer substring between START and END positions."
72 (declare (debug (&define name stringp def-body)))
72 `(defun 73 `(defun
73 ,name () ,doc 74 ,name () ,doc
74 (cond 75 (cond
@@ -319,18 +320,6 @@ the standard function `semantic-parse-region'."
319 (point-max)))))) 320 (point-max))))))
320 ;; Return parse tree 321 ;; Return parse tree
321 (nreverse ptree))) 322 (nreverse ptree)))
322
323;;; Interfacing with edebug
324;;
325(add-hook
326 'edebug-setup-hook
327 #'(lambda ()
328
329 (def-edebug-spec define-wisent-lexer
330 (&define name stringp def-body)
331 )
332
333 ))
334 323
335(provide 'semantic/wisent) 324(provide 'semantic/wisent)
336 325
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 3bf3fd21ded..f06452ea174 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -140,7 +140,7 @@ to an element already in the list stored in PLACE.
140\n(fn X PLACE [KEYWORD VALUE]...)" 140\n(fn X PLACE [KEYWORD VALUE]...)"
141 (declare (debug 141 (declare (debug
142 (form place &rest 142 (form place &rest
143 &or [[&or ":test" ":test-not" ":key"] function-form] 143 &or [[&or ":test" ":test-not" ":key"] form]
144 [keywordp form]))) 144 [keywordp form])))
145 (if (symbolp place) 145 (if (symbolp place)
146 (if (null keys) 146 (if (null keys)
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index a09c47ce7c2..9fccc6b1c9d 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -355,7 +355,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
355(defun pcomplete/eshell-mode/setq () 355(defun pcomplete/eshell-mode/setq ()
356 "Completion function for Eshell's `setq'." 356 "Completion function for Eshell's `setq'."
357 (while (and (pcomplete-here (all-completions pcomplete-stub 357 (while (and (pcomplete-here (all-completions pcomplete-stub
358 obarray 'boundp)) 358 obarray #'boundp))
359 (pcomplete-here)))) 359 (pcomplete-here))))
360 360
361;; FIXME the real "env" command does more than this, it runs a program 361;; FIXME the real "env" command does more than this, it runs a program
diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el
index 18d4f3c9388..b14849df691 100644
--- a/lisp/org/ob-comint.el
+++ b/lisp/org/ob-comint.el
@@ -44,7 +44,7 @@
44BUFFER is checked with `org-babel-comint-buffer-livep'. BODY is 44BUFFER is checked with `org-babel-comint-buffer-livep'. BODY is
45executed inside the protection of `save-excursion' and 45executed inside the protection of `save-excursion' and
46`save-match-data'." 46`save-match-data'."
47 (declare (indent 1)) 47 (declare (indent 1) (debug t))
48 `(progn 48 `(progn
49 (unless (org-babel-comint-buffer-livep ,buffer) 49 (unless (org-babel-comint-buffer-livep ,buffer)
50 (error "Buffer %s does not exist or has no process" ,buffer)) 50 (error "Buffer %s does not exist or has no process" ,buffer))
@@ -53,7 +53,6 @@ executed inside the protection of `save-excursion' and
53 (save-excursion 53 (save-excursion
54 (let ((comint-input-filter (lambda (_input) nil))) 54 (let ((comint-input-filter (lambda (_input) nil)))
55 ,@body)))))) 55 ,@body))))))
56(def-edebug-spec org-babel-comint-in-buffer (form body))
57 56
58(defmacro org-babel-comint-with-output (meta &rest body) 57(defmacro org-babel-comint-with-output (meta &rest body)
59 "Evaluate BODY in BUFFER and return process output. 58 "Evaluate BODY in BUFFER and return process output.
@@ -67,7 +66,7 @@ elements are optional.
67 66
68This macro ensures that the filter is removed in case of an error 67This macro ensures that the filter is removed in case of an error
69or user `keyboard-quit' during execution of body." 68or user `keyboard-quit' during execution of body."
70 (declare (indent 1)) 69 (declare (indent 1) (debug (sexp body)))
71 (let ((buffer (nth 0 meta)) 70 (let ((buffer (nth 0 meta))
72 (eoe-indicator (nth 1 meta)) 71 (eoe-indicator (nth 1 meta))
73 (remove-echo (nth 2 meta)) 72 (remove-echo (nth 2 meta))
@@ -112,7 +111,6 @@ or user `keyboard-quit' during execution of body."
112 string-buffer)) 111 string-buffer))
113 (setq string-buffer (substring string-buffer (match-end 0)))) 112 (setq string-buffer (substring string-buffer (match-end 0))))
114 (split-string string-buffer comint-prompt-regexp))))) 113 (split-string string-buffer comint-prompt-regexp)))))
115(def-edebug-spec org-babel-comint-with-output (sexp body))
116 114
117(defun org-babel-comint-input-command (buffer cmd) 115(defun org-babel-comint-input-command (buffer cmd)
118 "Pass CMD to BUFFER. 116 "Pass CMD to BUFFER.
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index 1343410792a..b1fd6943716 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -1100,7 +1100,7 @@ end-header-args -- point at the end of the header-args
1100body ------------- string holding the body of the code block 1100body ------------- string holding the body of the code block
1101beg-body --------- point at the beginning of the body 1101beg-body --------- point at the beginning of the body
1102end-body --------- point at the end of the body" 1102end-body --------- point at the end of the body"
1103 (declare (indent 1)) 1103 (declare (indent 1) (debug t))
1104 (let ((tempvar (make-symbol "file"))) 1104 (let ((tempvar (make-symbol "file")))
1105 `(let* ((case-fold-search t) 1105 `(let* ((case-fold-search t)
1106 (,tempvar ,file) 1106 (,tempvar ,file)
@@ -1139,7 +1139,6 @@ end-body --------- point at the end of the body"
1139 (goto-char end-block))))) 1139 (goto-char end-block)))))
1140 (unless visited-p (kill-buffer to-be-removed)) 1140 (unless visited-p (kill-buffer to-be-removed))
1141 (goto-char point)))) 1141 (goto-char point))))
1142(def-edebug-spec org-babel-map-src-blocks (form body))
1143 1142
1144;;;###autoload 1143;;;###autoload
1145(defmacro org-babel-map-inline-src-blocks (file &rest body) 1144(defmacro org-babel-map-inline-src-blocks (file &rest body)
@@ -1354,7 +1353,7 @@ the `org-mode-hook'."
1354 (goto-char (match-beginning 0)) 1353 (goto-char (match-beginning 0))
1355 (org-babel-hide-hash) 1354 (org-babel-hide-hash)
1356 (goto-char (match-end 0)))))) 1355 (goto-char (match-end 0))))))
1357(add-hook 'org-mode-hook 'org-babel-hide-all-hashes) 1356(add-hook 'org-mode-hook #'org-babel-hide-all-hashes)
1358 1357
1359(defun org-babel-hash-at-point (&optional point) 1358(defun org-babel-hash-at-point (&optional point)
1360 "Return the value of the hash at POINT. 1359 "Return the value of the hash at POINT.
@@ -1372,7 +1371,7 @@ This can be called with `\\[org-ctrl-c-ctrl-c]'."
1372Add `org-babel-hide-result' as an invisibility spec for hiding 1371Add `org-babel-hide-result' as an invisibility spec for hiding
1373portions of results lines." 1372portions of results lines."
1374 (add-to-invisibility-spec '(org-babel-hide-result . t))) 1373 (add-to-invisibility-spec '(org-babel-hide-result . t)))
1375(add-hook 'org-mode-hook 'org-babel-result-hide-spec) 1374(add-hook 'org-mode-hook #'org-babel-result-hide-spec)
1376 1375
1377(defvar org-babel-hide-result-overlays nil 1376(defvar org-babel-hide-result-overlays nil
1378 "Overlays hiding results.") 1377 "Overlays hiding results.")
@@ -1443,11 +1442,11 @@ portions of results lines."
1443 (push ov org-babel-hide-result-overlays))))) 1442 (push ov org-babel-hide-result-overlays)))))
1444 1443
1445;; org-tab-after-check-for-cycling-hook 1444;; org-tab-after-check-for-cycling-hook
1446(add-hook 'org-tab-first-hook 'org-babel-hide-result-toggle-maybe) 1445(add-hook 'org-tab-first-hook #'org-babel-hide-result-toggle-maybe)
1447;; Remove overlays when changing major mode 1446;; Remove overlays when changing major mode
1448(add-hook 'org-mode-hook 1447(add-hook 'org-mode-hook
1449 (lambda () (add-hook 'change-major-mode-hook 1448 (lambda () (add-hook 'change-major-mode-hook
1450 'org-babel-show-result-all 'append 'local))) 1449 #'org-babel-show-result-all 'append 'local)))
1451 1450
1452(defun org-babel-params-from-properties (&optional lang no-eval) 1451(defun org-babel-params-from-properties (&optional lang no-eval)
1453 "Retrieve source block parameters specified as properties. 1452 "Retrieve source block parameters specified as properties.
@@ -3075,8 +3074,7 @@ Emacs shutdown."))
3075 3074
3076(defmacro org-babel-result-cond (result-params scalar-form &rest table-forms) 3075(defmacro org-babel-result-cond (result-params scalar-form &rest table-forms)
3077 "Call the code to parse raw string results according to RESULT-PARAMS." 3076 "Call the code to parse raw string results according to RESULT-PARAMS."
3078 (declare (indent 1) 3077 (declare (indent 1) (debug t))
3079 (debug (form form &rest form)))
3080 (org-with-gensyms (params) 3078 (org-with-gensyms (params)
3081 `(let ((,params ,result-params)) 3079 `(let ((,params ,result-params))
3082 (unless (member "none" ,params) 3080 (unless (member "none" ,params)
@@ -3093,7 +3091,6 @@ Emacs shutdown."))
3093 (not (member "table" ,params)))) 3091 (not (member "table" ,params))))
3094 ,scalar-form 3092 ,scalar-form
3095 ,@table-forms))))) 3093 ,@table-forms)))))
3096(def-edebug-spec org-babel-result-cond (form form body))
3097 3094
3098(defun org-babel-temp-file (prefix &optional suffix) 3095(defun org-babel-temp-file (prefix &optional suffix)
3099 "Create a temporary file in the `org-babel-temporary-directory'. 3096 "Create a temporary file in the `org-babel-temporary-directory'.
@@ -3136,7 +3133,7 @@ of `org-babel-temporary-directory'."
3136 org-babel-temporary-directory 3133 org-babel-temporary-directory
3137 "[directory not defined]")))))) 3134 "[directory not defined]"))))))
3138 3135
3139(add-hook 'kill-emacs-hook 'org-babel-remove-temporary-directory) 3136(add-hook 'kill-emacs-hook #'org-babel-remove-temporary-directory)
3140 3137
3141(defun org-babel-one-header-arg-safe-p (pair safe-list) 3138(defun org-babel-one-header-arg-safe-p (pair safe-list)
3142 "Determine if the PAIR is a safe babel header arg according to SAFE-LIST. 3139 "Determine if the PAIR is a safe babel header arg according to SAFE-LIST.
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el
index 3c3943c8fa9..aa0373ab88e 100644
--- a/lisp/org/ob-tangle.el
+++ b/lisp/org/ob-tangle.el
@@ -150,7 +150,7 @@ represented in the file."
150 "Open FILE into a temporary buffer execute BODY there like 150 "Open FILE into a temporary buffer execute BODY there like
151`progn', then kill the FILE buffer returning the result of 151`progn', then kill the FILE buffer returning the result of
152evaluating BODY." 152evaluating BODY."
153 (declare (indent 1)) 153 (declare (indent 1) (debug t))
154 (let ((temp-path (make-symbol "temp-path")) 154 (let ((temp-path (make-symbol "temp-path"))
155 (temp-result (make-symbol "temp-result")) 155 (temp-result (make-symbol "temp-result"))
156 (temp-file (make-symbol "temp-file")) 156 (temp-file (make-symbol "temp-file"))
@@ -164,7 +164,6 @@ evaluating BODY."
164 (setf ,temp-result (progn ,@body))) 164 (setf ,temp-result (progn ,@body)))
165 (unless ,visited-p (kill-buffer ,temp-file)) 165 (unless ,visited-p (kill-buffer ,temp-file))
166 ,temp-result))) 166 ,temp-result)))
167(def-edebug-spec org-babel-with-temp-filebuffer (form body))
168 167
169;;;###autoload 168;;;###autoload
170(defun org-babel-tangle-file (file &optional target-file lang-re) 169(defun org-babel-tangle-file (file &optional target-file lang-re)
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 99e5464c2b9..b9799d2abe8 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -2090,6 +2090,7 @@ Note that functions in this alist don't need to be quoted."
2090If STRING is non-nil, the text property will be fetched from position 0 2090If STRING is non-nil, the text property will be fetched from position 0
2091in that string. If STRING is nil, it will be fetched from the beginning 2091in that string. If STRING is nil, it will be fetched from the beginning
2092of the current line." 2092of the current line."
2093 (declare (debug t))
2093 (org-with-gensyms (marker) 2094 (org-with-gensyms (marker)
2094 `(let ((,marker (get-text-property (if ,string 0 (point-at-bol)) 2095 `(let ((,marker (get-text-property (if ,string 0 (point-at-bol))
2095 'org-hd-marker ,string))) 2096 'org-hd-marker ,string)))
@@ -2097,7 +2098,6 @@ of the current line."
2097 (save-excursion 2098 (save-excursion
2098 (goto-char ,marker) 2099 (goto-char ,marker)
2099 ,@body))))) 2100 ,@body)))))
2100(def-edebug-spec org-agenda-with-point-at-orig-entry (form body))
2101 2101
2102(defun org-add-agenda-custom-command (entry) 2102(defun org-add-agenda-custom-command (entry)
2103 "Replace or add a command in `org-agenda-custom-commands'. 2103 "Replace or add a command in `org-agenda-custom-commands'.
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 2073b33380b..2844b0e511b 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -911,17 +911,17 @@ If CLOCK-SOUND is non-nil, it overrides `org-clock-sound'."
911 911
912(defmacro org-with-clock-position (clock &rest forms) 912(defmacro org-with-clock-position (clock &rest forms)
913 "Evaluate FORMS with CLOCK as the current active clock." 913 "Evaluate FORMS with CLOCK as the current active clock."
914 (declare (indent 1) (debug t))
914 `(with-current-buffer (marker-buffer (car ,clock)) 915 `(with-current-buffer (marker-buffer (car ,clock))
915 (org-with-wide-buffer 916 (org-with-wide-buffer
916 (goto-char (car ,clock)) 917 (goto-char (car ,clock))
917 (beginning-of-line) 918 (beginning-of-line)
918 ,@forms))) 919 ,@forms)))
919(def-edebug-spec org-with-clock-position (form body))
920(put 'org-with-clock-position 'lisp-indent-function 1)
921 920
922(defmacro org-with-clock (clock &rest forms) 921(defmacro org-with-clock (clock &rest forms)
923 "Evaluate FORMS with CLOCK as the current active clock. 922 "Evaluate FORMS with CLOCK as the current active clock.
924This macro also protects the current active clock from being altered." 923This macro also protects the current active clock from being altered."
924 (declare (indent 1) (debug t))
925 `(org-with-clock-position ,clock 925 `(org-with-clock-position ,clock
926 (let ((org-clock-start-time (cdr ,clock)) 926 (let ((org-clock-start-time (cdr ,clock))
927 (org-clock-total-time) 927 (org-clock-total-time)
@@ -932,8 +932,6 @@ This macro also protects the current active clock from being altered."
932 (org-back-to-heading t) 932 (org-back-to-heading t)
933 (point-marker)))) 933 (point-marker))))
934 ,@forms))) 934 ,@forms)))
935(def-edebug-spec org-with-clock (form body))
936(put 'org-with-clock 'lisp-indent-function 1)
937 935
938(defsubst org-clock-clock-in (clock &optional resume start-time) 936(defsubst org-clock-clock-in (clock &optional resume start-time)
939 "Clock in to the clock located by CLOCK. 937 "Clock in to the clock located by CLOCK.
diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el
index 29d9d58482a..d8a4937b95a 100644
--- a/lisp/org/org-pcomplete.el
+++ b/lisp/org/org-pcomplete.el
@@ -239,11 +239,11 @@ When completing for #+STARTUP, for example, this function returns
239 (require 'ox) 239 (require 'ox)
240 (pcomplete-here 240 (pcomplete-here
241 (and org-export-exclude-tags 241 (and org-export-exclude-tags
242 (list (mapconcat 'identity org-export-exclude-tags " "))))) 242 (list (mapconcat #'identity org-export-exclude-tags " ")))))
243 243
244(defun pcomplete/org-mode/file-option/filetags () 244(defun pcomplete/org-mode/file-option/filetags ()
245 "Complete arguments for the #+FILETAGS file option." 245 "Complete arguments for the #+FILETAGS file option."
246 (pcomplete-here (and org-file-tags (mapconcat 'identity org-file-tags " ")))) 246 (pcomplete-here (and org-file-tags (mapconcat #'identity org-file-tags " "))))
247 247
248(defun pcomplete/org-mode/file-option/language () 248(defun pcomplete/org-mode/file-option/language ()
249 "Complete arguments for the #+LANGUAGE file option." 249 "Complete arguments for the #+LANGUAGE file option."
@@ -264,13 +264,13 @@ When completing for #+STARTUP, for example, this function returns
264 (require 'ox) 264 (require 'ox)
265 (pcomplete-here 265 (pcomplete-here
266 (and org-export-select-tags 266 (and org-export-select-tags
267 (list (mapconcat 'identity org-export-select-tags " "))))) 267 (list (mapconcat #'identity org-export-select-tags " ")))))
268 268
269(defun pcomplete/org-mode/file-option/startup () 269(defun pcomplete/org-mode/file-option/startup ()
270 "Complete arguments for the #+STARTUP file option." 270 "Complete arguments for the #+STARTUP file option."
271 (while (pcomplete-here 271 (while (pcomplete-here
272 (let ((opts (pcomplete-uniquify-list 272 (let ((opts (pcomplete-uniquify-list
273 (mapcar 'car org-startup-options)))) 273 (mapcar #'car org-startup-options))))
274 ;; Some options are mutually exclusive, and shouldn't be completed 274 ;; Some options are mutually exclusive, and shouldn't be completed
275 ;; against if certain other options have already been seen. 275 ;; against if certain other options have already been seen.
276 (dolist (arg pcomplete-args) 276 (dolist (arg pcomplete-args)
@@ -340,7 +340,8 @@ When completing for #+STARTUP, for example, this function returns
340 "Complete against TeX-style HTML entity names." 340 "Complete against TeX-style HTML entity names."
341 (require 'org-entities) 341 (require 'org-entities)
342 (while (pcomplete-here 342 (while (pcomplete-here
343 (pcomplete-uniquify-list (remove nil (mapcar 'car-safe org-entities))) 343 (pcomplete-uniquify-list
344 (remove nil (mapcar #'car-safe org-entities)))
344 (substring pcomplete-stub 1)))) 345 (substring pcomplete-stub 1))))
345 346
346(defun pcomplete/org-mode/todo () 347(defun pcomplete/org-mode/todo ()
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el
index dd964e36384..6c68645eb22 100644
--- a/lisp/pcmpl-gnu.el
+++ b/lisp/pcmpl-gnu.el
@@ -106,7 +106,7 @@
106 (while (pcomplete-here (completion-table-in-turn 106 (while (pcomplete-here (completion-table-in-turn
107 (pcmpl-gnu-make-rule-names) 107 (pcmpl-gnu-make-rule-names)
108 (pcomplete-entries)) 108 (pcomplete-entries))
109 nil 'identity)))) 109 nil #'identity))))
110 110
111(defun pcmpl-gnu-makefile-names () 111(defun pcmpl-gnu-makefile-names ()
112 "Return a list of possible makefile names." 112 "Return a list of possible makefile names."
@@ -336,7 +336,7 @@ Return the new list."
336 (pcomplete-match-string 1 0))))) 336 (pcomplete-match-string 1 0)))))
337 (unless saw-option 337 (unless saw-option
338 (pcomplete-here 338 (pcomplete-here
339 (mapcar 'char-to-string 339 (mapcar #'char-to-string
340 (string-to-list 340 (string-to-list
341 "01234567ABCFGIKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz"))) 341 "01234567ABCFGIKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz")))
342 (if (pcomplete-match "[xt]" 'first 1) 342 (if (pcomplete-match "[xt]" 'first 1)
@@ -355,7 +355,7 @@ Return the new list."
355 (pcmpl-gnu-with-file-buffer 355 (pcmpl-gnu-with-file-buffer
356 file (mapcar #'tar-header-name tar-parse-info))))) 356 file (mapcar #'tar-header-name tar-parse-info)))))
357 (pcomplete-entries)) 357 (pcomplete-entries))
358 nil 'identity)))) 358 nil #'identity))))
359 359
360;;;###autoload 360;;;###autoload
361 361
@@ -391,7 +391,7 @@ Return the new list."
391 (string= prec "-execdir")) 391 (string= prec "-execdir"))
392 (while (pcomplete-here* (funcall pcomplete-command-completion-function) 392 (while (pcomplete-here* (funcall pcomplete-command-completion-function)
393 (pcomplete-arg 'last) t)))) 393 (pcomplete-arg 'last) t))))
394 (while (pcomplete-here (pcomplete-dirs) nil 'identity)))) 394 (while (pcomplete-here (pcomplete-dirs) nil #'identity))))
395 395
396;;;###autoload 396;;;###autoload
397(defalias 'pcomplete/gdb 'pcomplete/xargs) 397(defalias 'pcomplete/gdb 'pcomplete/xargs)
diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el
index 2f42dbd4fa1..263d646dc6e 100644
--- a/lisp/pcmpl-linux.el
+++ b/lisp/pcmpl-linux.el
@@ -50,20 +50,20 @@
50 (while (pcomplete-here 50 (while (pcomplete-here
51 (if (file-directory-p "/proc") 51 (if (file-directory-p "/proc")
52 (directory-files "/proc" nil "\\`[0-9]+\\'")) 52 (directory-files "/proc" nil "\\`[0-9]+\\'"))
53 nil 'identity))) 53 nil #'identity)))
54 54
55;;;###autoload 55;;;###autoload
56(defun pcomplete/umount () 56(defun pcomplete/umount ()
57 "Completion for GNU/Linux `umount'." 57 "Completion for GNU/Linux `umount'."
58 (pcomplete-opt "hVafrnvt(pcmpl-linux-fs-types)") 58 (pcomplete-opt "hVafrnvt(pcmpl-linux-fs-types)")
59 (while (pcomplete-here (pcmpl-linux-mounted-directories) 59 (while (pcomplete-here (pcmpl-linux-mounted-directories)
60 nil 'identity))) 60 nil #'identity)))
61 61
62;;;###autoload 62;;;###autoload
63(defun pcomplete/mount () 63(defun pcomplete/mount ()
64 "Completion for GNU/Linux `mount'." 64 "Completion for GNU/Linux `mount'."
65 (pcomplete-opt "hVanfFrsvwt(pcmpl-linux-fs-types)o?L?U?") 65 (pcomplete-opt "hVanfFrsvwt(pcmpl-linux-fs-types)o?L?U?")
66 (while (pcomplete-here (pcomplete-entries) nil 'identity))) 66 (while (pcomplete-here (pcomplete-entries) nil #'identity)))
67 67
68(defconst pcmpl-linux-fs-modules-path-format "/lib/modules/%s/kernel/fs/") 68(defconst pcmpl-linux-fs-modules-path-format "/lib/modules/%s/kernel/fs/")
69 69
diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el
index 70273b94a1b..c1aaf829dcf 100644
--- a/lisp/pcmpl-unix.el
+++ b/lisp/pcmpl-unix.el
@@ -77,7 +77,7 @@ being via `pcmpl-ssh-known-hosts-file'."
77 (let ((pcomplete-help "(fileutils)rm invocation")) 77 (let ((pcomplete-help "(fileutils)rm invocation"))
78 (pcomplete-opt "dfirRv") 78 (pcomplete-opt "dfirRv")
79 (while (pcomplete-here (pcomplete-all-entries) nil 79 (while (pcomplete-here (pcomplete-all-entries) nil
80 'expand-file-name)))) 80 #'expand-file-name))))
81 81
82;;;###autoload 82;;;###autoload
83(defun pcomplete/xargs () 83(defun pcomplete/xargs ()
diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el
index 61d88666798..084f0e66bc8 100644
--- a/lisp/pcmpl-x.el
+++ b/lisp/pcmpl-x.el
@@ -301,7 +301,8 @@ long options."
301 "nst" "ntd" "nto" "nvf" "obi" "obs" "ofp" "osh" "ovf" "par" 301 "nst" "ntd" "nto" "nvf" "obi" "obs" "ofp" "osh" "ovf" "par"
302 "pch" "pck" "pia" "pin" "pow" "prc" "pre" "pro" "rch" "ret" 302 "pch" "pck" "pia" "pin" "pow" "prc" "pre" "pro" "rch" "ret"
303 "rng" "rpt" "rvl" "sig" "spa" "stl" "stu" "stv" "sus" "tai" 303 "rng" "rpt" "rvl" "sig" "spa" "stl" "stu" "stv" "sus" "tai"
304 "tes" "thr" "ucp" "use" "voi" "zdi") (match-string 2 cur))) 304 "tes" "thr" "ucp" "use" "voi" "zdi")
305 (match-string 2 cur)))
305 ((string-match "\\`-[LIn]\\([^;]+;\\)*\\([^;]*\\)\\'" cur) 306 ((string-match "\\`-[LIn]\\([^;]+;\\)*\\([^;]*\\)\\'" cur)
306 (pcomplete-here (pcomplete-dirs) (match-string 2 cur))) 307 (pcomplete-here (pcomplete-dirs) (match-string 2 cur)))
307 ((string-match "\\`-[Ee]\\(.*\\)\\'" cur) 308 ((string-match "\\`-[Ee]\\(.*\\)\\'" cur)
diff --git a/lisp/shell.el b/lisp/shell.el
index 32128241655..9238ad1e8a0 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -463,7 +463,7 @@ Shell buffers. It implements `shell-completion-execonly' for
463 (if (pcomplete-match "/") 463 (if (pcomplete-match "/")
464 (pcomplete-here (pcomplete-entries nil 464 (pcomplete-here (pcomplete-entries nil
465 (if shell-completion-execonly 465 (if shell-completion-execonly
466 'file-executable-p))) 466 #'file-executable-p)))
467 (pcomplete-here 467 (pcomplete-here
468 (nth 2 (shell--command-completion-data))))) 468 (nth 2 (shell--command-completion-data)))))
469 469
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index e43978f4137..d64c72184ea 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1,4 +1,4 @@
1;;; speedbar --- quick access to files and tags in a frame 1;;; speedbar --- quick access to files and tags in a frame -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -1640,7 +1640,7 @@ variable `speedbar-obj-alist'."
1640 1640
1641(defmacro speedbar-with-writable (&rest forms) 1641(defmacro speedbar-with-writable (&rest forms)
1642 "Allow the buffer to be writable and evaluate FORMS." 1642 "Allow the buffer to be writable and evaluate FORMS."
1643 (declare (indent 0)) 1643 (declare (indent 0) (debug t))
1644 `(let ((inhibit-read-only t)) 1644 `(let ((inhibit-read-only t))
1645 ,@forms)) 1645 ,@forms))
1646 1646
@@ -4001,11 +4001,6 @@ TEXT is the buffer's name, TOKEN and INDENT are unused."
4001 "Speedbar face for separator labels in a display." 4001 "Speedbar face for separator labels in a display."
4002 :group 'speedbar-faces) 4002 :group 'speedbar-faces)
4003 4003
4004;; some edebug hooks
4005(add-hook 'edebug-setup-hook
4006 (lambda ()
4007 (def-edebug-spec speedbar-with-writable def-body)))
4008
4009;; Fix a font lock problem for some versions of Emacs 4004;; Fix a font lock problem for some versions of Emacs
4010(and (boundp 'font-lock-global-modes) 4005(and (boundp 'font-lock-global-modes)
4011 font-lock-global-modes 4006 font-lock-global-modes
diff --git a/lisp/subr.el b/lisp/subr.el
index eb287287608..454ea54b6a4 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -88,6 +88,7 @@ Both SYMBOL and SPEC are unevaluated. The SPEC can be:
88a symbol (naming a function with an Edebug specification); or a list. 88a symbol (naming a function with an Edebug specification); or a list.
89The elements of the list describe the argument types; see 89The elements of the list describe the argument types; see
90Info node `(elisp)Specification List' for details." 90Info node `(elisp)Specification List' for details."
91 (declare (indent 1))
91 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec))) 92 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec)))
92 93
93(defmacro lambda (&rest cdr) 94(defmacro lambda (&rest cdr)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 2b31e7ed612..c51285d3de6 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -105,10 +105,6 @@
105;; Common Lisp stuff 105;; Common Lisp stuff
106(require 'cl-lib) 106(require 'cl-lib)
107 107
108;; Correct wrong declaration.
109(def-edebug-spec push
110 (&or [form symbolp] [form gv-place]))
111
112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
113;; Support for `testcover' 109;; Support for `testcover'
114 110
diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el
index 43816501bda..a95ea0d99da 100644
--- a/lisp/vc/pcvs-parse.el
+++ b/lisp/vc/pcvs-parse.el
@@ -1,4 +1,4 @@
1;;; pcvs-parse.el --- the CVS output parser 1;;; pcvs-parse.el --- the CVS output parser -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1991-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1991-2021 Free Software Foundation, Inc.
4 4
@@ -73,12 +73,12 @@ by `$'."
73 '("status" "add" "commit" "update" "remove" "checkout" "ci") 73 '("status" "add" "commit" "update" "remove" "checkout" "ci")
74 "List of CVS commands whose output is understood by the parser.") 74 "List of CVS commands whose output is understood by the parser.")
75 75
76(defun cvs-parse-buffer (parse-spec dont-change-disc &optional subdir) 76(defun cvs-parse-buffer (parse-spec dcd &optional subdir)
77 "Parse current buffer according to PARSE-SPEC. 77 "Parse current buffer according to PARSE-SPEC.
78PARSE-SPEC is a function of no argument advancing the point and returning 78PARSE-SPEC is a function of no argument advancing the point and returning
79 either a fileinfo or t (if the matched text should be ignored) or 79 either a fileinfo or t (if the matched text should be ignored) or
80 nil if it didn't match anything. 80 nil if it didn't match anything.
81DONT-CHANGE-DISC just indicates whether the command was changing the disc 81DCD just indicates whether the command was changing the disc
82 or not (useful to tell the difference between `cvs-examine' and `cvs-update' 82 or not (useful to tell the difference between `cvs-examine' and `cvs-update'
83 output. 83 output.
84The path names should be interpreted as relative to SUBDIR (defaults 84The path names should be interpreted as relative to SUBDIR (defaults
@@ -86,6 +86,7 @@ The path names should be interpreted as relative to SUBDIR (defaults
86Return a list of collected entries, or t if an error occurred." 86Return a list of collected entries, or t if an error occurred."
87 (goto-char (point-min)) 87 (goto-char (point-min))
88 (let ((fileinfos ()) 88 (let ((fileinfos ())
89 (dont-change-disc dcd)
89 (cvs-current-dir "") 90 (cvs-current-dir "")
90 (case-fold-search nil) 91 (case-fold-search nil)
91 (cvs-current-subdir (or subdir ""))) 92 (cvs-current-subdir (or subdir "")))
@@ -134,12 +135,12 @@ Match RE and if successful, execute MATCHES."
134 135
135(defmacro cvs-or (&rest alts) 136(defmacro cvs-or (&rest alts)
136 "Try each one of the ALTS alternatives until one matches." 137 "Try each one of the ALTS alternatives until one matches."
138 (declare (debug t))
137 `(let ((-cvs-parse-point (point))) 139 `(let ((-cvs-parse-point (point)))
138 ,(cons 'or 140 ,(cons 'or
139 (mapcar (lambda (es) 141 (mapcar (lambda (es)
140 `(or ,es (ignore (goto-char -cvs-parse-point)))) 142 `(or ,es (ignore (goto-char -cvs-parse-point))))
141 alts)))) 143 alts))))
142(def-edebug-spec cvs-or t)
143 144
144;; This is how parser tables should be executed 145;; This is how parser tables should be executed
145(defun cvs-parse-run-table (parse-spec) 146(defun cvs-parse-run-table (parse-spec)
@@ -190,9 +191,9 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
190 file (cvs-parse-msg) :subtype subtype keys)))) 191 file (cvs-parse-msg) :subtype subtype keys))))
191 192
192;;;; CVS Process Parser Tables: 193;;;; CVS Process Parser Tables:
193;;;; 194;;
194;;;; The table for status and update could actually be merged since they 195;; The table for status and update could actually be merged since they
195;;;; don't conflict. But they don't overlap much either. 196;; don't conflict. But they don't overlap much either.
196 197
197(defun cvs-parse-table () 198(defun cvs-parse-table ()
198 "Table of message objects for `cvs-parse-process'." 199 "Table of message objects for `cvs-parse-process'."