Function: dape--command-at-line
dape--command-at-line is a macro defined in dape.el.
Signature
(dape--command-at-line NAME PROPERTIES MODES DOC &rest BODY)
Documentation
Helper macro to create info command with NAME and DOC.
Binds PROPERTIES on string properties from current line and binds them then executes BODY. Which MODES this command is applicable.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defmacro dape--command-at-line (name properties modes doc &rest body)
"Helper macro to create info command with NAME and DOC.
Binds PROPERTIES on string properties from current line and binds them
then executes BODY. Which MODES this command is applicable."
(declare (indent defun))
`(defun ,name (&optional event)
,doc
(interactive (list last-input-event) ,@modes)
(if event (posn-set-point (event-end event)))
(let (,@properties)
(save-excursion
(beginning-of-line)
,@(mapcar (lambda (property)
`(setq ,property (get-text-property (point) ',property)))
properties))
(if (or ,@properties)
(progn
,@body)
(user-error "Command `%s' not available at point" ',name)))))