Function: lua-make-lua-string

lua-make-lua-string is a byte-compiled function defined in lua-mode.el.gz.

Signature

(lua-make-lua-string STR)

Documentation

Convert STR to Lua literal.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/lua-mode.el.gz
(defun lua-make-lua-string (str)
  "Convert STR to Lua literal."
  (concat "'"
          (replace-regexp-in-string
           (rx (or ?\" ?' ?\t ?\n ?\\))
           (lambda (s)
             (cdr (assq (aref s 0) '((?\" . "\\\"")
                                     (?\\ . "\\\\")
                                     (?\n . "\\n")
                                     (?\t . "\\t")
                                     (?'  . "\\'")))))
           str t t)
          "'"))