File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -446,15 +446,22 @@ other scripts internally. See function `eask-call'.")
446446 (push arg args))))
447447 (reverse args)))
448448
449+ (defmacro eask--batch-mode (&rest body )
450+ " Initialize for batch-mode"
451+ (declare (indent 0 ) (debug t ))
452+ `(let ((command-line-args-left (eask-args))
453+ load-file-name buffer-file-name)
454+ ,@body ))
455+
449456(defmacro eask--setup-env (&rest body )
450457 " Execute BODY with workspace setup."
451458 (declare (indent 0 ) (debug t ))
452- `(let (( load-file-name ) ( buffer-file-name ) ; initialize for batch-mode
453- (alist) )
454- (dolist (cmd eask--command-list)
455- (push (cons cmd '(lambda (&rest _))) alist))
456- (setq command-switch-alist (append command-switch-alist alist))
457- ,@body ))
459+ `(eask-- batch-mode
460+ ( let (alist)
461+ (dolist (cmd eask--command-list)
462+ (push (cons cmd '(lambda (&rest _))) alist))
463+ (setq command-switch-alist (append command-switch-alist alist))
464+ ,@body ) ))
458465
459466(defconst eask-file-keywords
460467 '(" package" " package-file" " files"
You can’t perform that action at this time.
0 commit comments