@@ -837,18 +837,16 @@ create a `gnuplot-mode' buffer."
837837 (boolean :tag " Enabled" t )))))
838838
839839
840- (defvar gnuplot-gui-popup-flag )
841- (defvar gnuplot-insertions-bottom ()
840+ (defvar gnuplot-insertions-bottom
841+ '(" ---"
842+ [" Display of info with insertion" gnuplot-toggle-info-display
843+ :style toggle :selected gnuplot-insertions-show-help-flag]
844+ [" Display GUI popup with insertion" gnuplot-gui-toggle-popup
845+ :active t
846+ :style toggle :selected gnuplot-gui-popup-flag])
842847 " Bottom part of the insertions menu.
843848This part contains the toggle buttons for displaying info or
844849opening an argument-setting popup." )
845- (setq gnuplot-insertions-bottom
846- '(" ---"
847- [" Display of info with insertion" gnuplot-toggle-info-display
848- :style toggle :selected gnuplot-insertions-show-help-flag]
849- [" Display GUI popup with insertion" gnuplot-gui-toggle-popup
850- :active t
851- :style toggle :selected gnuplot-gui-popup-flag]))
852850
853851(defun gnuplot-setup-menubar ()
854852 " Initial setup of gnuplot and insertions menus."
@@ -2130,7 +2128,8 @@ shown."
21302128 (setq topic (downcase (match-string 2 string))
21312129 term (match-string 4 string))
21322130 (if (string= topic " terminal" ) (setq topic (downcase term )))))
2133- (cond (gnuplot-gui-popup-flag
2131+ (cond ((and (bound-and-true-p gnuplot-gui-popup-flag)
2132+ (fboundp 'gnuplot-gui-set-options-and-insert ))
21342133 (gnuplot-gui-set-options-and-insert))
21352134 (gnuplot-insertions-show-help-flag
21362135 (if gnuplot-keywords-pending ; <HW>
@@ -2232,7 +2231,6 @@ a list:
22322231 (setq-local font-lock-multiline t )
22332232 (setq-local parse-sexp-lookup-properties t )
22342233
2235- (require 'gnuplot-gui )
22362234 (setq gnuplot-first-call nil ; a few more details ...
22372235 gnuplot-comint-recent-buffer (current-buffer ))
22382236 (setq-local comint-process-echoes gnuplot-echo-command-line-flag)
0 commit comments