comparison man/idlwave.texi @ 27600:322d1a88513b

IDLWAVE 3.15
author Carsten Dominik <dominik@science.uva.nl>
date Fri, 04 Feb 2000 09:57:10 +0000
parents eb645a473bf8
children 983e65f12610
comparison
equal deleted inserted replaced
27599:d1305a19933d 27600:322d1a88513b
7 * IDLWAVE: (idlwave). Major mode and shell for IDL and WAVE/CL files. 7 * IDLWAVE: (idlwave). Major mode and shell for IDL and WAVE/CL files.
8 @end direntry 8 @end direntry
9 @synindex ky cp 9 @synindex ky cp
10 @syncodeindex vr cp 10 @syncodeindex vr cp
11 @syncodeindex fn cp 11 @syncodeindex fn cp
12 @set VERSION 3.12 12 @set VERSION 3.15
13 @set EDITION 1.8 13 @set EDITION 1.10
14 @set IDLVERSION 5.3 14 @set IDLVERSION 5.3
15 @set NSYSROUTINES 1226 15 @set NSYSROUTINES 1226
16 @set NSYSKEYWORDS 5230 16 @set NSYSKEYWORDS 5229
17 @set DATE December 1999 17 @set DATE February 2000
18 @set AUTHOR Carsten Dominik 18 @set AUTHOR Carsten Dominik
19 @set AUTHOR-EMAIL dominik@@astro.uva.nl 19 @set AUTHOR-EMAIL dominik@@astro.uva.nl
20 @set MAINTAINER Carsten Dominik 20 @set MAINTAINER Carsten Dominik
21 @set MAINTAINER-EMAIL dominik@@astro.uva.nl 21 @set MAINTAINER-EMAIL dominik@@astro.uva.nl
22 @c %**end of header 22 @c %**end of header
28 a subprocess.@refill 28 a subprocess.@refill
29 29
30 This is edition @value{EDITION} of the IDLWAVE User Manual for 30 This is edition @value{EDITION} of the IDLWAVE User Manual for
31 IDLWAVE @value{VERSION}@refill 31 IDLWAVE @value{VERSION}@refill
32 32
33 Copyright (c) 1999 Free Software Foundation, Inc. 33 Copyright (c) 1999, 2000 Free Software Foundation, Inc.
34 34
35 Permission is granted to make and distribute verbatim 35 Permission is granted to make and distribute verbatim
36 copies of this manual provided the copyright notice and 36 copies of this manual provided the copyright notice and
37 this permission notice are preserved on all copies. 37 this permission notice are preserved on all copies.
38 38
62 @subtitle Major Emacs mode and shell for IDL and WAVE/CL files 62 @subtitle Major Emacs mode and shell for IDL and WAVE/CL files
63 @subtitle Edition @value{EDITION}, @value{DATE} 63 @subtitle Edition @value{EDITION}, @value{DATE}
64 64
65 @author by Carsten Dominik 65 @author by Carsten Dominik
66 @page 66 @page
67 Copyright @copyright{} 1999 Free Software Foundation, Inc. 67 Copyright @copyright{} 1999, 2000 Free Software Foundation, Inc.
68 68
69 @sp 2 69 @sp 2
70 This is edition @value{EDITION} of the @cite{IDLWAVE User Manual} for 70 This is edition @value{EDITION} of the @cite{IDLWAVE User Manual} for
71 IDLWAVE version @value{VERSION}, @value{DATE}.@refill 71 IDLWAVE version @value{VERSION}, @value{DATE}.@refill
72 72
253 @chapter IDLWAVE in a Nutshell 253 @chapter IDLWAVE in a Nutshell
254 @cindex Quick-Start 254 @cindex Quick-Start
255 @cindex Getting Started 255 @cindex Getting Started
256 @cindex IDLWAVE in a Nutshell 256 @cindex IDLWAVE in a Nutshell
257 @cindex Nutshell, IDLWAVE in a 257 @cindex Nutshell, IDLWAVE in a
258
259 If you are in a hurry, here is some quick-start information.
260 258
261 @subheading Editing IDL Programs 259 @subheading Editing IDL Programs
262 260
263 @multitable @columnfractions .15 .85 261 @multitable @columnfractions .15 .85
264 @item @key{TAB} 262 @item @key{TAB}
313 @lisp 311 @lisp
314 ;; Change the indentation preferences 312 ;; Change the indentation preferences
315 (setq idlwave-main-block-indent 2 ; default 0 313 (setq idlwave-main-block-indent 2 ; default 0
316 idlwave-block-indent 2 ; default 4 314 idlwave-block-indent 2 ; default 4
317 idlwave-end-offset -2) ; default -4 315 idlwave-end-offset -2) ; default -4
318 316 ;; Pad some operators with spaces
317 (setq idlwave-do-actions t
318 idlwave-surround-by-blank t)
319 ;; Automatically expand END to ENDIF, ENDELSE, ...
320 (setq idlwave-expand-generic-end t)
319 ;; Syntax Highlighting 321 ;; Syntax Highlighting
320 (add-hook 'idlwave-mode-hook 'turn-on-font-lock) 322 (add-hook 'idlwave-mode-hook 'turn-on-font-lock)
321 ;; Automatically expand END to ENDIF, ENDELSE, ... 323
322 (setq idlwave-expand-generic-end t) 324 ;; Automatically start the shell when needed, in dedicated frame
323 325 (setq idlwave-shell-automatic-start t
324 ;; Automatically start the shell when needed 326 idlwave-shell-use-dedicated-frame t)
325 (setq idlwave-shell-automatic-start t)
326 ;; Always use a separate frame for the shell buffer
327 (setq idlwave-shell-use-dedicated-frame t)
328 327
329 ;; Specify a file where library info can be stored. 328 ;; Specify a file where library info can be stored.
330 (setq idlwave-libinfo-file "~/idlinfo.el") 329 (setq idlwave-libinfo-file "~/idlinfo.el")
331 @end lisp 330 @end lisp
332 331
737 class information. Remembering the class works by placing a text 736 class information. Remembering the class works by placing a text
738 property in the object operator @samp{->}. This is not enabled by 737 property in the object operator @samp{->}. This is not enabled by
739 default - the variable @code{idlwave-store-inquired-class} can be used 738 default - the variable @code{idlwave-store-inquired-class} can be used
740 to turn it on.@refill 739 to turn it on.@refill
741 740
742 @defopt idlwave-completion-show-classes (@code{t}) 741 @defopt idlwave-completion-show-classes (@code{1})
743 Non-@code{nil} means, show classes in @file{*Completions*} buffer when 742 Non-@code{nil} means, show classes in @file{*Completions*} buffer when
744 completing object methods and keywords.@refill 743 completing object methods and keywords.@refill
745 @end defopt 744 @end defopt
746 745
747 @defopt idlwave-completion-fontify-classes (@code{t}) 746 @defopt idlwave-completion-fontify-classes (@code{t})
784 783
785 Otherwise, special abbreviations are used. Emacs abbreviations are 784 Otherwise, special abbreviations are used. Emacs abbreviations are
786 expanded by typing text into the buffer and pressing @key{SPC} or 785 expanded by typing text into the buffer and pressing @key{SPC} or
787 @key{RET}. The special abbreviations used to insert code templates all 786 @key{RET}. The special abbreviations used to insert code templates all
788 start with a @samp{\} (the backslash). Here are a few examples of 787 start with a @samp{\} (the backslash). Here are a few examples of
789 predefined abbreviations. For a full list, use @kbd{M-x 788 predefined abbreviations. For a full list, use @kbd{M-x
790 idlwave-list-abbrevs}. 789 idlwave-list-abbrevs}.
791 790
792 @multitable @columnfractions .15 .85 791 @multitable @columnfractions .15 .85
793 @item @code{\pr} 792 @item @code{\pr}
794 @tab @code{PROCEDURE} template 793 @tab @code{PROCEDURE} template
807 @item @code{\elif} 806 @item @code{\elif}
808 @tab @code{IF-ELSE} statement template 807 @tab @code{IF-ELSE} statement template
809 @item @code{\b} 808 @item @code{\b}
810 @tab @code{BEGIN} 809 @tab @code{BEGIN}
811 @end multitable 810 @end multitable
812 811
812 The templates are expanded in upper or lower case, depending upon the
813 variables @code{idlwave-abbrev-change-case} and
814 @code{idlwave-reserved-word-upcase}.@refill
815
813 @defopt idlwave-abbrev-start-char 816 @defopt idlwave-abbrev-start-char
814 A single character string used to start abbreviations in abbrev 817 A single character string used to start abbreviations in abbrev
815 mode.@refill 818 mode.@refill
816 @end defopt 819 @end defopt
817 820
900 @cindex Operators, padding with spaces 903 @cindex Operators, padding with spaces
901 904
902 Some operators can be automatically surrounded by spaces. This can 905 Some operators can be automatically surrounded by spaces. This can
903 happen when the operator is typed, or also later when the line is 906 happen when the operator is typed, or also later when the line is
904 indented. IDLWAVE contains this setting for the operators @samp{&}, 907 indented. IDLWAVE contains this setting for the operators @samp{&},
905 @samp{<}, @samp{>}, @samp{,}, @samp{=}, but the feature is turned off by 908 @samp{<}, @samp{>}, @samp{,}, @samp{=}, and @samp{->}@footnote{operators
906 default. If you want to turn it on, customize the variable 909 longer than one character can only be padded during line indentation.},
907 @code{idlwave-surround-by-blank}. You can also define similar actions 910 but the feature is turned off by default. If you want to turn it on,
908 for other operators by using the function 911 customize the variables @code{idlwave-surround-by-blank} and
909 @code{idlwave-action-and-binding} in the mode hook. For example, to 912 @code{idlwave-do-actions}. You can also define similar actions for
910 enforce space padding of the @samp{+} and @samp{*} operators, try this 913 other operators by using the function @code{idlwave-action-and-binding}
911 in @file{.emacs} 914 in the mode hook. For example, to enforce space padding of the @samp{+}
915 and @samp{*} operators, try this in @file{.emacs}@refill
912 916
913 @lisp 917 @lisp
914 (add-hook 'idlwave-mode-hook 918 (add-hook 'idlwave-mode-hook
915 (lambda () 919 (lambda ()
916 (setq idlwave-surround-by-blank t) ; Turn this type of actions on 920 (setq idlwave-surround-by-blank t) ; Turn this type of actions on
918 (idlwave-action-and-binding "+" '(idlwave-surround 1 1)))) 922 (idlwave-action-and-binding "+" '(idlwave-surround 1 1))))
919 @end lisp 923 @end lisp
920 924
921 @defopt idlwave-surround-by-blank (@code{nil}) 925 @defopt idlwave-surround-by-blank (@code{nil})
922 Non-@code{nil} means, enable @code{idlwave-surround}. If non-nil, 926 Non-@code{nil} means, enable @code{idlwave-surround}. If non-nil,
923 @samp{=}, @samp{<}, @samp{>}, @samp{&}, @samp{,} are surrounded with 927 @samp{=}, @samp{<}, @samp{>}, @samp{&}, @samp{,}, @samp{->} are
924 spaces by @code{idlwave-surround}. 928 surrounded with spaces by @code{idlwave-surround}.@refill
925 @end defopt 929 @end defopt
926 930
927 @defopt idlwave-pad-keyword (@code{t}) 931 @defopt idlwave-pad-keyword (@code{t})
928 Non-@code{nil} means pad @samp{=} for keywords like assignments.@refill 932 Non-@code{nil} means pad @samp{=} for keywords like assignments.@refill
929 @end defopt 933 @end defopt
1382 @cindex Expressions, printing 1386 @cindex Expressions, printing
1383 @cindex Expressions, help 1387 @cindex Expressions, help
1384 @cindex Mouse binding to print expressions 1388 @cindex Mouse binding to print expressions
1385 1389
1386 When execution is stopped you can examine the values of variables. The 1390 When execution is stopped you can examine the values of variables. The
1387 command @kbd{C-c C-d C-p} prints the expression at point in the shell 1391 command @kbd{C-c C-d C-p} prints the expression at point, while @kbd{C-c
1388 buffer, while @kbd{C-c C-d ?} shows help on this expression. The 1392 C-d ?} shows help on this expression. The expression at point is an
1389 expression at point is an array expression or a function call, or the 1393 array expression or a function call, or the contents of a pair of
1390 contents of a pair of parenthesis. The selected expression becomes 1394 parenthesis. The selected expression becomes highlighted in the source
1391 highlighted in the source code for a short time. 1395 code for a short time. Calling the above commands with a prefix
1396 argument will prompt for an expression instead of using the one at
1397 point.
1392 1398
1393 I find it very convenient to bind these functions to a mouse event, so 1399 I find it very convenient to bind these functions to a mouse event, so
1394 that simply clicking on an expression prints its value. Here is a way 1400 that simply clicking on an expression prints its value. The following
1395 to do this with XEmacs: 1401 code binds printing an expression to a click with mouse button 2 while
1402 holding down the @key{SHIFT} key:
1396 1403
1397 @lisp 1404 @lisp
1398 (add-hook 'idlwave-shell-mode-hook 1405 (add-hook 'idlwave-shell-mode-hook
1399 (lambda() 1406 (lambda()
1400 (define-key idlwave-mode-map [(shift button1)] 1407 (define-key idlwave-mode-map [(shift mouse-2)]
1401 'idlwave-shell-mouse-print) 1408 'idlwave-shell-mouse-print)))
1402 (define-key idlwave-mode-map [(shift button2)]
1403 'idlwave-shell-mouse-help)))
1404 @end lisp 1409 @end lisp
1410
1411 Printing of expressions also works on higher levels of the calling
1412 stack. This means that you can examine the values of variables and
1413 expressions inside the routine which called the current routine etc.
1414 Use the commands @kbd{C-c C-d C-@key{UP}}
1415 (@code{idlwave-shell-stack-up}) and @kbd{C-c C-d C-@key{DOWN}}
1416 (@code{idlwave-shell-stack-down}) or the corresponding toolbar buttons
1417 to move through the calling stack. The mode line will indicate the
1418 routine and the calling stack level which define the context for
1419 printing expressions. The following restrictions apply for all levels
1420 except the current:@refill
1421
1422 @itemize @bullet
1423 @item
1424 Array expressions must use the @samp{[ ]} index delimiters. Identifiers
1425 with a @samp{( )} will be interpreted as function calls.
1426 @item
1427 Variable names in the expression may not start with an underscore
1428 @samp{_}.
1429 @item
1430 @cindex ROUTINE_NAMES, IDL procedure
1431 Printing values of expressions on higher levels of the calling stack
1432 uses the @emph{unsupported} IDL routine @code{ROUTINE_NAMES}, which may
1433 or may not be available in future versions of IDL.
1434 @end itemize
1405 1435
1406 @defopt idlwave-shell-expression-face 1436 @defopt idlwave-shell-expression-face
1407 The face for @code{idlwave-shell-expression-overlay}. 1437 The face for @code{idlwave-shell-expression-overlay}.
1408 Allows you to choose the font, color and other properties for 1438 Allows you to choose the font, color and other properties for
1409 the expression printed by IDL. 1439 the expression printed by IDL.
1410 @end defopt 1440 @end defopt
1411 1441
1442 @defopt idlwave-shell-print-expression-function (@code{nil})
1443 A function to handle special display of evaluated expressions.
1444 @end defopt
1412 1445
1413 @node Installation, Acknowledgement, The IDLWAVE Shell, Top 1446 @node Installation, Acknowledgement, The IDLWAVE Shell, Top
1414 @chapter Installation 1447 @chapter Installation
1415 @cindex Installation 1448 @cindex Installation
1416 @cindex FTP site 1449 @cindex FTP site
1423 @end menu 1456 @end menu
1424 1457
1425 @node Installing IDLWAVE, Upgrading from idl.el, Installation, Installation 1458 @node Installing IDLWAVE, Upgrading from idl.el, Installation, Installation
1426 @section Installing IDLWAVE 1459 @section Installing IDLWAVE
1427 1460
1428 IDLWAVE is part of Emacs 21.1 and later. It is also@footnote{or will be 1461 IDLWAVE is part of Emacs 21.1 and later. It is also an XEmacs packages
1429 soon} an XEmacs packages and can be installed from 1462 and can be installed from
1430 @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,the XEmacs ftp site} 1463 @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,the XEmacs ftp site}
1431 with the normal package management system on XEmacs 21.@refill 1464 with the normal package management system on XEmacs 21.@refill
1432 1465
1433 You can also download IDLWAVE and install it yourself from 1466 You can also download IDLWAVE and install it yourself from
1434 @uref{http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave, the maintainers 1467 @uref{http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave, the maintainers
1456 @code{idlwave-shell-mode-hook}. Instead, set the variable 1489 @code{idlwave-shell-mode-hook}. Instead, set the variable
1457 @code{idlwave-shell-use-dedicated-frame} with 1490 @code{idlwave-shell-use-dedicated-frame} with
1458 @lisp 1491 @lisp
1459 (setq idlwave-shell-use-dedicated-frame t) 1492 (setq idlwave-shell-use-dedicated-frame t)
1460 @end lisp 1493 @end lisp
1494 @item
1495 The key sequence @kbd{M-@key{TAB}} no longer inserts a TAB character,
1496 but (as in many other Emacs modes) does completion. Inserting a TAB is
1497 now bound to @kbd{C-c @key{SPC}}.@refill
1461 @end enumerate 1498 @end enumerate
1462 1499
1463 @node Acknowledgement, Sources of Routine Info, Installation, Top 1500 @node Acknowledgement, Sources of Routine Info, Installation, Top
1464 @chapter Acknowledgement 1501 @chapter Acknowledgement
1465 @cindex Acknowledgement 1502 @cindex Acknowledgement
1632 A routine which is both in the library listing and compiled under the 1669 A routine which is both in the library listing and compiled under the
1633 shell will show up twice in the @file{*Completions*} listing. This is 1670 shell will show up twice in the @file{*Completions*} listing. This is
1634 usually not a serious problem. However, if you have scanned the part of 1671 usually not a serious problem. However, if you have scanned the part of
1635 the library relevant for you, and if you are not compiling files which 1672 the library relevant for you, and if you are not compiling files which
1636 are not on the library search path, the information about compiled 1673 are not on the library search path, the information about compiled
1637 routines is in fact unnecessary. In this case, you can turn of the 1674 routines is in fact unnecessary. In this case, you can turn off the
1638 shell query for compiled routines with the variable 1675 shell query for compiled routines with the variable
1639 @code{idlwave-query-shell-for-routine-info}.@refill 1676 @code{idlwave-query-shell-for-routine-info}.@refill
1640 1677
1641 @defopt idlwave-libinfo-file 1678 @defopt idlwave-libinfo-file
1642 File for routine information of the IDL library. 1679 File for routine information of the IDL library.
1673 @b{Question:} So now you have all these complicated configuration 1710 @b{Question:} So now you have all these complicated configuration
1674 options in your package, but which ones do @emph{you} as the maintainer 1711 options in your package, but which ones do @emph{you} as the maintainer
1675 actually set in your own configuration? 1712 actually set in your own configuration?
1676 1713
1677 @noindent 1714 @noindent
1678 @b{Answer:} Hardly any. As the maintainer, I set the default of all 1715 @b{Answer:} Hardly any. As the maintainer, I set the default of most
1679 options to what I think is best. However, I do not turn on features by 1716 options to what I think is best. However, the default settings do not
1680 default which 1717 turn on features which
1681 @itemize @minus 1718 @itemize @minus
1682 @item 1719 @item
1683 are not self-evident (i.e. too magic) when used by an unsuspecting user 1720 are not self-evident (i.e. too magic) when used by an unsuspecting user
1684 @item 1721 @item
1685 are too intrusive 1722 are too intrusive
1687 will not work properly on all Emacs installations out there 1724 will not work properly on all Emacs installations out there
1688 @item 1725 @item
1689 break with what I think are widely used standards. 1726 break with what I think are widely used standards.
1690 @end itemize 1727 @end itemize
1691 1728
1692 @noindent To see what I mean, here is the entire configuration I have in 1729 @noindent To see what I mean, here is the @emph{entire} configuration I
1693 my @file{.emacs}: 1730 have in my @file{.emacs}:
1694 1731
1695 @lisp 1732 @lisp
1696 (setq idlwave-shell-activate-alt-keybindings t 1733 (setq idlwave-shell-activate-alt-keybindings t
1697 idlwave-expand-generic-end t 1734 idlwave-expand-generic-end t
1698 idlwave-store-inquired-class t 1735 idlwave-store-inquired-class t
1750 (idlwave-action-and-binding ">" '(idlwave-surround 1 1 '(?-))) 1787 (idlwave-action-and-binding ">" '(idlwave-surround 1 1 '(?-)))
1751 (idlwave-action-and-binding "&" '(idlwave-surround 1 1)) 1788 (idlwave-action-and-binding "&" '(idlwave-surround 1 1))
1752 ;; 1789 ;;
1753 ;; Only pad after comma and with exactly 1 space 1790 ;; Only pad after comma and with exactly 1 space
1754 (idlwave-action-and-binding "," '(idlwave-surround nil 1)) 1791 (idlwave-action-and-binding "," '(idlwave-surround nil 1))
1792 (idlwave-action-and-binding "&" '(idlwave-surround 1 1))
1755 ;; 1793 ;;
1794 ;; Pad only after `->', remove any space before the arrow
1795 (idlwave-action-and-binding "->" '(idlwave-surround 0 -1 nil 2))
1796 ;;;
1756 ;; Set some personal bindings 1797 ;; Set some personal bindings
1757 ;; (In this case, makes `,' have the normal self-insert behavior.) 1798 ;; (In this case, makes `,' have the normal self-insert behavior.)
1758 (local-set-key "," 'self-insert-command) 1799 (local-set-key "," 'self-insert-command)
1759 ;; Create a newline, indenting the original and new line. 1800 ;; Create a newline, indenting the original and new line.
1760 ;; A similar function that does _not_ reindent the original 1801 ;; A similar function that does _not_ reindent the original
1768 (setq idlwave-shell-overlay-arrow "=>") ; default is ">" 1809 (setq idlwave-shell-overlay-arrow "=>") ; default is ">"
1769 (setq idlwave-shell-use-dedicated-frame t) ; Make a dedicated frame 1810 (setq idlwave-shell-use-dedicated-frame t) ; Make a dedicated frame
1770 (setq idlwave-shell-prompt-pattern "^WAVE> ") ; default is "^IDL> " 1811 (setq idlwave-shell-prompt-pattern "^WAVE> ") ; default is "^IDL> "
1771 (setq idlwave-shell-explicit-file-name "wave") 1812 (setq idlwave-shell-explicit-file-name "wave")
1772 (setq idlwave-shell-process-name "wave") 1813 (setq idlwave-shell-process-name "wave")
1773 (setq idlwave-shell-use-dedicated-frame t) ; Shell on separate frame
1774 (setq idlwave-shell-use-toolbar nil) ; No toolbar 1814 (setq idlwave-shell-use-toolbar nil) ; No toolbar
1775 @end example 1815 @end example
1776 1816
1777 @node Index, , Configuration Examples, Top 1817 @node Index, , Configuration Examples, Top
1778 @unnumbered Index 1818 @unnumbered Index