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
This commit is contained in:
Eric Schulte 2010-09-08 04:38:05 +00:00 committed by Carsten Dominik
parent c4644b9e00
commit 2a688e9aeb
1 changed files with 4 additions and 1 deletions

View File

@ -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)