1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-27 07:37:25 +00:00

Fixed bug in examplization

* lisp/ob.el (org-babel-examplize-region): Fixed bug in examplization.
This commit is contained in:
Eric Schulte 2012-03-01 11:37:37 -07:00
parent 8506c90c4b
commit 9e3b41d1a4

View File

@ -1955,7 +1955,8 @@ file's directory then expand relative links."
(defun org-babel-examplize-region (beg end &optional results-switches)
"Comment out region using the inline '==' or ': ' org example quote."
(interactive "*r")
(flet ((chars-between (b e) (string-match "[\\S]" (buffer-substring b e))))
(flet ((chars-between (b e)
(not (string-match "^[\\s]*$" (buffer-substring b e)))))
(if (or (chars-between (save-excursion (goto-char beg) (point-at-bol)) beg)
(chars-between end (save-excursion (goto-char end) (point-at-eol))))
(save-excursion