Function: majutsu-restore--remove-interactive-tool-args

majutsu-restore--remove-interactive-tool-args is a natively compiled function defined in majutsu-restore.el.

Signature

(majutsu-restore--remove-interactive-tool-args ARGS)

Documentation

Return ARGS without native interactive-editor or tool arguments.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-restore.el
(defun majutsu-restore--remove-interactive-tool-args (args)
  "Return ARGS without native interactive-editor or tool arguments."
  (let (out)
    (while args
      (let ((arg (pop args)))
        (cond
         ((member arg '("-i" "--interactive")))
         ((member arg '("-t" "--tool"))
          (when args (pop args)))
         ((and (stringp arg)
               (or (string-prefix-p "--tool=" arg)
                   (string-prefix-p "-t=" arg))))
         (t (push arg out)))))
    (nreverse out)))