diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-12 16:08:01 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-12 16:08:01 -0500 |
commit | f8dbefbaa59bb17dd4a2dfa4d9ff560c46785792 (patch) | |
tree | 914e75a52a9af98ca11aaa55e4d9ff1b4f7f58d5 /lisp/cedet/ede/proj-comp.el | |
parent | 9518926220943d5c405e03d7352343341e07ba83 (diff) | |
download | emacs-f8dbefbaa59bb17dd4a2dfa4d9ff560c46785792.tar.gz |
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`.
Diffstat (limited to 'lisp/cedet/ede/proj-comp.el')
-rw-r--r-- | lisp/cedet/ede/proj-comp.el | 35 |
1 files changed, 10 insertions, 25 deletions
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 @@ -;;; ede/proj-comp.el --- EDE Generic Project compiler/rule driver +;;; ede/proj-comp.el --- EDE Generic Project compiler/rule driver -*- lexical-binding: t; -*- ;; Copyright (C) 1999-2001, 2004-2005, 2007, 2009-2021 Free Software ;; Foundation, Inc. @@ -172,12 +172,12 @@ Adds this rule to a .PHONY list.")) This is used when creating a Makefile to prevent duplicate variables and rules from being created.") -(cl-defmethod initialize-instance :after ((this ede-compiler) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-compiler) &rest _fields) "Make sure that all ede compiler objects are cached in `ede-compiler-list'." (add-to-list 'ede-compiler-list this)) -(cl-defmethod initialize-instance :after ((this ede-linker) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-linker) &rest _fields) "Make sure that all ede compiler objects are cached in `ede-linker-list'." (add-to-list 'ede-linker-list this)) @@ -185,11 +185,13 @@ rules from being created.") (defmacro ede-compiler-begin-unique (&rest body) "Execute BODY, making sure that `ede-current-build-list' is maintained. This will prevent rules from creating duplicate variables or rules." + (declare (indent 0) (debug t)) `(let ((ede-current-build-list nil)) ,@body)) (defmacro ede-compiler-only-once (object &rest body) "Using OBJECT, execute BODY only once per Makefile generation." + (declare (indent 1) (debug t)) `(if (not (member ,object ede-current-build-list)) (progn (add-to-list 'ede-current-build-list ,object) @@ -198,25 +200,18 @@ This will prevent rules from creating duplicate variables or rules." (defmacro ede-linker-begin-unique (&rest body) "Execute BODY, making sure that `ede-current-build-list' is maintained. This will prevent rules from creating duplicate variables or rules." + (declare (indent 0) (debug t)) `(let ((ede-current-build-list nil)) ,@body)) (defmacro ede-linker-only-once (object &rest body) "Using OBJECT, execute BODY only once per Makefile generation." + (declare (indent 1) (debug t)) `(if (not (member ,object ede-current-build-list)) (progn (add-to-list 'ede-current-build-list ,object) ,@body))) -(add-hook 'edebug-setup-hook - (lambda () - (def-edebug-spec ede-compiler-begin-unique def-body) - (def-edebug-spec ede-compiler-only-once (form def-body)) - (def-edebug-spec ede-linker-begin-unique def-body) - (def-edebug-spec ede-linker-only-once (form def-body)) - (def-edebug-spec ede-pmake-insert-variable-shared (form def-body)) - )) - ;;; Queries (defun ede-proj-find-compiler (compilers sourcetype) "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." ) (oref this autoconf))) -(cl-defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) +(cl-defmethod ede-proj-flush-autoconf ((_this ede-compilation-program)) "Flush the configure file (current buffer) to accommodate THIS." nil) @@ -281,8 +276,8 @@ If this compiler creates code that can be linked together, then the object files created by the compiler are considered intermediate." (oref this uselinker)) -(cl-defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) - targetname) +(cl-defmethod ede-compiler-intermediate-object-variable ((_this ede-compiler) + targetname) "Return a string based on THIS representing a make object variable. TARGETNAME is the name of the target that these objects belong to." (concat targetname "_OBJ")) @@ -343,16 +338,6 @@ compiler it decides to use after inserting in the rule." commands)) (insert "\n"))) -;;; Some details about our new macro -;; -(add-hook 'edebug-setup-hook - (lambda () - (def-edebug-spec ede-compiler-begin-unique def-body))) -(put 'ede-compiler-begin-unique 'lisp-indent-function 0) -(put 'ede-compiler-only-once 'lisp-indent-function 1) -(put 'ede-linker-begin-unique 'lisp-indent-function 0) -(put 'ede-linker-only-once 'lisp-indent-function 1) - (provide 'ede/proj-comp) ;;; ede/proj-comp.el ends here |