branch: elpa/gnuplot
commit bef60babf7b885c851e67161630d73cc84702b63
Author: Jonathan Oddie <[email protected]>
Commit: Jonathan Oddie <[email protected]>
Create a gnuplot-comint buffer in gnuplot-show-gnuplot-buffer if none
exists.
---
gnuplot.el | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/gnuplot.el b/gnuplot.el
index ba17e21..2b70930 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -2193,19 +2193,19 @@ When `gnuplot-display-process' is nil this will switch
to
the gnuplot process buffer. When that variable is non-nil, the
gnuplot process buffer will be displayed in a window."
(interactive)
- (if (and gnuplot-buffer (get-buffer gnuplot-buffer))
- (cond ((equal gnuplot-display-process 'window)
- (switch-to-buffer-other-window gnuplot-buffer))
- ((equal gnuplot-display-process 'frame)
- (or (and gnuplot-process-frame
- (frame-live-p gnuplot-process-frame))
- (setq gnuplot-process-frame (make-frame)))
- (raise-frame gnuplot-process-frame)
- (select-frame gnuplot-process-frame)
- (switch-to-buffer gnuplot-buffer))
- (t
- (switch-to-buffer gnuplot-buffer)))
- (message "There is not an active Gnuplot process.")))
+ (unless (and gnuplot-buffer (get-buffer gnuplot-buffer))
+ (gnuplot-make-gnuplot-buffer))
+ (cond ((equal gnuplot-display-process 'window)
+ (switch-to-buffer-other-window gnuplot-buffer))
+ ((equal gnuplot-display-process 'frame)
+ (or (and gnuplot-process-frame
+ (frame-live-p gnuplot-process-frame))
+ (setq gnuplot-process-frame (make-frame)))
+ (raise-frame gnuplot-process-frame)
+ (select-frame gnuplot-process-frame)
+ (switch-to-buffer gnuplot-buffer))
+ (t
+ (switch-to-buffer gnuplot-buffer))))
;;; --- miscellaneous functions: insert file name, indentation, negation