summaryrefslogtreecommitdiff
path: root/pancake.el
diff options
context:
space:
mode:
Diffstat (limited to 'pancake.el')
-rw-r--r--pancake.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/pancake.el b/pancake.el
index 03022be..c11edf5 100644
--- a/pancake.el
+++ b/pancake.el
@@ -168,9 +168,12 @@
`browse-url-browser-function'."
(when (or new-session (not (consp pancake-buffers)))
(pancake))
- (with-current-buffer (car pancake-buffers)
- (process-send-string pancake-process (concat url "\n"))
- (display-buffer (current-buffer))))
+ (let ((buffer (if (eq major-mode 'pancake-mode)
+ (current-buffer)
+ (car pancake-buffers))))
+ (with-current-buffer buffer
+ (process-send-string pancake-process (concat url "\n"))
+ (display-buffer (current-buffer)))))
(defun pancake-translate-color (name attr)
"Translate pancake colors into emacs faces."