Commit 18211c7f authored by Remi Vanicat's avatar Remi Vanicat Committed by Jonas Bernoulli

Add debug declare to most defmacro

parent c64bb994
......@@ -287,7 +287,7 @@ call function WASHER with no argument."
;;; Files
(defmacro magit--with-safe-default-directory (file &rest body)
(declare (indent 1))
(declare (indent 1) (debug (form body)))
`(catch 'unsafe-default-dir
(let ((default-directory
(let ((file ,file))
......@@ -323,7 +323,7 @@ GIT_DIR and its absolute path is returned."
(file-name-directory (directory-file-name gitdir))))))))
(defmacro magit-with-toplevel (&rest body)
(declare (indent defun))
(declare (indent defun) (debug (body)))
(let ((toplevel (cl-gensym "toplevel")))
`(let ((,toplevel (magit-toplevel)))
(if ,toplevel
......
......@@ -342,7 +342,7 @@ or `:only' which doesn't change the behaviour."
(magit-popup-get :options))))
(defmacro magit-popup-convert-events (def form)
(declare (indent 1))
(declare (indent 1) (debug (form form)))
`(--map (if (or (null it) (stringp it)) it ,form) ,def))
(defun magit-popup-convert-switches (val def)
......
......@@ -560,7 +560,7 @@ tracked in the current repository are reverted if
(write-region (point-min) (point-max) file))))
(defmacro magit-process-kill-on-abort (proc &rest body)
(declare (indent 1))
(declare (indent 1) (debug (form body)))
(let ((map (cl-gensym)))
`(let ((,map (make-sparse-keymap)))
(set-keymap-parent ,map minibuffer-local-map)
......
......@@ -381,6 +381,7 @@ The following `format'-like specs are supported:
(magit-rev-format "%s" stash) "\n")))))
(defmacro magit-stash-insert-section (subtype format &optional files)
(declare (debug (sexp form &optional form)))
`(let ((stash (car magit-refresh-args)))
(magit-insert-section (,(intern (format "stashed-%s" subtype)))
(magit-insert-heading (format "%s %s:" (capitalize stash) ',subtype))
......
......@@ -356,7 +356,7 @@ Modify the `process-environment' for processes started in BODY,
instructing them to use the Emacsclient as $EDITOR. If optional
ENVVAR is provided then bind that environment variable instead.
\n(fn [ENVVAR] BODY...)"
(declare (indent defun))
(declare (indent defun) (debug (body)))
`(let ((with-editor--envvar ,(if (stringp (car body))
(pop body)
'(or with-editor--envvar "EDITOR")))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment