Function: gdb-mi-quote

gdb-mi-quote is a byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdb-mi-quote STRING)

Documentation

Return STRING quoted properly as an MI argument.

The string is enclosed in double quotes. All embedded quotes, newlines, and backslashes are preceded with a backslash.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdb-mi-quote (string)
  "Return STRING quoted properly as an MI argument.
The string is enclosed in double quotes.
All embedded quotes, newlines, and backslashes are preceded with a backslash."
  (setq string (replace-regexp-in-string "\\([\"\\]\\)" "\\\\\\&" string))
  (setq string (string-replace "\n" "\\n" string))
  (concat "\"" string "\""))