forked from gnuplot/gnuplot-old
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgnuplot.el
More file actions
2578 lines (2397 loc) · 105 KB
/
gnuplot.el
File metadata and controls
2578 lines (2397 loc) · 105 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;;; gnuplot.el -- drive gnuplot from within emacs
;; Copyright (C) 1998 Phil Type and Bruce Ravel, 1999-2002 Bruce Ravel
;; Author: Bruce Ravel <[email protected]> and Phil Type
;; Maintainer: Bruce Ravel <[email protected]>
;; Created: June 28 1998
;; Updated: December 13, 2002
;; Version: 0.6.0
;; Keywords: gnuplot, plotting
;; This file is not part of GNU Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This lisp script is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
;;
;; Permission is granted to distribute copies of this lisp script
;; provided the copyright notice and this permission are preserved in
;; all copies.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; send bug reports to the author ([email protected])
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Commentary:
;;
;; This is a major mode for composing gnuplot scripts and displaying
;; their results using gnuplot. It is optimized for use with gnuplot
;; 3.7 or one of the later patchlevels of "version 3.6". It should
;; also work very handily with version 3.5. This mode offers several
;; tools to help you compose your scripts, including syntax
;; colorization using either font-lock or hilit19, a syntax table
;; appropriate to gnuplot, key bindings, pull-down menus, indentation,
;; keyword completions and variable customization using the Custom
;; package. Once the script is composed, there are several function
;; for sending some or all of the script to gnuplot. The interaction
;; with the gnuplot process is within a comint buffer.
;;
;; C-c C-l send current line to gnuplot
;; C-c C-v send current line to gnuplot and move forward 1 line
;; C-c C-r send current region to gnuplot
;; C-c C-b send entire buffer to gnuplot
;; C-c C-f send a file to gnuplot
;; C-c C-i insert filename at point
;; C-c C-n negate set option on current line
;; C-c C-c comment region
;; C-c C-o set arguments for command at point
;; S-mouse-2 set arguments for command under mouse cursor
;; C-c C-h read the gnuplot info file
;; C-c C-e show-gnuplot-buffer
;; C-c C-k kill gnuplot process
;; C-c C-u submit a bug report about gnuplot-mode
;; M-tab or M-ret complete keyword before point
;; ret newline and indent
;; tab indent current line
;;
;; Gnuplot-mode adds two key bindings to the comint buffer:
;; M-C-p plot the current script buffer line-by-line
;; M-C-f save the current script buffer and load that file
;;
;; These two functions are useful for starting up gnuplot-mode.
;;
;; M-x gnuplot-mode
;; start gnuplot-mode in the current buffer
;;
;; M-x gnuplot-make-buffer
;; open a new buffer (which is not visiting a file) and start
;; gnuplot-mode in that buffer
;;
;; ---------------------------------------------------------------------
;;
;; Other lisp files used by gnuplot.el
;;
;; info-look.el (comes with GNU Emacs 20):
;; This provides the interface to the gnuplot-info file and provides
;; on-line help and keyword completion functionality. The version
;; of info-look.el that comes with version 20.2 of Emacs contains a
;; bug that will impede its interaction with the gnuplot info file.
;; You should use the version from the gnuplot-mode homepage
;; instead. info-look is not distributed with XEmacs and so should
;; be installed along with gnuplot-mode when using XEmacs.
;;
;; gnuplot-gui.el (written by Bruce):
;; Defines the GUI interface for setting setting arguments to
;; gnuplot options. This uses the widget package extensively.
;;
;; ---------------------------------------------------------------------
;;
;; This mode was inspired by the original gnu-plot-mode by Gershon
;; Elber, which is distributed with gnuplot itself and which dates
;; back to the early 90's. Although this mode encompasses the
;; functionality of the original, the two share no code and the
;; current implementation takes advantage of many features of modern
;; versions of emacs and adheres (or so I intend) to the major mode
;; conventions described in the emacs-lisp reference for version 19
;; and later.
;;
;; ---------------------------------------------------------------------
;;
;; Installation
;; ============
;;
;; A recent version of this file can be found at
;; http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/
;;
;; To autoload gnuplot-mode on any file with gp extension, put this in
;; your .emacs file
;; (autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t)
;; (autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot-mode" t)
;;
;; Something like
;; (setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode))
;; auto-mode-alist))
;; is useful for having files ending in .gp start up in gnuplot-mode.
;;
;; Something like
;; (global-set-key [(f9)] 'gnuplot-make-buffer)
;; may be useful. This binds f9 to the function that opens a scratch
;; buffer (i.e. one that is not visiting a file) in gnuplot-mode.
;; This is handy for your quick 'n' dirty plotting chores.
;;
;; To use the `gnuplot-info-lookup-symbol' function, the file
;; gnuplot.info MUST be installed somewhere that info can find it.
;; This means you must either:
;; 1. Copy gnuplot.info to the normal info directory or
;; 2. Make sure info can find gnuplot.info by putting this in your
;; .emacs file:
;; (setenv "INFOPATH"
;; (concat (getenv "INFOPATH") ":"
;; (expand-file-name "/path/to/file")))
;; where "/path/to/file" is the location of gnuplot.info
;;
;; This had been tested extensively with Emacs 19.34 and 20.2 and
;; XEmacs 20.3 and in a limited manner with Emacs 19.30 and XEmacs
;; 19.14.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; History:
;;
;; 0.1 Jun 25 1998 Finished with initial release.
;; 0.2 Sep 4 1998 Added filename insertion, indentation, and
;; colorization/completion in comint buffer. <BR>
;; 0.2a Sep 11 1998 made `indent-line-function' buffer-local (whoops!)
;; and fixed some stuff in the installation script <BR>
;; 0.3 Sep 12 1998 include insertions menu <BR>
;; 0.3a Sep 14 1998 fixed bug finding info file if missing, fixed bug
;; starting font-lock, fixed bug re overwriting files in
;; installation script <BR>
;; 0.3b Sep 15 1998 Added (require 'info) to `(eval-and-compile'
;; clause, Added (kill-all-local-variables) to `gnuplot-mode',
;; altered order of:-
;; (provide 'gnuplot)
;; (run-hooks 'gnuplot-load-hook)
;; at the end of the file in case something in the load hook
;; requires gnuplot (oh not that old one again...), added
;; `gnuplot-comint-setup-hook', corrected `gnuplot-mark-active'
;; which caused an error to be raised by (mark) when the mark
;; was inactive <DB> Some changes to font-lock rules <LB>&<BR>
;; 0.4 Nov 14 1998 <BR> Use info-look for info interface. No
;; change to gnuplot-mode user interface, but cleaner code.
;; With info-look, the help funcion works regardless of the
;; version number of gnuplot. Also, `gnuplot-keywords' (used
;; for help, keyword-completion, and hilit19 highlighting) is
;; now generated automatically.
;; 0.4a Nov 18 1998 <BR> info-look leaves a couple of really useless
;; buffers lying around so I cleaned them up. Also fixed
;; font-lock rules so that things in quotes get highlighted
;; correctly and the surrounding text is unhighlighted. Fixed
;; up font-lock rules for plot and splot. Added
;; `gnuplot-send-line-and-forward' as suggested by <MD>.
;; 0.4b Nov 21 1998 <BR> added toolbar for xemacs -- see file
;; gnuplot-toolbar.el. fixed error message in plot line
;; function when line is empty. option added to display the
;; comint buffer showing the gnuplot process in a separate
;; frame
;; 0.4c Minor stuff: Nov 30 1998 <BR> fixed highlighting in comint
;; buffer. fixed frame behavior. added "[:]" to range
;; insertions. added :link to defgroup. Dec 1 1998 <BR> fixed
;; some mismatched defcustoms. added a few lines to suppress
;; some compile-time warnings. Dec 3 1998 <BR> Fixed behavior
;; of filename insertion function. Added more :links to
;; defgroup.
;; 0.4d Dec 6 1998 <BR> Added function gnuplot-setup-info-look and
;; variable gnuplot-info-hook to handle various versions of the
;; gnuplot info file.
;; 0.4e Dec 12 1998 <BR> Split up gnuplot-insertions-menu for ease of
;; custimization, put menubar initialization in a function.
;; 0.4f Dec 14 1998 <BR> defcustom the insertions submenus, add
;; gnuplot-insertion-menu-flag, intelligent Makefile knows
;; which info-look to compile
;; 0.5 Dec 27 1998 <BR> wrote initial draft of gnuplot-gui.el,
;; included it in insertions menu and in `gnuplot-insert'.
;; Negate option function, bound to C-c C-n. Dec 29 1998 <BR>
;; C-c C-h with no response goes to Commands menu. Transparent
;; toolbar icons. Replace kw-compl with a simple completion
;; function. Put gnuplot-toolbar code in gnuplot.el.
;; 0.5a Jan 23 1999 <BR> send file uses the load command. add
;; gnuplot-plot-from-comint and
;; gnuplot-save-and-plot-from-comint and keybindings in the
;; comint buffer. do (process-kill-without-query
;; gnuplot-process nil). `gnuplot-negate-option' checks if set
;; option has a negated form.
;; 0.5b `gnuplot-kill-gnuplot-buffer' made more robust. fixed a bug
;; in `gnuplot-plot-from-comint'. fixed description of
;; gnuplot-faces group.
;; 0.5c update copyright information, update gpelcard
;; 0.5d Mar 20 1999 <BR> adopt installation materials from <LH>. Add
;; some support for hidden3d. Use constants in types alists in
;; gui. Various other minor improvements to the types alists.
;; 0.5e Apr 6 1999 <BR> at the suggestion of <SE> I did away with the
;; gnuplot-which-highlight variable and revamped how
;; colorization gets turned on. This is a bit tricky since I
;; want it to work with font-lock under emacs and xemacs and
;; with hilit19. Apr 11 1999 <BR> insert space at end of
;; unique completion. add a few GUI types, rewrite some stuff
;; in the GUI interface. primitive support for plot, splot,
;; and fit. Fixed completion in file widget.
;; 0.5f May 15 1999 <BR> Add pgnuplot.c and Win9x install instructions
;; to the distribution. Fixed a defface bug. Added
;; `gnuplot-keywords-when' allowing deferral of parsing the
;; info file.
;; 0.5g May 27 1999 <BR> Fixed font-locking of strings and
;; comments. Figure out gnuplot-version number from startup
;; message and set `gnuplot-echo-command-line-flag'
;; accordingly. Added `gnuplot-program-version' variable.
;; Check that font-lock is actually a feature, as suggested by
;; <KL>
;; 0.5h Aug 15 1999 <BR> Added `gnuplot-determine-gnuplot-version' so
;; that the gnuplot version number and `comint-process-echos'
;; actually get set correctly. Actually, the first time
;; something is plotted, the echoing might not work, but the
;; second time it will.
;; 0.5i Sep 2 1999 <BR> Once again changed how
;; `comint-process-echos' gets set. Maybe I got it right this
;; time? Also fixed certain situations where the info file
;; did notget properly loaded (insertion with info toggle on
;; and info button in GUI).
;; 0.5j Sep 9 1999 <BR> Do a more robust check for the gnuplot
;; process before killing the gnuplot buffer, as suggested by
;; <SE>.
;; 0.5k Sep 22 1999 <BR> make `gnuplot-send-line-and-forward' skip
;; over blank and comment lines as suggested by <SE>. Jan 10
;; 2000 Bound C-c C-j to `gnuplot-forward-script-line'.
;; 0.5l Nov 16 2000 <BR> support for pm3d in gnuplot-gui and in plot
;; options insertions menu. mentioned pm3d in gpelcard. gui
;; support for x11 pm3d and vgagl terms.
;; `gnuplot-negate-option' works with new syntax.
;; 0.5m Nov 17 2000 <BR> add colorization and gui support for new
;; commands in 3.8. gui support for emf term. gui support for
;; new "set style" syntax. much better scheme for determining
;; gnuplot version number + make better use of it.
;; 0.5n Jan 4 2001 <BR> corrected a serious problem interacting with
;; speedbar
;; 0.5o skipped
;; 0.5p Mar 14 2001 <BR> fixed problem with toolbar creation and
;; speedbar clicking
;; 0.5q May 30 2001 <BR> added font-lock bindings for words associated
;; with plotting
;; 0.5r Oct 17 2001 <BR> Incorporate two suggestions by <RF>, bind
;; C-c C-c to comment-region and C-c C-o to the GUI, also make
;; C-c C-l respect continuation lines
;; April 12, 2002 <BR> added feature to trim length of gnuplot
;; process buffer
;; 0.5s Jun 7 2002 <BR> Yet again changed how `comint-process-echos'
;; gets set. It really needs to be nil on NTEmacs 21.1 or
;; comint gets stuck in an infinate loop.
;; 0.5t Sep 16 2002 <BR> Fixed a problem with C-c C-v jumping
;; forward 2 lines at a time
;; 0.6.0 Dec 13 2002 <BR> Changed numbering scheme to accommodate
;; gnuplot packaging requirements
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Acknowledgements:
;; David Batty <DB> (numerous corrections)
;; Laurent Bonnaud <LB> (suggestions regarding font-lock rules)
;; Markus Dickebohm <MD> (suggested `gnuplot-send-line-and-forward')
;; Stephen Eglan <SE> (suggested the use of info-look,
;; contributed a bug fix regarding shutting
;; down the gnuplot process, improvement to
;; `gnuplot-send-line-and-forward')
;; Robert Fenk <RF> (suggested respecting continuation lines)
;; Michael Karbach <MK> (suggested trimming the gnuplot process buffer)
;; Alex Chan Libchen <AL> (suggested font-lock for plotting words)
;; Kuang-Yu Liu <KL> (pointed out buggy dependence on font-lock)
;; Hrvoje Niksic <HN> (help with defcustom arguments for insertions)
;; Andreas Rechtsteiner <AR> (pointed out problem with C-c C-v)
;; Michael Sanders <MS> (help with the info-look interface)
;; Jinwei Shen <JS> (suggested functionality in comint buffer)
;; Michael M. Tung <MT> (prompted me to add pm3d support)
;; Holger Wenzel <HW> (suggested using `gnuplot-keywords-when')
;; Wolfgang Zocher <WZ> (pointed out problem with gnuplot-mode + speedbar)
;; and especially to Lars Hecking <LH> for including gnuplot-mode
;; with the gnuplot 3.7-beta distribution and for providing me with
;; installation materials
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; To Do:
;;
;; 1. Since `gnuplot-display-process' can be nil, it would be
;; handy to have a function to put on
;; `gnuplot-after-plot-buffer-hook' to check and see if the script
;; executed properly. Alas I am not sure how gnuplot signals its
;; errors.
;; 2. improve plot, splot, fit in GUI
;; 3. interface to setting bind command using `read-key-sequence'.
;; this is a pain because the nomenclature is really different in
;; gnuplot than in `read-key-sequence'
;;
;;; Bugs:
;;
;; -- indentation is not quite right (but close)
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Code:
(require 'comint)
(require 'easymenu)
;;; --- variable definitions + eval-and-compile clauses
;; handle defcustom
(eval-and-compile
(condition-case ()
(require 'custom)
(error nil))
(if (and (featurep 'custom) (fboundp 'custom-declare-variable))
nil ;; We've got what we needed
;; We have the old custom-library, hack around it!
(if (fboundp 'defgroup)
nil
(defmacro defgroup (&rest args)
nil))
(if (fboundp 'defface)
nil
(defmacro defface (var values doc &rest args)
(` (progn
(defvar (, var) (quote (, var)))
;; To make colors for your faces you need to set your .Xdefaults
;; or set them up ahead of time in your .emacs file.
(make-face (, var))
))))
(if (fboundp 'defcustom)
nil
(defmacro defcustom (var value doc &rest args)
(` (defvar (, var) (, value) (, doc)))))))
;; (eval-and-compile
;; (condition-case ()
;; (require 'kw-compl)
;; (error nil)))
(eval-and-compile ;; <DB>
(require 'info))
(eval-and-compile
(condition-case ()
(require 'info-look)
(error nil)))
;; this just gets rid of an annoying compile time error message
;; (eval-when-compile
;; (defun gnuplot-dummy ())
;; (defalias 'hilit-set-mode-patterns 'gnuplot-dummy))
(defconst gnuplot-xemacs-p (string-match "XEmacs" (emacs-version)))
(defconst gnuplot-ntemacs-p (string-match "msvc" (emacs-version)))
(defvar gnuplot-three-eight-p "")
(defconst gnuplot-maintainer "Bruce Ravel")
(defconst gnuplot-maintainer-url
"http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/")
(defconst gnuplot-version "0.6.0")
(defgroup gnuplot nil
"Gnuplot-mode for Emacs."
:prefix "gnuplot-"
:group 'processes
:group 'applications
:group 'local
:link '(emacs-library-link :tag "Lisp File" "gnuplot.el")
:link '(url-link :tag "Homepage"
"http://feff.phys.washington.edu/~ravel/software/gnuplot-mode/")
:link '(custom-manual "(gnuplot)Top")
:link '(emacs-commentary-link :tag "Commentary" "gnuplot.el") )
(defgroup gnuplot-insertions nil
"Insert commands into gnuplot-scripts from a pull-down menu."
:prefix "gnuplot-insertions-"
:group 'gnuplot)
(defgroup gnuplot-hooks nil
"Hook variables used by `gnuplot-mode'."
:prefix "gnuplot-"
:group 'gnuplot)
(defcustom gnuplot-mode-hook nil
"*Hook run when `gnuplot-mode' is entered."
:group 'gnuplot-hooks
:type 'hook)
(defcustom gnuplot-load-hook nil
"*Hook run when gnuplot.el is first loaded."
:group 'gnuplot-hooks
:type 'hook)
(defcustom gnuplot-after-plot-hook nil
"*Hook run after gnuplot plots something.
This is the last thing done by the functions for plotting a line, a
region, a buffer, or a file."
:group 'gnuplot-hooks
:type 'hook)
(defcustom gnuplot-info-hook nil
"*Hook run before setting up the info-look interface.
This hook is necessary to handle inconsistencies in versions of and
sources of the gnuplot info file. If Gnuplot-mode can find the info
file generated from the 3.6beta patchlevel 347 (or later) release of
Gnuplot, then this hook probably is not necessary. Some versions of
the info file may have a General Index session, which can be used by
info-look. In that case the following (or something similar with the
value of `info-lookup-symbol-alist' altered appropriately) should be
placed in the .emacs file.
Emacs version 20.2 ships with a different version of info-look that
does 20.3. If you use any version of Emacs 19, you must use the
version from 20.2. Any version of XEmacs 20 or 21 should use the
version from 20.3 but can use either. XEmacs 19 should use the
version 20.2.
For the newer version of info-look, do this:
(add-hook \'gnuplot-info-hook
\'(lambda ()
(let ((elem (assoc \'gnuplot-mode info-lookup-alist)))
(delete elem info-lookup-alist)
(info-lookup-maybe-add-help
:mode 'gnuplot-mode :topic 'symbol
:regexp \"[a-zA-Z][_a-zA-Z0-9]*\"
:doc-spec '((\"(gnuplot)General Index\" nil
\"[_a-zA-Z0-9]+\"))))))
For the older version of info-look, do this:
(add-hook \'gnuplot-info-hook
\'(lambda ()
(let ((elem (assoc \'gnuplot-mode info-lookup-alist)))
(delete elem info-lookup-alist)
(setq info-lookup-alist
(append info-lookup-alist
\'((gnuplot-mode
\"[a-zA-Z][_a-zA-Z0-9]*\" nil
((\"(gnuplot)General Index\" nil
\"[_a-zA-Z0-9]+\" )))))))))"
:group 'gnuplot-hooks
:type 'hook)
;; comint hook suggested by <DB>
(defcustom gnuplot-comint-setup-hook nil
"*Hook run after setting up the gnuplot buffer in comint mode.
So the configuration can be customised by the user."
:group 'gnuplot-hooks
:type 'hook)
(defvar gnuplot-recently-sent nil
"This is a record of the most recent kind of text sent to gnuplot.
It takes as its value nil, 'line, 'region, 'buffer, or 'file. It is
useful for functions included in `gnuplot-after-plot-hook'.")
(make-variable-buffer-local 'gnuplot-recently-sent)
(defcustom gnuplot-program "gnuplot"
"*The name of the gnuplot executable."
:group 'gnuplot
:type 'string)
(defvar gnuplot-program-version nil
"Version number of gnuplot.
This is found using `gnuplot-determine-gnuplot-version")
(defcustom gnuplot-process-name "gnuplot"
"Name given to the gnuplot buffer and process."
:group 'gnuplot
:type 'string)
(defvar gnuplot-buffer nil
"*The name of the buffer displaying the gnuplot process.")
(defvar gnuplot-process nil
"Variable holding the process handle.")
(defvar gnuplot-process-frame nil
"The frame for displaying the gnuplot process.
This is used when `gnuplot-display-process' is equal to 'frame.")
(defvar gnuplot-comint-recent-buffer nil
"The most recently plotted gnuplot script buffer.
This is used by the function that plot from the comint buffer. It is
reset every time something is plotted from a script buffer.")
(defcustom gnuplot-gnuplot-buffer "plot.gp"
"*The name of the gnuplot scratch buffer opened by 'gnuplot-make-buffer'."
:group 'gnuplot
:type 'string)
(defcustom gnuplot-display-process 'window
"This controls how the gnuplot process buffer is displayed.
The values are
'frame display gnuplot process in a separate frame
'window display gnuplot process in this frame but in another window
nil `gnuplot-process' is in the current frame but not displayed"
:group 'gnuplot
:type '(radio (const :tag "Separate frame" frame)
(const :tag "Separate window" window)
(const :tag "Not displayed" nil)))
(defcustom gnuplot-info-display 'window
"*Determines how `gnuplot-info-lookup-symbol' displays the info file.
The values are
'frame display info file in a separate frame
'window display info file in another window
nil display info file in the current window"
:group 'gnuplot
:type '(radio (const :tag "Separate frame" frame)
(const :tag "Separate window" window)
(const :tag "This window" nil)))
(defcustom gnuplot-echo-command-line-flag (not gnuplot-ntemacs-p)
"*This sets the fall-back value of `comint-process-echos'.
If `gnuplot-mode' cannot figure out what version number of gnuplot
this is, then the value of this variable will be used for
`comint-process-echos'. It seems that gnuplot 3.5 wants this to be
nil and 3.7 wants it to be t. If lines that you send to gnuplot from
the `gnuplot-mode' buffer are not appearing at the gnuplot prompt in
the process buffer, try toggling it. Also see the document string for
`comint-process-echos'. If you change this, kill the gnuplot process
and start it again."
:group 'gnuplot
:type 'boolean)
(defcustom gnuplot-insertions-show-help-flag nil
"*Non-nil means to display certain help messages automatically.
These messages are shown after menu insertion of gnuplot commands."
:group 'gnuplot-insertions
:type 'boolean)
(defcustom gnuplot-delay 0.01
"*Amount of time to delay before sending a new line to gnuplot.
This is needed so that the the line is not written in the gnuplot
buffer in advance of its prompt. Increase this number if the
prompts and lines are displayed out of order."
:group 'gnuplot
:type 'number)
(defcustom gnuplot-buffer-max-size 1000
"*The maximum size in lines of the gnuplot process buffer.
Each time text is written in the gnuplot process buffer, lines are
trimmed from the beginning of the buffer so that the buffer is this
many lines long. The lines are deleted after the most recent lines
were interpretted by gnuplot. Setting to 0 turns off this feature
(i.e. no lines get trimmed)."
:group 'gnuplot
:type 'integer)
(defcustom gnuplot-quote-character "\'"
"*Quotation character used for inserting quoted strings.
Gnuplot can use single or double quotes. If you prefer to have the
filename insertion function never insert quotes for you, set this
to the empty string."
:group 'gnuplot
:type '(radio (const :tag "double quote" "\"")
(const :tag "single quote" "\'")
(const :tag "none" "" )))
;; (defcustom gnuplot-gnuplot-version nil
;; "*Force gnuplot-mode to behave for this version of gnuplot."
;; :group 'gnuplot
;; :type '(radio (const :tag "unspecified" nil)
;; (const :tag "3.8 or newer" "3.8")
;; (const :tag "3.7 or older" "3.7")))
(defvar gnuplot-info-frame nil)
(defvar gnuplot-info-nodes '())
(defvar gnuplot-first-call t)
;; with info-look, there is no need to carry this list around -- it
;; can be generated on the fly appropriate to the currently installed
;; version of gnuplot.info
(defvar gnuplot-keywords nil
"A list of keywords used in GNUPLOT.
These are set by `gnuplot-set-keywords-list' from the values in
`info-lookup-cache'.")
(defvar gnuplot-keywords-pending t ;; <HW>
"A boolean which gets toggled when the info file is probed.")
(defcustom gnuplot-keywords-when 'deferred ;; 'immediately
"This variable controls when the info file is parsed.
The choices are immediately upon starting gnuplot-mode or the first
time that data is needed. If you use hilit19, then the info file is
parsed immediately regardless of the value of this variable. But
you're not using that musty old thing, are you..."
:group 'gnuplot
:type
'(radio (const :tag "Parse info file when gnuplot-mode starts" immediately)
(const :tag "Parse info file the first time it is needed" deferred)))
(defgroup gnuplot-faces nil
"Text faces used by gnuplot-mode."
:prefix "gnuplot-"
:group 'gnuplot)
(cond ((and (featurep 'custom) (fboundp 'custom-declare-variable))
(defface gnuplot-prompt-face '((((class color))
(:foreground "firebrick"))
(t
(:bold t :underline t)))
"Face used for the prompt in the gnuplot process buffer."
:group 'gnuplot-faces))
(t
(make-face 'gnuplot-prompt-face)
(set-face-foreground 'gnuplot-prompt-face "firebrick")))
;;; --- key bindings and menus
(defvar gnuplot-mode-map nil)
(if gnuplot-mode-map
()
(setq gnuplot-mode-map (make-sparse-keymap))
(define-key gnuplot-mode-map "\C-c\C-b" 'gnuplot-send-buffer-to-gnuplot)
(define-key gnuplot-mode-map "\C-c\C-c" 'comment-region) ; <RF>
(define-key gnuplot-mode-map "\C-c\C-o" 'gnuplot-gui-set-options-and-insert)
(define-key gnuplot-mode-map "\C-c\C-d" 'gnuplot-show-version)
(define-key gnuplot-mode-map "\C-c\C-e" 'gnuplot-show-gnuplot-buffer)
(define-key gnuplot-mode-map "\C-c\C-f" 'gnuplot-send-file-to-gnuplot)
(define-key gnuplot-mode-map "\C-c\C-h" 'gnuplot-info-lookup-symbol)
(define-key gnuplot-mode-map "\C-c\C-i" 'gnuplot-insert-filename)
(define-key gnuplot-mode-map "\C-c\C-j" 'gnuplot-forward-script-line)
(define-key gnuplot-mode-map "\C-c\C-k" 'gnuplot-kill-gnuplot-buffer)
(define-key gnuplot-mode-map "\C-c\C-l" 'gnuplot-send-line-to-gnuplot)
(define-key gnuplot-mode-map "\C-c\C-n" 'gnuplot-negate-option)
(define-key gnuplot-mode-map "\C-c\C-p" 'gnuplot-show-gnuplot-version)
(define-key gnuplot-mode-map "\C-c\C-r" 'gnuplot-send-region-to-gnuplot)
;;(define-key gnuplot-mode-map "\C-c\C-t" 'gnuplot-gui-swap-simple-complete)
(define-key gnuplot-mode-map "\C-c\C-u" 'gnuplot-bug-report)
(define-key gnuplot-mode-map "\C-c\C-v" 'gnuplot-send-line-and-forward)
(define-key gnuplot-mode-map "\C-c\C-z" 'gnuplot-customize)
(define-key gnuplot-mode-map "\M-\r" 'gnuplot-complete-keyword)
(define-key gnuplot-mode-map "\M-\t" 'gnuplot-complete-keyword)
(define-key gnuplot-mode-map "\C-i" 'indent-for-tab-command)
(define-key gnuplot-mode-map "\C-m" 'newline-and-indent)
;;(define-key gnuplot-mode-map "\C-m" 'reindent-then-newline-and-indent)
;;(if (featurep 'kw-compl)
;; (define-key gnuplot-mode-map "\M-\r" 'kw-compl-abbrev)))
(cond (gnuplot-xemacs-p
(define-key gnuplot-mode-map '(shift button2)
'gnuplot-gui-mouse-set))
(t
(define-key gnuplot-mode-map [S-mouse-2]
'gnuplot-gui-mouse-set))) )
(defvar gnuplot-mode-menu nil)
(defvar gnuplot-menu nil
"Menu for `gnuplot-mode'.")
(setq gnuplot-menu
'("Gnuplot"
["Send line to gnuplot" gnuplot-send-line-to-gnuplot t]
["Send line & move forward" gnuplot-send-line-and-forward (not (eobp))]
["Send region to gnuplot" gnuplot-send-region-to-gnuplot
(gnuplot-mark-active)]
["Send buffer to gnuplot" gnuplot-send-buffer-to-gnuplot t]
["Send file to gnuplot" gnuplot-send-file-to-gnuplot t]
"---"
["Insert filename at point" gnuplot-insert-filename t]
["Negate set option" gnuplot-negate-option t]
;;["Set key binding" gnuplot-set-binding gnuplot-three-eight-p]
["Keyword help" gnuplot-info-lookup-symbol
(or gnuplot-keywords gnuplot-keywords-pending)]
["Show gnuplot process buffer" gnuplot-show-gnuplot-buffer t]
["Set arguments at point" gnuplot-gui-set-options-and-insert
(fboundp 'gnuplot-gui-set-options-and-insert)]
["Swap plot/splot/fit lists in GUI" gnuplot-gui-swap-simple-complete
(fboundp 'gnuplot-gui-swap-simple-complete)]
"---"
["Customize gnuplot" gnuplot-customize t]
["Submit bug report" gnuplot-bug-report t]
["Show gnuplot-mode version" gnuplot-show-version t]
["Show gnuplot version" gnuplot-show-gnuplot-version t]
"---"
["Kill gnuplot" gnuplot-kill-gnuplot-buffer t]
))
;;; --- insertions variables and menus
;;(load-library "gnuplot-insertions")
(defvar gnuplot-mode-insertions-menu nil)
(defvar gnuplot-insertions-menu nil
"Menu for insertions in `gnuplot-mode'.
The insertions menu is composed of several sub-menus. The variables
describing the sub-menus are:
`gnuplot-insertions-adornments'
`gnuplot-insertions-plot-options'
`gnuplot-insertions-terminal'
`gnuplot-insertions-x-axis'
`gnuplot-insertions-y-axis'
`gnuplot-insertions-z-axis'
`gnuplot-insertions-x2-axis'
`gnuplot-insertions-y2-axis'
`gnuplot-insertions-parametric-plots'
`gnuplot-insertions-polar-plots'
`gnuplot-insertions-surface-plots'
These variables can be customized by the user. For example, there are
many terminal types which are not in the terminal submenu but which
may be compiled into a user's copy of gnuplot.
Each of these variables is a list whose first element is a string and
all the rest are vectors as described in the document string for
`easy-menu-define'. The callback used throughout these menus is
`gnuplot-insert' which inserts the appropriate set expression and,
optionally, looks up that item in the gnuplot info file.
The easiest way to customize the submenus is to use the custom
package. Just type \\[gnuplot-customize] and follow your nose.
You can also add new items to any of these sub-menus by adding to the
`gnuplot-load-hook' in your .emacs file. Here is an example of adding
the \"regis\" terminal type to the terminal sub-menu:
(add-hook
'gnuplot-load-hook
'(lambda ()
(setq gnuplot-insertions-terminal
(append gnuplot-insertions-terminal
(list
[\"regis\"
(gnuplot-insert \"set terminal regis\")
t])))))")
(defvar gnuplot-insertions-top ()
"Top part of insertions menu.
See the document string for `gnuplot-insertions-menu'")
(defcustom gnuplot-insertions-menu-flag t
"*Non-nil means to place the insertion menu in the menubar.
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type 'boolean)
(defcustom gnuplot-insertions-adornments ; this is icky...
(if gnuplot-three-eight-p
'("adornments"
["arrow" (gnuplot-insert "set arrow ") t]
["bar" (gnuplot-insert "set bar") t]
["border" (gnuplot-insert "set border") t]
["boxwidth" (gnuplot-insert "set boxwidth ") t]
["format" (gnuplot-insert "set format ") t]
["grid" (gnuplot-insert "set grid") t]
["key" (gnuplot-insert "set key ") t]
["label" (gnuplot-insert "set label ") t]
["pointsize" (gnuplot-insert "set pointsize ") t]
["samples" (gnuplot-insert "set samples ") t]
["size" (gnuplot-insert "set size ") t]
["style" (gnuplot-insert "set style ") t]
["tics" (gnuplot-insert "set tics ") t]
["timefmt" (gnuplot-insert "set timefmt ") t]
["timestamp" (gnuplot-insert "set timestamp ") t]
["title" (gnuplot-insert "set title ") t]
["zeroaxis" (gnuplot-insert "set zeroaxis") t] )
'("adornments"
["data style" (gnuplot-insert "set data style ") t]
["function style" (gnuplot-insert "set function style ") t]
["arrow" (gnuplot-insert "set arrow ") t]
["bar" (gnuplot-insert "set bar") t]
["border" (gnuplot-insert "set border") t]
["boxwidth" (gnuplot-insert "set boxwidth ") t]
["format" (gnuplot-insert "set format ") t]
["grid" (gnuplot-insert "set grid") t]
["key" (gnuplot-insert "set key ") t]
["label" (gnuplot-insert "set label ") t]
["pointsize" (gnuplot-insert "set pointsize ") t]
["samples" (gnuplot-insert "set samples ") t]
["size" (gnuplot-insert "set size ") t]
["tics" (gnuplot-insert "set tics ") t]
["timefmt" (gnuplot-insert "set timefmt ") t]
["timestamp" (gnuplot-insert "set timestamp ") t]
["title" (gnuplot-insert "set title ") t]
["zeroaxis" (gnuplot-insert "set zeroaxis") t] ))
"Adornments submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-plot-options
'("plot options"
["autoscale" (gnuplot-insert "set autoscale ") t]
["clip" (gnuplot-insert "set clip ") t]
["encoding" (gnuplot-insert "set encoding ") t]
["locale" (gnuplot-insert "set locale ") t]
["logscale" (gnuplot-insert "set logscale ") t]
["multiplot" (gnuplot-insert "set multiplot") t]
["missing" (gnuplot-insert "set missing \"\"") t]
["palette" (gnuplot-insert "set palette ") t] ; <MT>
["pm3d" (gnuplot-insert "set pm3d ") t]
["offsets" (gnuplot-insert "set offsets ") t]
["output" (gnuplot-insert "set output ") t]
["zero" (gnuplot-insert "set zero ") t] )
"Plot options submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-terminal
'("terminal"
["eepic" (gnuplot-insert "set terminal eepic") t]
["fig" (gnuplot-insert "set terminal fig") t]
["gpic" (gnuplot-insert "set terminal gpic") t]
["latex" (gnuplot-insert "set terminal latex") t]
["linux" (gnuplot-insert "set terminal linux") t]
["pbm" (gnuplot-insert "set terminal pbm") t]
["png" (gnuplot-insert "set terminal png") t]
["postscript" (gnuplot-insert "set terminal postscript") t]
["pslatex" (gnuplot-insert "set terminal pslatex") t]
["table" (gnuplot-insert "set terminal table") t]
["tek40xx" (gnuplot-insert "set terminal tek40xx") t]
["tkcanvas" (gnuplot-insert "set terminal tkcanvas") t]
["tpic" (gnuplot-insert "set terminal tpic") t]
["vgagl" (gnuplot-insert "set terminal vgagl") t] ; for pm3d patch
["vttek" (gnuplot-insert "set terminal vttek") t]
["x11" (gnuplot-insert "set terminal x11") t] )
"Terminal submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-x-axis
'("x-axis"
["xdata" (gnuplot-insert "set xdata ") t]
["xlabel" (gnuplot-insert "set xlabel ") t]
["xrange" (gnuplot-insert "set xrange [:]") t]
["xtics" (gnuplot-insert "set xtics ") t]
["mxtics" (gnuplot-insert "set mxtics ") t]
["xzeroaxis" (gnuplot-insert "set xzeroaxis ") t]
["xdtics" (gnuplot-insert "set xdtics ") t]
["xmtics" (gnuplot-insert "set xmtics ") t])
"X-axis submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-x2-axis
'("x2-axis"
["x2data" (gnuplot-insert "set xdata ") t]
["x2label" (gnuplot-insert "set xlabel ") t]
["x2range" (gnuplot-insert "set xrange [:]") t]
["x2tics" (gnuplot-insert "set xtics ") t]
["mx2tics" (gnuplot-insert "set mxtics ") t]
["x2zeroaxis" (gnuplot-insert "set xzeroaxis ") t]
["x2dtics" (gnuplot-insert "set xdtics ") t]
["x2mtics" (gnuplot-insert "set xmtics ") t])
"X2-axis submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-y-axis
'("y-axis"
["ydata" (gnuplot-insert "set ydata ") t]
["ylabel" (gnuplot-insert "set ylabel ") t]
["ymtics" (gnuplot-insert "set ymtics ") t]
["yrange" (gnuplot-insert "set yrange [:]") t]
["ytics" (gnuplot-insert "set ytics ") t]
["yzeroaxis" (gnuplot-insert "set yzeroaxis ") t]
["ydtics" (gnuplot-insert "set ydtics ") t]
["mytics" (gnuplot-insert "set mytics ") t])
"Y-axis submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-y2-axis
'("y2-axis"
["y2data" (gnuplot-insert "set ydata ") t]
["y2label" (gnuplot-insert "set ylabel ") t]
["y2range" (gnuplot-insert "set yrange [:]") t]
["y2tics" (gnuplot-insert "set ytics ") t]
["my2tics" (gnuplot-insert "set mytics ") t]
["y2zeroaxis" (gnuplot-insert "set yzeroaxis ") t]
["y2mtics" (gnuplot-insert "set ymtics ") t]
["y2dtics" (gnuplot-insert "set ydtics ") t])
"Y2-axis submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-z-axis
'("z-axis"
["zdata" (gnuplot-insert "set zdata ") t]
["zlabel" (gnuplot-insert "set zlabel ") t]
["zrange" (gnuplot-insert "set zrange [:]") t]
["ztics" (gnuplot-insert "set ztics ") t]
["mztics" (gnuplot-insert "set mztics ") t]
["zdtics" (gnuplot-insert "set zdtics ") t]
["zmtics" (gnuplot-insert "set zmtics ") t] )
"Z-axis submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-parametric-plots
'("parametric plots"
["parametric" (gnuplot-insert "set parametric") t]
["isosamples" (gnuplot-insert "set isosamples ") t]
["dummy" (gnuplot-insert "set dummy ") t]
["trange" (gnuplot-insert "set trange [:]") t]
["urange" (gnuplot-insert "set urange [:]") t]
["vrange" (gnuplot-insert "set vrange [:]") t] )
"Parametric plots submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")
(function :tag "Callback")
(boolean :tag "Enabled" t)))))
(defcustom gnuplot-insertions-polar-plots
'("polar plots"
["polar" (gnuplot-insert "set polar") t]
["angles" (gnuplot-insert "set angles ") t]
["rrange" (gnuplot-insert "set rrange [:]") t] )
"Polar plots submenu in the insertions menu.
See the document string for `gnuplot-insertions-menu'
Changing this will not effect a change in any currently existing
`gnuplot-mode' buffer. You will see the change the next time you
create a `gnuplot-mode' buffer."
:group 'gnuplot-insertions
:type '(list (string :tag "Title")
(repeat :inline t
(vector (string :tag "Name")