Function: tcl-quote
tcl-quote is a byte-compiled function defined in tcl.el.gz.
Signature
(tcl-quote STRING)
Documentation
Quote STRING according to Tcl rules.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/tcl.el.gz
;;
;; Quoting and unquoting functions.
;;
;; This quoting is sufficient to protect eg a filename from any sort
;; of expansion or splitting. Tcl quoting sure sucks.
(defun tcl-quote (string)
"Quote STRING according to Tcl rules."
(mapconcat (lambda (char)
(if (memq char '(?\[ ?\] ?{ ?} ?\\ ?\" ?$ ?\s ?\;))
(concat "\\" (char-to-string char))
(char-to-string char)))
string ""))