8181(require 'info )
8282(require 'info-look )
8383
84- (declare-function 'eldoc-add-command " eldoc" )
85-
8684(defgroup gnuplot nil
8785 " Gnuplot-mode for Emacs."
8886 :prefix " gnuplot-"
@@ -251,6 +249,11 @@ beginning the continued command."
251249These are set by `gnuplot--set-keywords-list' from the values in
252250`info-lookup-cache' ." )
253251
252+ (autoload 'gnuplot-context-sensitive-mode " gnuplot-context" )
253+ (autoload 'gnuplot-gui-set-options-and-insert " gnuplot-gui" nil t )
254+ (autoload 'gnuplot-gui-swap-simple-complete " gnuplot-gui" nil t )
255+ (autoload 'gnuplot-gui-toggle-popup " gnuplot-gui" nil t )
256+
254257(defcustom gnuplot-use-context-sensitive-completion t
255258 " Non-nil if `gnuplot-context-sensitive-mode' should be enabled by default.
256259
@@ -263,15 +266,14 @@ suggestions."
263266 (set sym value)
264267 (cond
265268 (value
266- (add-hook 'gnuplot-mode-hook 'gnuplot-context-sensitive-mode nil nil )
267- (add-hook 'gnuplot-comint-mode-hook 'gnuplot-context-sensitive-mode nil nil ))
269+ (add-hook 'gnuplot-mode-hook # 'gnuplot-context-sensitive-mode nil nil )
270+ (add-hook 'gnuplot-comint-mode-hook # 'gnuplot-context-sensitive-mode nil nil ))
268271 (t
269- (remove-hook 'gnuplot-mode-hook 'gnuplot-context-sensitive-mode )
270- (remove-hook 'gnuplot-comint-mode-hook 'gnuplot-context-sensitive-mode )))
272+ (remove-hook 'gnuplot-mode-hook # 'gnuplot-context-sensitive-mode )
273+ (remove-hook 'gnuplot-comint-mode-hook # 'gnuplot-context-sensitive-mode )))
271274 (dolist (buffer (buffer-list ))
272275 (with-current-buffer buffer
273- (when (and (derived-mode-p 'gnuplot-mode 'gnuplot-comint-mode )
274- (fboundp 'gnuplot-context-sensitive-mode ))
276+ (when (derived-mode-p 'gnuplot-mode 'gnuplot-comint-mode )
275277 (gnuplot-context-sensitive-mode (if value 1 0 ))))))
276278 :link '(emacs-commentary-link " gnuplot-context" ))
277279
@@ -344,7 +346,7 @@ non-nil."
344346 (let ((map (make-sparse-keymap )))
345347 (define-key map " \C -c\C -b" #'gnuplot-send-buffer-to-gnuplot )
346348 (define-key map " \C -c\C -c" #'comment-region ) ; <RF>
347- (define-key map " \C -c\C -o" 'gnuplot-gui-set-options-and-insert )
349+ (define-key map " \C -c\C -o" # 'gnuplot-gui-set-options-and-insert )
348350 (define-key map " \C -c\C -e" #'gnuplot-show-gnuplot-buffer )
349351 (define-key map " \C -c\C -f" #'gnuplot-send-file-to-gnuplot )
350352 (define-key map " \C -c\C -d" #'gnuplot-info-lookup-symbol )
@@ -360,7 +362,7 @@ non-nil."
360362 (define-key map " \C -i" #'indent-for-tab-command )
361363 (define-key map (kbd " }" ) #'gnuplot-electric-insert )
362364 (define-key map " \M -\t " #'completion-at-point )
363- (define-key map [S-mouse-2] 'gnuplot-gui-set-options-and-insert )
365+ (define-key map [S-mouse-2] # 'gnuplot-gui-set-options-and-insert )
364366
365367 map))
366368
@@ -1904,8 +1906,7 @@ shown."
19041906 (setq topic (downcase (match-string 2 string))
19051907 term (match-string 4 string))
19061908 (if (string= topic " terminal" ) (setq topic (downcase term )))))
1907- (cond ((and (bound-and-true-p gnuplot-gui-popup-flag)
1908- (fboundp 'gnuplot-gui-set-options-and-insert ))
1909+ (cond ((bound-and-true-p gnuplot-gui-popup-flag)
19091910 (gnuplot-gui-set-options-and-insert))
19101911 (gnuplot-insertions-show-help-flag
19111912 (when (eq gnuplot--info-keywords 'pending )
@@ -2007,8 +2008,6 @@ and then starts `gnuplot-mode'.
20072008It is convenient to bind this function to a global key sequence. For
20082009example, to make the F10 key open a gnuplot script buffer, put the
20092010following in your .emacs file:
2010- (autoload \\= 'gnuplot-make-buffer \" gnuplot\"
2011- \" open a buffer in gnuplot mode\" t)
20122011 (global-set-key [(f10)] \\= 'gnuplot-make-buffer)"
20132012 (interactive )
20142013 (switch-to-buffer gnuplot-gnuplot-buffer)
0 commit comments