diff options
author | defanor <defanor@uberspace.net> | 2017-12-05 17:36:06 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-12-05 17:36:06 +0300 |
commit | 6b2677bd59b082096149c1581738eb749537f589 (patch) | |
tree | 4632b44be408b16fbeee90e461ce37a2ed4a7205 /pancake.el | |
parent | 014d75030c32347a5c040a2be3ed30142b969261 (diff) |
pancake-browse-url: use current buffer if it's a pancake buffer
Diffstat (limited to 'pancake.el')
-rw-r--r-- | pancake.el | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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." |