]> code.delx.au - gnu-emacs/blobdiff - lisp/org/org-src.el
Try and be more careful about propagation of lexical environment.
[gnu-emacs] / lisp / org / org-src.el
index c4f0065ec34fd10a8369e042e41f584876bc468a..c932b4a70b288b57655a77c9384e4c0677ec7718 100644 (file)
@@ -8,7 +8,7 @@
 ;;         Dan Davison <davison at stats dot ox dot ac dot uk>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 7.3
+;; Version: 7.4
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -240,8 +240,8 @@ buffer."
            block-nindent (nth 5 info)
            lang-f (intern (concat lang "-mode"))
            begline (save-excursion (goto-char beg) (org-current-line)))
-      (if (and mark (>= mark beg) (<= mark end))
-         (save-excursion (goto-char mark)
+      (if (and mark (>= mark beg) (<= mark (1+ end)))
+         (save-excursion (goto-char (min mark end))
                          (setq markline (org-current-line)
                                markcol (current-column))))
       (if (equal lang-f 'table.el-mode)