emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] PATCH: Xemacs incompatibilities


From: Michael Sperber
Subject: [Orgmode] PATCH: Xemacs incompatibilities
Date: Mon, 24 May 2010 10:39:48 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.5-b29 (darwin)

"Dr. Volker Zell" <address@hidden> 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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]