Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use display-buffer instead of explicit horizontal splitting

Using display-buffer means Emacs decides based on its width whether to split
the REPL window horizontally or vertically.
  • Loading branch information...
commit 4934673ade6f2a55060bd3da7bbfb43b7a1479d6 1 parent a469367
@nurpax nurpax authored chrisdone committed
Showing with 8 additions and 9 deletions.
  1. +8 −9 haskell-interactive-mode.el
View
17 haskell-interactive-mode.el
@@ -101,15 +101,14 @@
(defun haskell-interactive-bring ()
"Bring up the interactive mode for this session."
(interactive)
- (let ((session (haskell-session)))
- (let ((buffer (haskell-session-interactive-buffer session)))
- (unless (and (find-if (lambda (window) (equal (window-buffer window) buffer))
- (window-list))
- (= 2 (length (window-list))))
- (delete-other-windows)
- (split-window-horizontally)
- (switch-to-buffer-other-window buffer)
- (other-window 1)))))
+ (let* ((session (haskell-session))
+ (buffer (haskell-session-interactive-buffer session)))
+ (unless (and (find-if (lambda (window) (equal (window-buffer window) buffer))
+ (window-list))
+ (= 2 (length (window-list))))
+ (delete-other-windows)
+ (display-buffer buffer)
+ (other-window 1))))
;;;###autoload
(defun haskell-interactive-switch ()
Please sign in to comment.
Something went wrong with that request. Please try again.