From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Sperber Subject: PATCH: Xemacs incompatibilities Date: Mon, 24 May 2010 10:39:48 +0200 Message-ID: References: <7z632uzu5k.fsf@vzell-de.de.oracle.com> <7z1vd67cwp.fsf@vzell-de.de.oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=50880 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGTCV-0003JS-Em for emacs-orgmode@gnu.org; Mon, 24 May 2010 04:39:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGTCT-0006ZU-M7 for emacs-orgmode@gnu.org; Mon, 24 May 2010 04:39:55 -0400 Received: from h615406.serverkompetenz.net ([81.169.143.132]:55930) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGTCT-0006Z1-GK for emacs-orgmode@gnu.org; Mon, 24 May 2010 04:39:53 -0400 In-Reply-To: <7z1vd67cwp.fsf@vzell-de.de.oracle.com> (Volker Zell's message of "Thu, 20 May 2010 18:31:34 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Dr. Volker Zell" Cc: Dan Davison , mailing-list-org-mode Mode , Carsten Dominik --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable "Dr. Volker Zell" writes: > o XEmacs 21.4 (patch 22) "Instant Classic" [Lucid] (i686-pc-cygwin, Mu= le) 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. --=20 Cheers =3D8-} Mike Friede, V=F6lkerverst=E4ndigung und =FCberhaupt blabla --=-=-= Content-Disposition: inline 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) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=--