* org-capture.el (org-capture-get-indirect-buffer): Fix XEmacs
authorMichael Sperber <sperber@deinprogramm.de>
Wed, 26 Oct 2011 17:43:07 +0000 (19:43 +0200)
committerBastien Guerry <bzg@altern.org>
Wed, 26 Oct 2011 17:43:07 +0000 (19:43 +0200)
compatibility issue when creating an indirect buffer.

TINYCHANGE

lisp/org-capture.el

index e1b8a4f..d4ae1bc 100644 (file)
@@ -1213,8 +1213,10 @@ Use PREFIX as a prefix for the name of the indirect buffer."
       (setq bname (concat prefix "-" (number-to-string (incf n)) "-" base)))
     (condition-case nil
         (make-indirect-buffer buffer bname 'clone)
-      (error (make-indirect-buffer buffer bname)))))
-
+      (error
+       (let ((buf (make-indirect-buffer buffer bname)))
+        (with-current-buffer buf (org-mode))
+        buf)))))
 
 (defun org-capture-verify-tree (tree)
   "Throw error if TREE is not a valid tree"