summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-09-08 04:38:05 +0000
committerCarsten Dominik <carsten.dominik@gmail.com>2010-09-14 14:03:15 +0200
commit2a688e9aebb898723e4016b535dbdffa5b2cb86e (patch)
tree467d4d9a2ef5d625b631a21cb5be9589a4128a88
parentc4644b9e00f78e2b5aec735732e6c9a9fe48e44a (diff)
downloadorg-mode-2a688e9aebb898723e4016b535dbdffa5b2cb86e.tar.gz
Explicitly mention when a language-mode throws an error
Hi, The attached patch makes it clear when a language mode has thrown an error. This can clear up confusion whether an error is originating from Org-mode or form the language-mode in question. Should this be committed? Best -- Eric
-rw-r--r--lisp/org-src.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-src.el b/lisp/org-src.el
index d1948cc..233058a 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -276,7 +276,10 @@ buffer."
(unless preserve-indentation
(setq total-nindent (or (org-do-remove-indentation) 0)))
(let ((org-inhibit-startup t))
- (funcall lang-f))
+ (condition-case e
+ (funcall lang-f)
+ (error
+ (error "Language mode `%s' fails with: %S" lang-f (nth 1 e)))))
(set (make-local-variable 'org-edit-src-force-single-line) single)
(set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
(set (make-local-variable 'org-edit-src-allow-write-back-p) allow-write-back-p)