81
81
(require 'info )
82
82
(require 'info-look )
83
83
84
- (declare-function 'eldoc-add-command " eldoc" )
85
-
86
84
(defgroup gnuplot nil
87
85
" Gnuplot-mode for Emacs."
88
86
:prefix " gnuplot-"
@@ -251,6 +249,11 @@ beginning the continued command."
251
249
These are set by `gnuplot--set-keywords-list' from the values in
252
250
`info-lookup-cache' ." )
253
251
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
+
254
257
(defcustom gnuplot-use-context-sensitive-completion t
255
258
" Non-nil if `gnuplot-context-sensitive-mode' should be enabled by default.
256
259
@@ -263,15 +266,14 @@ suggestions."
263
266
(set sym value)
264
267
(cond
265
268
(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 ))
268
271
(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 )))
271
274
(dolist (buffer (buffer-list ))
272
275
(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 )
275
277
(gnuplot-context-sensitive-mode (if value 1 0 ))))))
276
278
:link '(emacs-commentary-link " gnuplot-context" ))
277
279
@@ -344,7 +346,7 @@ non-nil."
344
346
(let ((map (make-sparse-keymap )))
345
347
(define-key map " \C -c\C -b" #'gnuplot-send-buffer-to-gnuplot )
346
348
(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 )
348
350
(define-key map " \C -c\C -e" #'gnuplot-show-gnuplot-buffer )
349
351
(define-key map " \C -c\C -f" #'gnuplot-send-file-to-gnuplot )
350
352
(define-key map " \C -c\C -d" #'gnuplot-info-lookup-symbol )
@@ -360,7 +362,7 @@ non-nil."
360
362
(define-key map " \C -i" #'indent-for-tab-command )
361
363
(define-key map (kbd " }" ) #'gnuplot-electric-insert )
362
364
(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 )
364
366
365
367
map))
366
368
@@ -1904,8 +1906,7 @@ shown."
1904
1906
(setq topic (downcase (match-string 2 string))
1905
1907
term (match-string 4 string))
1906
1908
(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)
1909
1910
(gnuplot-gui-set-options-and-insert))
1910
1911
(gnuplot-insertions-show-help-flag
1911
1912
(when (eq gnuplot--info-keywords 'pending )
@@ -2007,8 +2008,6 @@ and then starts `gnuplot-mode'.
2007
2008
It is convenient to bind this function to a global key sequence. For
2008
2009
example, to make the F10 key open a gnuplot script buffer, put the
2009
2010
following in your .emacs file:
2010
- (autoload \\= 'gnuplot-make-buffer \" gnuplot\"
2011
- \" open a buffer in gnuplot mode\" t)
2012
2011
(global-set-key [(f10)] \\= 'gnuplot-make-buffer)"
2013
2012
(interactive )
2014
2013
(switch-to-buffer gnuplot-gnuplot-buffer)
0 commit comments