"Dr. Volker Zell" <dr.volker.z...@oracle.com> writes:

>  o XEmacs 21.4 (patch 22) "Instant Classic" [Lucid] (i686-pc-cygwin, Mule) of 
> Sat Jan 31 2009 on vzell-de

Ah ... OK, this is a 21.4 issue.  The attached patch fixes it.

`write-contents-hooks' is not buffer-local by default in 21.4, which is
why the the hook for exiting the org-src mode gets run when anything
saved, and that checks for the mode.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 0ac8e6c..63c749c 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -644,8 +644,11 @@ the language, a switch telling if the content should be in 
a single line."
          (setq buffer-file-name
                (concat (buffer-file-name (marker-buffer 
org-edit-src-beg-marker))
                        "[" (buffer-name) "]"))
-         (set (if (featurep 'xemacs) 'write-contents-hooks 
'write-contents-functions)
-              '(org-edit-src-save)))
+         (if (featurep 'xemacs)
+             (progn
+               (make-variable-buffer-local 'write-contents-hooks) ; needed 
only for 21.4
+               (setq write-contents-hooks '(org-edit-src-save)))
+           (setq write-contents-functions '(org-edit-src-save))))
       (setq buffer-read-only t))))
 
 (org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer)
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to