Function: majutsu-jj--escape-fileset-string
majutsu-jj--escape-fileset-string is a natively compiled function
defined in majutsu-jj.el.
Signature
(majutsu-jj--escape-fileset-string S)
Documentation
Escape S for a jj fileset string literal.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-jj.el
(defun majutsu-jj--escape-fileset-string (s)
"Escape S for a jj fileset string literal."
(unless (stringp s)
(user-error "majutsu-jj: expected string, got %S" s))
(apply #'concat
(mapcar (lambda (ch)
(pcase ch
(?\" "\\\"")
(?\\ "\\\\")
(?\t "\\t")
(?\r "\\r")
(?\n "\\n")
(0 "\\0")
(27 "\\e")
(_
(if (or (< ch 32) (= ch 127))
(format "\\x%02X" ch)
(string ch)))))
(string-to-list s))))