emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/gnuplot bef60ba 019/184: Create a gnuplot-comint buffer in


From: ELPA Syncer
Subject: [nongnu] elpa/gnuplot bef60ba 019/184: Create a gnuplot-comint buffer in gnuplot-show-gnuplot-buffer if none exists.
Date: Sun, 29 Aug 2021 11:03:07 -0400 (EDT)

branch: elpa/gnuplot
commit bef60babf7b885c851e67161630d73cc84702b63
Author: Jonathan Oddie <j.j.oddie@gmail.com>
Commit: Jonathan Oddie <j.j.oddie@gmail.com>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]