Function: org-escape-code-in-region

org-escape-code-in-region is an interactive and byte-compiled function defined in org-src.el.gz.

Signature

(org-escape-code-in-region BEG END)

Documentation

Escape lines between BEG and END.

Escaping happens when a line starts with "*", "#+", ",*" or
",#+" by appending a comma to it.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-src.el.gz
;;; Escape contents

(defun org-escape-code-in-region (beg end)
  "Escape lines between BEG and END.
Escaping happens when a line starts with \"*\", \"#+\", \",*\" or
\",#+\" by appending a comma to it."
  (interactive "r")
  (save-excursion
    (goto-char end)
    (while (re-search-backward "^[ \t]*\\(,*\\(?:\\*\\|#\\+\\)\\)" beg t)
      (save-excursion (replace-match ",\\1" nil nil nil 1)))))