message.el (message-pop-to-buffer): Use pop-to-buffer instead of pop-to-buffer-same...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 7 Dec 2011 06:07:58 +0000 (06:07 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 7 Dec 2011 06:07:58 +0000 (06:07 +0000)
lisp/ChangeLog
lisp/message.el

index 9d570f2..d8e264a 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-07  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * message.el (message-pop-to-buffer): Use pop-to-buffer instead of
+       pop-to-buffer-same-window for old Emacsen.
+
 2011-12-06  Juanma Barranquero  <lekktu@gmail.com>
 
        * gnus-sum.el (gnus-summary-make-tool-bar): Fix typo.
index ecb6dbd..d87f7b3 100644 (file)
@@ -6388,7 +6388,11 @@ between beginning of field and beginning of line."
                               "Message already being composed; erase? ")
                            (message nil))))
            (error "Message being composed")))
-      (funcall (or switch-function #'pop-to-buffer-same-window) name)
+      (funcall (or switch-function
+                  (if (fboundp #'pop-to-buffer-same-window)
+                      #'pop-to-buffer-same-window
+                    #'pop-to-buffer))
+              name)
       (set-buffer name))
     (erase-buffer)
     (message-mode)))