aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Dominik2000-06-20 12:46:55 +0000
committerCarsten Dominik2000-06-20 12:46:55 +0000
commita8e833f3910c2430aeec0a90c0f05f4fd8aa4a78 (patch)
tree61d63361c61540bd9edb9a62dc48be4f76c6748e
parenta0d3134105ca086ffd68ee0321aba28426d125df (diff)
downloademacs-a8e833f3910c2430aeec0a90c0f05f4fd8aa4a78.tar.gz
emacs-a8e833f3910c2430aeec0a90c0f05f4fd8aa4a78.zip
Update to idlwave 4.2
-rw-r--r--man/idlwave.texi1069
1 files changed, 786 insertions, 283 deletions
diff --git a/man/idlwave.texi b/man/idlwave.texi
index 35d790a396f..9216de95ab4 100644
--- a/man/idlwave.texi
+++ b/man/idlwave.texi
@@ -9,26 +9,27 @@
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.15 12@set VERSION 4.2
13@set EDITION 1.10 13@set EDITION 4.2
14@set IDLVERSION 5.3 14@set IDLVERSION 5.3
15@set NSYSROUTINES 1226 15@set NSYSROUTINES 1251
16@set NSYSKEYWORDS 5229 16@set NSYSKEYWORDS 5287
17@set DATE February 2000 17@set DATE June 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@set IDLWAVE-HOMEPAGE http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave
22@c %**end of header 23@c %**end of header
23@finalout 24@finalout
24 25
25@ifinfo 26@ifinfo
26This file documents IDLWAVE, a major mode for editing IDL and 27This file documents IDLWAVE, a major mode for editing IDL and
27WAVE/CL files with Emacs. It also implements a shell for running IDL as 28WAVE/CL files with Emacs. It also implements a shell for running IDL as
28a subprocess.@refill 29a subprocess.
29 30
30This is edition @value{EDITION} of the IDLWAVE User Manual for 31This is edition @value{EDITION} of the IDLWAVE User Manual for
31IDLWAVE @value{VERSION}@refill 32IDLWAVE @value{VERSION}
32 33
33Copyright (c) 1999, 2000 Free Software Foundation, Inc. 34Copyright (c) 1999, 2000 Free Software Foundation, Inc.
34 35
@@ -68,10 +69,11 @@ Copyright @copyright{} 1999, 2000 Free Software Foundation, Inc.
68 69
69@sp 2 70@sp 2
70This is edition @value{EDITION} of the @cite{IDLWAVE User Manual} for 71This is edition @value{EDITION} of the @cite{IDLWAVE User Manual} for
71IDLWAVE version @value{VERSION}, @value{DATE}.@refill 72IDLWAVE version @value{VERSION}, @value{DATE}.
72 73
73@sp 2 74@sp 2
74 75
76@cindex Copyright, of IDLWAVE
75Permission is granted to make and distribute verbatim 77Permission is granted to make and distribute verbatim
76copies of this manual provided the copyright notice and 78copies of this manual provided the copyright notice and
77this permission notice are preserved on all copies. 79this permission notice are preserved on all copies.
@@ -89,16 +91,19 @@ except that this permission notice may be stated in a
89translation approved by the Free Software Foundation. 91translation approved by the Free Software Foundation.
90 92
91@end titlepage 93@end titlepage
94@contents
95
92@page 96@page
93 97
94@ifinfo 98@ifnottex
99
95@node Top, Introduction, (dir), (dir) 100@node Top, Introduction, (dir), (dir)
96 101
97IDLWAVE is a package to support editing command files for the 102IDLWAVE is a package to support editing command files for the
98Interactive Data Language (IDL), and for running IDL as an inferior 103Interactive Data Language (IDL), and for running IDL as an inferior
99shell. @refill 104shell.
100 105
101@end ifinfo 106@end ifnottex
102 107
103@menu 108@menu
104* Introduction:: What IDLWAVE is and what not 109* Introduction:: What IDLWAVE is and what not
@@ -111,15 +116,16 @@ shell. @refill
111* Configuration Examples:: The user is king... 116* Configuration Examples:: The user is king...
112* Index:: Fast access 117* Index:: Fast access
113 118
114@detailmenu 119@detailmenu --- The Detailed Node Listing ---
115
116 --- The Detailed Node Listing ---
117 120
118The IDLWAVE Major Mode 121The IDLWAVE Major Mode
119 122
120* Code Formatting:: Making code look nice 123* Code Formatting:: Making code look nice
121* Routine Info:: Calling Sequences and Keywords 124* Routine Info:: Calling Sequence and Keyword List
125* Online Help:: One key press from source to help
122* Completion:: Completing routine names and Keywords 126* Completion:: Completing routine names and Keywords
127* Routine Source:: How to visit the source file of routine XYZ
128* Resolving Routines:: Force the Shell to compile a routine
123* Code Templates:: Abbreviations for frequent constructs 129* Code Templates:: Abbreviations for frequent constructs
124* Actions:: Changing case, Padding, End checking 130* Actions:: Changing case, Padding, End checking
125* Doc Header:: Inserting a standard header 131* Doc Header:: Inserting a standard header
@@ -154,14 +160,17 @@ Debugging IDL Programs
154Installation 160Installation
155 161
156* Installing IDLWAVE:: How to install the distribution 162* Installing IDLWAVE:: How to install the distribution
163* Installing Online Help:: Where to get the additional files needed
157* Upgrading from idl.el:: Necessary configuration changes 164* Upgrading from idl.el:: Necessary configuration changes
158 165
159Sources of Routine Info 166Sources of Routine Info
160 167
161* Routine Definitions:: Where IDL Routines are defined. 168* Routine Definitions:: Where IDL Routines are defined.
162* Routine Information Sources:: So how does IDLWAVE know about... 169* Routine Information Sources:: So how does IDLWAVE know about...
163* Library Scan:: Scanning the Libraries for Routine Info 170* Library Scan:: Scanning the Libraries for Routine Info
164* Updating idlw-rinfo.el:: Scanning the Reference Manual 171* Load-Path Shadows:: Routines defined in several places
172* Documentation Scan:: Scanning the IDL Manuals
173
165@end detailmenu 174@end detailmenu
166@end menu 175@end menu
167 176
@@ -169,7 +178,11 @@ Sources of Routine Info
169@chapter Introduction 178@chapter Introduction
170@cindex Introduction 179@cindex Introduction
171@cindex CORBA (Common Object Request Broker Architecture) 180@cindex CORBA (Common Object Request Broker Architecture)
181@cindex Interface Definition Language
182@cindex Interactive Data Language
172@cindex cc-mode.el 183@cindex cc-mode.el
184@cindex @file{idl.el}
185@cindex @file{idl-shell.el}
173@cindex Feature overview 186@cindex Feature overview
174 187
175IDLWAVE is a package to support editing command files for the 188IDLWAVE is a package to support editing command files for the
@@ -189,7 +202,7 @@ switch.
189IDLWAVE consists of two parts: A major mode for editing command files 202IDLWAVE consists of two parts: A major mode for editing command files
190(@code{idlwave-mode}) and a mode to allow running the IDL program as an 203(@code{idlwave-mode}) and a mode to allow running the IDL program as an
191inferior shell (@code{idlwave-shell-mode}). Both modes work closely 204inferior shell (@code{idlwave-shell-mode}). Both modes work closely
192together and form a complete development environment.@refill 205together and form a complete development environment.
193 206
194Here is a brief summary of what IDLWAVE does. 207Here is a brief summary of what IDLWAVE does.
195 208
@@ -200,7 +213,11 @@ Code indentation and formatting.
200Font-lock support on three levels. 213Font-lock support on three levels.
201@item 214@item
202Display of calling sequence and keywords of more than 1000 IDL 215Display of calling sequence and keywords of more than 1000 IDL
203routines. 216routines routines and any routines in your local IDL library.
217@item
218Name space conflict search.
219@item
220Fast context-sensitive online help.
204@item 221@item
205Context sensitive completion of routine names and keywords. 222Context sensitive completion of routine names and keywords.
206@item 223@item
@@ -210,6 +227,8 @@ Actions to enforce coding standards during typing.
210@item 227@item
211Block structure check. 228Block structure check.
212@item 229@item
230Support for @file{imenu} (Emacs) and @file{func-menu} (XEmacs).
231@item
213Documentation support. 232Documentation support.
214@item 233@item
215Running IDL as inferior process. 234Running IDL as inferior process.
@@ -225,6 +244,7 @@ Examining expressions with a mouse click.
225@ifnottex 244@ifnottex
226@cindex Screenshots 245@cindex Screenshots
227Here are a number of screenshots showing IDLWAVE in action. 246Here are a number of screenshots showing IDLWAVE in action.
247
228@itemize @bullet 248@itemize @bullet
229@item 249@item
230@uref{http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave/font-lock.gif, 250@uref{http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave/font-lock.gif,
@@ -253,6 +273,7 @@ Some configuration examples are also given in the appendix.
253@chapter IDLWAVE in a Nutshell 273@chapter IDLWAVE in a Nutshell
254@cindex Quick-Start 274@cindex Quick-Start
255@cindex Getting Started 275@cindex Getting Started
276@cindex Summary of important commands
256@cindex IDLWAVE in a Nutshell 277@cindex IDLWAVE in a Nutshell
257@cindex Nutshell, IDLWAVE in a 278@cindex Nutshell, IDLWAVE in a
258 279
@@ -270,6 +291,8 @@ Some configuration examples are also given in the appendix.
270@item @kbd{C-c ?} 291@item @kbd{C-c ?}
271@tab Display calling sequence, keywords of the procedure/function call 292@tab Display calling sequence, keywords of the procedure/function call
272at point. 293at point.
294@item @kbd{M-?}
295@tab Context sensitive online help.
273@item @kbd{M-@key{TAB}} 296@item @kbd{M-@key{TAB}}
274@tab Complete a procedure name, function name or keyword in the buffer. 297@tab Complete a procedure name, function name or keyword in the buffer.
275@item @kbd{C-c C-i} 298@item @kbd{C-c C-i}
@@ -287,8 +310,6 @@ at point.
287@multitable @columnfractions .15 .85 310@multitable @columnfractions .15 .85
288@item @kbd{C-c C-s} 311@item @kbd{C-c C-s}
289@tab Start IDL as a subprocess and/or switch to the interaction buffer. 312@tab Start IDL as a subprocess and/or switch to the interaction buffer.
290@item @kbd{C-u C-c C-s}
291@tab Start the shell in a separate frame.
292@item @kbd{M-p} 313@item @kbd{M-p}
293@tab Cycle back through IDL command history matching command line input. 314@tab Cycle back through IDL command history matching command line input.
294@item @kbd{M-n} 315@item @kbd{M-n}
@@ -320,13 +341,11 @@ at point.
320(setq idlwave-expand-generic-end t) 341(setq idlwave-expand-generic-end t)
321;; Syntax Highlighting 342;; Syntax Highlighting
322(add-hook 'idlwave-mode-hook 'turn-on-font-lock) 343(add-hook 'idlwave-mode-hook 'turn-on-font-lock)
323
324;; Automatically start the shell when needed, in dedicated frame 344;; Automatically start the shell when needed, in dedicated frame
325(setq idlwave-shell-automatic-start t 345(setq idlwave-shell-automatic-start t
326 idlwave-shell-use-dedicated-frame t) 346 idlwave-shell-use-dedicated-frame t)
327 347;; Where are the online help files?
328;; Specify a file where library info can be stored. 348(setq idlwave-help-directory "~/.idlwave")
329(setq idlwave-libinfo-file "~/idlinfo.el")
330@end lisp 349@end lisp
331 350
332@node The IDLWAVE Major Mode, The IDLWAVE Shell, IDLWAVE in a Nutshell, Top 351@node The IDLWAVE Major Mode, The IDLWAVE Shell, IDLWAVE in a Nutshell, Top
@@ -340,8 +359,11 @@ customize them.
340 359
341@menu 360@menu
342* Code Formatting:: Making code look nice 361* Code Formatting:: Making code look nice
343* Routine Info:: Calling Sequences and Keywords 362* Routine Info:: Calling Sequence and Keyword List
363* Online Help:: One key press from source to help
344* Completion:: Completing routine names and Keywords 364* Completion:: Completing routine names and Keywords
365* Routine Source:: How to visit the source file of routine XYZ
366* Resolving Routines:: Force the Shell to compile a routine
345* Code Templates:: Abbreviations for frequent constructs 367* Code Templates:: Abbreviations for frequent constructs
346* Actions:: Changing case, Padding, End checking 368* Actions:: Changing case, Padding, End checking
347* Doc Header:: Inserting a standard header 369* Doc Header:: Inserting a standard header
@@ -373,6 +395,7 @@ governed by a number of variables.
373 395
374@cindex Foreign code, adapting 396@cindex Foreign code, adapting
375@cindex Indentation, of foreign code 397@cindex Indentation, of foreign code
398@kindex M-C-\
376To re-indent a larger portion of code (e.g. when working with foreign code 399To re-indent a larger portion of code (e.g. when working with foreign code
377written with different conventions), use @kbd{M-C-\} 400written with different conventions), use @kbd{M-C-\}
378(@code{indent-region}) after marking the relevant code. Useful marking 401(@code{indent-region}) after marking the relevant code. Useful marking
@@ -383,23 +406,23 @@ additional formatting conventions on foreign code.
383@defopt idlwave-main-block-indent (@code{0}) 406@defopt idlwave-main-block-indent (@code{0})
384Extra indentation for the main block of code. That is the block between 407Extra indentation for the main block of code. That is the block between
385the FUNCTION/PRO statement and the END statement for that program 408the FUNCTION/PRO statement and the END statement for that program
386unit.@refill 409unit.
387@end defopt 410@end defopt
388 411
389@defopt idlwave-block-indent (@code{4}) 412@defopt idlwave-block-indent (@code{5})
390Extra indentation applied to block lines. If you change this, you 413Extra indentation applied to block lines. If you change this, you
391probably also want to change @code{idlwave-end-offset}.@refill 414probably also want to change @code{idlwave-end-offset}.
392@end defopt 415@end defopt
393 416
394@defopt idlwave-end-offset (@code{-4}) 417@defopt idlwave-end-offset (@code{-4})
395Extra indentation applied to block END lines. A value equal to negative 418Extra indentation applied to block END lines. A value equal to negative
396@code{idlwave-block-indent} will make END lines line up with the block 419@code{idlwave-block-indent} will make END lines line up with the block
397BEGIN lines.@refill 420BEGIN lines.
398@end defopt 421@end defopt
399 422
400@defopt idlwave-continuation-indent (@code{2}) 423@defopt idlwave-continuation-indent (@code{2})
401Extra indentation applied to continuation lines and insided unbalanced 424Extra indentation applied to continuation lines and inside unbalanced
402parenthesis.@refill 425parenthesis.
403@end defopt 426@end defopt
404 427
405@node Comment Indentation, Continuation Lines, Code Indentation, Code Formatting 428@node Comment Indentation, Continuation Lines, Code Indentation, Code Formatting
@@ -422,32 +445,30 @@ unchanged.
422@tab Lines starting with a single semicolon are indent to a minimum column. 445@tab Lines starting with a single semicolon are indent to a minimum column.
423@end multitable 446@end multitable
424 447
448@noindent
425The indentation of comments starting in column 0 is never changed. 449The indentation of comments starting in column 0 is never changed.
426 450
427@defopt idlwave-no-change-comment 451@defopt idlwave-no-change-comment
428The indentation of a comment that starts with this regular 452The indentation of a comment starting with this regexp will not be changed.
429expression will not be changed.
430@end defopt 453@end defopt
431 454
432@defopt idlwave-begin-line-comment 455@defopt idlwave-begin-line-comment
433A comment anchored at the beginning of line. A comment matched by this 456A comment anchored at the beginning of line.
434regular expression will not have its indentation changed.@refill
435@end defopt 457@end defopt
436 458
437@defopt idlwave-code-comment 459@defopt idlwave-code-comment
438A comment that starts with this regular expression on a line by itself 460A comment that starts with this regexp is indented as if it is a part of
439is indented as if it is a part of IDL code.@refill 461IDL code.
440@end defopt 462@end defopt
441 463
442@node Continuation Lines, Syntax Highlighting, Comment Indentation, Code Formatting 464@node Continuation Lines, Syntax Highlighting, Comment Indentation, Code Formatting
443@subsection Continuation Lines and Filling 465@subsection Continuation Lines and Filling
444@cindex Continuation lines 466@cindex Continuation lines
445@cindex Line splitting 467@cindex Line splitting
468@cindex String splitting
446@cindex Splitting, of lines 469@cindex Splitting, of lines
447@cindex Filling
448@cindex @code{auto-fill-mode}
449@cindex Hanging paragraphs
450 470
471@kindex M-@key{RET}
451In IDL, a newline character terminates a statement unless preceded by a 472In IDL, a newline character terminates a statement unless preceded by a
452@samp{$}. If you would like to start a continuation line, use 473@samp{$}. If you would like to start a continuation line, use
453@kbd{M-@key{RET}} which calls the command @code{idlwave-split-line}. It 474@kbd{M-@key{RET}} which calls the command @code{idlwave-split-line}. It
@@ -456,22 +477,21 @@ of the current line, terminates the line with a newline and indents the
456new line. The command @kbd{M-@key{RET}} can also be used in the middle 477new line. The command @kbd{M-@key{RET}} can also be used in the middle
457of a line to split the line at that point. When used inside a long 478of a line to split the line at that point. When used inside a long
458string constant, the string is split with the @samp{+} concatenation 479string constant, the string is split with the @samp{+} concatenation
459operator. You could even use @code{auto-fill-mode} to automatically 480operator.
460break code lines into several lines while you type. For this, set the
461variable @code{idlwave-fill-comment-line-only} to @code{nil} and turn on
462@code{auto-fill-mode}. @code{auto-fill-mode} can be toggled with
463@kbd{C-c C-a}.
464 481
482@cindex Filling
483@cindex @code{auto-fill-mode}
484@cindex Hanging paragraphs
465When filling comment paragraphs, IDLWAVE overloads the normal filling 485When filling comment paragraphs, IDLWAVE overloads the normal filling
466functions and uses a function which creates hanging paragraphs as they 486functions and uses a function which creates hanging paragraphs as they
467are customary in the IDL routine headers. When @code{auto-fill-mode} is 487are customary in the IDL routine headers. When @code{auto-fill-mode} is
468turned on, comments will be auto-filled. If the first line of a 488turned on (toggle with @kbd{C-c C-a}), comments will be auto-filled. If
469paragraph is matched by @code{idlwave-hang-indent-regexp}, subsequent 489the first line of a paragraph is matched by
470lines are indented to after the position of this match, as in the 490@code{idlwave-hang-indent-regexp}, subsequent lines are indented to
471following example. 491after the position of this match, as in the following example.
472 492
473@example 493@example
474; INPUTS 494; INPUTS:
475; x - an array containing 495; x - an array containing
476; lots of interesting numbers. 496; lots of interesting numbers.
477; 497;
@@ -480,6 +500,7 @@ following example.
480; to describe it. 500; to describe it.
481@end example 501@end example
482 502
503@kindex M-q
483You also refill a comment paragraph with @kbd{M-q}. 504You also refill a comment paragraph with @kbd{M-q}.
484 505
485@defopt idlwave-fill-comment-line-only (@code{t}) 506@defopt idlwave-fill-comment-line-only (@code{t})
@@ -496,31 +517,33 @@ Non-@code{nil} means @code{idlwave-split-line} will split strings with
496@samp{+}. 517@samp{+}.
497@end defopt 518@end defopt
498 519
499@defopt idlwave-hanging-indent 520@defopt idlwave-hanging-indent (@code{t})
500Non-@code{nil} means comment paragraphs are indented under the hanging 521Non-@code{nil} means comment paragraphs are indented under the hanging
501indent given by @code{idlwave-hang-indent-regexp} match in the first 522indent given by @code{idlwave-hang-indent-regexp} match in the first
502line of the paragraph.@refill 523line of the paragraph.
503@end defopt 524@end defopt
504 525
505@defopt idlwave-hang-indent-regexp 526@defopt idlwave-hang-indent-regexp
506Regular expression matching the position of the hanging indent 527Regular expression matching the position of the hanging indent
507in the first line of a comment paragraph.@refill 528in the first line of a comment paragraph.
508@end defopt 529@end defopt
509 530
510@defopt idlwave-use-last-hang-indent (@code{nil}) 531@defopt idlwave-use-last-hang-indent (@code{nil})
511Non-@code{nil} means use last match on line for 532Non-@code{nil} means use last match on line for
512@code{idlwave-indent-regexp}.@refill 533@code{idlwave-indent-regexp}.
513@end defopt 534@end defopt
514 535
515@node Syntax Highlighting, , Continuation Lines, Code Formatting 536@node Syntax Highlighting, , Continuation Lines, Code Formatting
516@subsection Syntax Highlighting 537@subsection Syntax Highlighting
517@cindex Syntax highlighting 538@cindex Syntax highlighting
539@cindex Highlighting of syntax
518@cindex Font lock 540@cindex Font lock
519 541
520Highlighting of keywords, comments, strings etc. can be accomplished 542Highlighting of keywords, comments, strings etc. can be accomplished
521with @code{font-lock}. To enable @code{font-lock} for IDL files, place 543with @code{font-lock}. If you are using @code{global-font-lock-mode}
522the following line into your @file{.emacs} (see 544(on Emacs), or have @code{font-lock} turned on in any other buffer in
523@ref{Configuration Examples})@refill 545XEmacs, it should also automatically work in IDLWAVE buffers. If not,
546you can enforce it with the following line in your @file{.emacs}
524 547
525@lisp 548@lisp
526(add-hook 'idlwave-mode-hook 'turn-on-font-lock) 549(add-hook 'idlwave-mode-hook 'turn-on-font-lock)
@@ -531,13 +554,18 @@ IDLWAVE supports 3 levels of syntax highlighting. The variable
531 554
532@defopt idlwave-default-font-lock-items 555@defopt idlwave-default-font-lock-items
533Items which should be fontified on the default fontification level 556Items which should be fontified on the default fontification level
5342.@refill 5572.
535@end defopt 558@end defopt
536 559
537@node Routine Info, Completion, Code Formatting, The IDLWAVE Major Mode 560@node Routine Info, Online Help, Code Formatting, The IDLWAVE Major Mode
538@section Routine Info 561@section Routine Info
539@cindex Routine info 562@cindex Routine info
563@cindex Updating routine info
564@cindex Scanning buffers for routine info
565@cindex Buffers, scanning for routine info
566@cindex Shell, querying for routine info
540 567
568@kindex C-c C-i
541IDL defines more than one thousand procedures, functions and object 569IDL defines more than one thousand procedures, functions and object
542methods. This large command set makes it difficult to remember the 570methods. This large command set makes it difficult to remember the
543calling sequence and keywords of a command. IDLWAVE contains a list of 571calling sequence and keywords of a command. IDLWAVE contains a list of
@@ -546,11 +574,12 @@ list was created by scanning the IDL manual and might contain (very few)
546errors. Please report any detected errors to the maintainer, so that 574errors. Please report any detected errors to the maintainer, so that
547they can be fixed.}. It also scans Emacs buffers and library files for 575they can be fixed.}. It also scans Emacs buffers and library files for
548routine definitions and queries the IDLWAVE-Shell for the properties of 576routine definitions and queries the IDLWAVE-Shell for the properties of
549modules currently compiled under the shell. When you have edited a 577modules currently compiled under the shell. This information is updated
550buffer or compiled additional routines under the shell, use @kbd{C-c 578automatically. If you think the information is not up-to-date, use
551C-i} (@code{idlwave-update-routine-info}) to update IDLWAVE's idea about 579@kbd{C-c C-i} (@code{idlwave-update-routine-info}) to enforce a global
552these routines.@refill 580update.
553 581
582@kindex C-c ?
554To display the information about a routine, press @kbd{C-c ?} which 583To display the information about a routine, press @kbd{C-c ?} which
555calls the command @code{idlwave-routine-info}. When the current cursor 584calls the command @code{idlwave-routine-info}. When the current cursor
556position is on the name or in the argument list of a procedure or 585position is on the name or in the argument list of a procedure or
@@ -562,7 +591,7 @@ plot,x,alog(x+5*sin(x) + 2),
562 1 2 3 4 5 6 7 8 591 1 2 3 4 5 6 7 8
563@end example 592@end example
564 593
565@cindex Object methods 594@cindex Default routine, for info and help
566On positions 1,2 and 8, information about the @samp{plot} procedure will 595On positions 1,2 and 8, information about the @samp{plot} procedure will
567be shown. On positions 3,4, and 7, the @samp{alog} function will be 596be shown. On positions 3,4, and 7, the @samp{alog} function will be
568described, while positions 5 and 6 will select the @samp{sin} function. 597described, while positions 5 and 6 will select the @samp{sin} function.
@@ -572,81 +601,292 @@ object.
572 601
573@cindex Calling sequences 602@cindex Calling sequences
574@cindex Keywords of a routine 603@cindex Keywords of a routine
604@cindex Routine source information
575The description displayed contains the calling sequence, the list of 605The description displayed contains the calling sequence, the list of
576keywords and the origin of this information (@emph{system routine}, 606keywords and the source location of this routine. It looks like this:
577@emph{library routine}, @emph{Emacs buffer}, or @emph{compiled
578module}). It looks like this:
579 607
580@example 608@example
581Usage: MAP_PROJ_INFO, iproj 609Usage: XMANAGER, NAME, ID
582Keywords: CIRCLE CURRENT CYLINDRICAL NAME UV_LIMITS WIDTH 610Keywords: BACKGROUND CATCH CLEANUP EVENT_HANDLER GROUP_LEADER
583Origin: buffer visiting /soft1/idl/lib/map_set.pro 611 JUST_REG MODAL NO_BLOCK
612Source: SystemLib [CSB] /soft1/idl53/lib/xmanager.pro
584@end example 613@end example
585 614
615@cindex Categories, of routines
616@cindex Load-path shadows
617@cindex Shadows, load-path
618@cindex IDL variable @code{!PATH}
619@cindex @code{!PATH}, IDL variable
620@cindex IDL variable @code{!DIR}
621@cindex @code{!DIR}, IDL variable
622
623If a definition of this routine exists in several files accessible to
624IDLWAVE, several @samp{Source} lines will point to the different files.
625This may indicate that your routine is shadowing a library routine,
626which may or may not be what you want (@pxref{Load-Path Shadows}). The
627information about the calling sequence and the keywords is derived from
628the first source listed. Library routines can only be supported if you
629have scanned the local IDL library (@pxref{Library Scan}). The source
630entry consists of a @emph{source category}, a set of @emph{flags} and
631the path to the @emph{source file}. The following categories
632exist:
633
634@multitable @columnfractions .15 .85
635@item @i{System}
636@tab A system routine, but we do not know if it is @i{Builtin} or
637@i{SystemLib}. When the system library has bee scanned
638(@pxref{Library Scan}), this category will automatically split into the
639next two.
640@item @i{Builtin}
641@tab A builtin routine with no source code available.
642@item @i{SystemLib}
643@tab A library routine in the official lib directory @file{!DIR/lib}.
644@item @i{Obsolete}
645@tab A library routine in the official lib directory @file{!DIR/lib/obsolete}.
646@item @i{Library}
647@tab A file on IDL's search path @code{!PATH}.
648@item @i{Other}
649@tab Any other file not known to be on the search path.
650@item @i{Unresolved}
651@tab The shell lists this routine as unresolved.
652@end multitable
653
654You can define additional categories based on the file name and path
655with the variable @code{idlwave-special-lib-alist}.
656
657@cindex Flags, in routine info
658@cindex Duplicate routines
659@cindex Multiply defined routines
660@cindex Routine definitions, multiple
661The flags @code{[CSB]} indicate if the file is known to IDLWAVE from the
662library catalog (@w{@code{[C--]}}, @pxref{Library Scan}), from the Shell
663(@w{@code{[-S-]}}) or from an Emacs buffer (@w{@code{[--B]}}).
664Combinations are possible. If a file contains multiple definitions of
665the same routine, the file name will be prefixed with @samp{(Nx)} where
666@samp{N} is the number of definitions.
667
668@cindex Online Help from the routine info buffer
669@cindex Active text, in routine info
670@cindex Inserting keywords, from routine info
671@cindex Source file, access from routine info
586Some of the text in the @file{*Help*} buffer will be active (it 672Some of the text in the @file{*Help*} buffer will be active (it
587highlights when you move the mouse over it). Clicking with the middle 673highlights when you move the mouse over it). Clicking on these items
588mouse button on any of the active fields will try to find the source file of 674will have the following effects:
589the routine and display it in another window. Another click on the same 675
590line will switch back to the buffer from which @kbd{C-c ?} was 676@multitable @columnfractions 0.15 0.85
591called. Clicking with the right mouse button on an active field will 677@item @i{Usage}
592search the IDL online help for this item.@refill 678@tab If online help is installed, a click with the @emph{right} mouse
679button on the @i{Usage:} line will access the help for the
680routine (@pxref{Online Help}).
681@item @i{Keyword}
682@tab Online help about keywords is also available with the
683@emph{right} mouse button. Clicking on a keyword with the @emph{middle}
684mouse button will insert this keyword in the buffer from where
685@code{idlwave-routine-info} was called. Holding down @key{SHIFT} while
686clicking also adds the initial @samp{/}.
687@item @i{Source}
688@tab Clicking with the @emph{middle} mouse button on a @samp{Source} line
689finds the source file of the routine and visits it in another window.
690Another click on the same line switches back to the buffer from which
691@kbd{C-c ?} was called. If you use the @emph{right} mouse button, the
692source will not be visited by a buffer, but displayed in the online help
693window.
694@end multitable
593 695
594@cindex Routine source file 696@defopt idlwave-resize-routine-help-window (@code{t})
595@cindex Module source file 697Non-@code{nil} means, resize the Routine-info @file{*Help*} window to
596Another way to find the source file of a routine is the command @kbd{C-c 698fit the content.
597C-v} (@code{idlwave-find-module}). It asks for a module name, offering 699@end defopt
598the same default as @code{idlwave-routine-info} would have used. In the
599minibuffer, specify a complete routine name (including the class part).
600IDLWAVE will display the source file in another window.@refill
601 700
602@cindex @code{RESOLVE_ROUTINE} 701@defopt idlwave-special-lib-alist
603@cindex Compiling library modules 702Alist of regular expressions matching special library directories.
604@cindex Routines, resolving 703@end defopt
605@cindex Online help, for IDL routines
606The two other commands that work with the routine at point need a
607running IDLWAVE shell. The key sequence @kbd{M-?} calls the command
608@code{idlwave-routine-info-from-idlhelp}. This sends the command line
609@samp{ONLINE_HELP, '@var{routine_name}'} to IDL in order to display the
610documentation of the routine in the IDL online documentation. The key
611sequence @kbd{C-c =} calls the command @code{idlwave-resolve} and sends
612the line @samp{RESOLVE_ROUTINE, '@var{routine_name}'} to IDL in order to
613resolve (compile) it.
614 704
615@code{idlwave-resolve} is one way to get a library module within reach 705@defopt idlwave-rinfo-max-source-lines (@code{5})
616of IDLWAVE's routine info collecting functions. A better way is to 706Maximum number of source files displayed in the Routine Info window.
617prescan (parts of) the library (@pxref{Library Scan}). Routine info on 707@end defopt
618library modules will then be available without the need to compile the
619modules first, and even without a running shell.
620 708
621@xref{Sources of Routine Info}, for in-depth information where IDLWAVE 709@page
622collects data about routines, and how to update this information.
623 710
624@defopt idlwave-scan-all-buffers-for-routine-info (@code{t}) 711@node Online Help, Completion, Routine Info, The IDLWAVE Major Mode
625Non-@code{nil} means, scan all buffers for IDL programs when updating 712@section Online Help
626info. When this variable is @code{nil}, it only parses the current 713
627buffer.@refill 714@cindex Online Help
715@cindex @file{idlw-help.txt}
716@cindex @file{idlw-help.el}
717@cindex IDL manual, ASCII version
718@cindex Installing online help
719@cindex Online Help, Installation
720@cindex Speed, of online help
721For IDL system routines, RSI provides extensive documentation. IDLWAVE
722can access an ASCII version of this documentation very quickly and
723accurately. This is @emph{much} faster than using the IDL online help
724application, also because usually IDLWAVE gets you to the right place in
725the docs directly, without additional browsing and scrolling. For this
726online help to work, you need an ASCII version of the IDL documentation
727which is not part of the standard IDLWAVE distribution. The required
728files can be downloaded from @uref{@value{IDLWAVE-HOMEPAGE}, the
729maintainers webpage}. As the text is extracted from PDF files, the
730formatting of the help text is good for normal text, but graphics and
731multiline equations will not be well represented. See also
732@ref{Documentation Scan}.
733
734@cindex Source code, as online help
735@cindex DocLib header, as online help
736For routines which are not documented in the IDL manual (for example
737your own routines), the source code is used as help text. If the
738requested information can be found in a (more or less) standard DocLib
739file header, IDLWAVE shows the header. Otherwise the routine definition
740statement (@code{pro}/@code{function}) is shown.
741
742@kindex M-?
743In any IDL program, press @kbd{M-?} (@code{idlwave-context-help}) or
744click with @kbd{S-mouse-3} to access context sensitive online help. The
745following locations are recognized as context:
746
747@cindex Context, for online help
748@multitable @columnfractions .25 .75
749@item @i{Routine name}
750@tab The name of a routine (function, procedure, method).
751@item @i{Keyword Parameter}
752@tab Keyword parameter of a routine.
753@item @i{System Variable}
754@tab System variable like @code{!DPI}.
755@item @i{IDL Statement}
756@tab Like @code{PRO}, @code{REPEAT}, or @code{COMPILE_OPT}.
757@item @i{Class name}
758@tab Class name in @code{OBJ_NEW} call.
759@item @i{Executive Command}
760@tab Executive command like @code{.RUN}. Mostly useful in the shell.
761@item @i{Default}
762@tab The routine that would be selected for routine info display.
763@end multitable
764
765@cindex @code{OBJ_NEW}, special online help
766Note that the @code{OBJ_NEW} function is special in that the help
767displayed depends on the cursor position: If the cursor is on the
768@samp{OBJ_NEW}, this function is described. If it is on the class name
769inside the quotes, the documentation for the class is pulled up. If the
770cursor is @emph{after} the class name, anywhere in the argument list,
771the documentation for the corresponding @code{Init} method and its
772keywords is targeted.
773
774@noindent Apart from source buffers, there are two more places from
775which online help can be accessed.
776
777@itemize @bullet
778@item
779Online help for routines and keywords can be accessed through the
780Routine Info display. Click with @kbd{mouse-3} on an item to see the
781corresponding help (@pxref{Routine Info}).
782@item
783When using completion and Emacs pops up a window with possible
784completions, clicking with @kbd{mouse-3} on a completion item invokes
785help on that item (@pxref{Completion}).
786@end itemize
787@noindent
788In both cases, a blue face indicates that the item is documented in the
789IDL manual.
790
791@page
792
793@cindex Help application, keybindings
794@cindex Keybindings, in help application
795The help window is normally displayed in a separate frame. The
796following commands can be used to navigate inside the help system.
797
798@multitable @columnfractions .15 .85
799@item @kbd{@key{SPACE}}
800@tab Scroll forward one page.
801@item @kbd{@key{RET}}
802@tab Scroll forward one line.
803@item @kbd{@key{DEL}}
804@tab Scroll back one page.
805@item @kbd{n, p}
806@tab Browse to the next or previous topic (in physical sequence).
807@item @kbd{b, f}
808@tab Move back and forward through the help topic history.
809@item @kbd{c}
810@tab Clear the history.
811@item @kbd{mouse-2}
812@tab Follow a link. Active links are displayed in a different font.
813Items under @i{See Also} are active, and classes have links to their
814methods and back.
815@item @kbd{o}
816@tab Open a topic. The topic can be selected with completion.
817@item @kbd{*}
818@tab Load the whole help file into Emacs, for global text searches.
819@item @kbd{q}
820@tab Kill the help window.
821@end multitable
822
823@sp 1
824@noindent When the help text is a source file, the following commands
825are also available.
826@multitable @columnfractions .15 .85
827@item @kbd{h}
828@tab Jump to DocLib Header of the routine whose source is displayed
829as help.
830@item @kbd{H}
831@tab Jump to the first DocLib Header in the file.
832@item @kbd{.} @r{(Dot)}
833@tab Jump back and forth between the routine definition (the
834@code{pro}/@code{function} statement) and the description of the help
835item in the DocLib header.
836@item @kbd{F}
837@tab Fontify the buffer like source code. See the variable @code{idlwave-help-fontify-source-code}.
838@end multitable
839
840@defopt idlwave-help-directory
841The directory where idlw-help.txt and idlw-help.el are stored.
628@end defopt 842@end defopt
629 843
630@defopt idlwave-query-shell-for-routine-info (@code{t}) 844@defopt idlwave-help-use-dedicated-frame (@code{t})
631Non-@code{nil} means query the shell for info about compiled routines. 845Non-nil means, use a separate frame for Online Help if possible.
632@end defopt 846@end defopt
633 847
634@defopt idlwave-resize-routine-help-window (@code{t}) 848@defopt idlwave-help-frame-parameters
635Non-@code{nil} means, resize the Routine-info @file{*Help*} window to 849The frame parameters for the special Online Help frame.
636fit the content.@refill 850@end defopt
851
852@defopt idlwave-max-popup-menu-items (@code{20})
853Maximum number of items per pane in popup menus.
854@end defopt
855
856@defopt idlwave-extra-help-function
857Function to call for help if the normal help fails.
637@end defopt 858@end defopt
638 859
860@defopt idlwave-help-fontify-source-code (@code{nil})
861Non-nil means, fontify source code displayed as help.
862@end defopt
639 863
640@node Completion, Code Templates, Routine Info, The IDLWAVE Major Mode 864@defopt idlwave-help-source-try-header (@code{t})
865Non-nil means, try to find help in routine header when displaying source
866file.
867@end defopt
868
869@defopt idlwave-help-link-face
870The face for links to IDLWAVE online help.
871@end defopt
872
873@node Completion, Routine Source, Online Help, The IDLWAVE Major Mode
641@section Completion 874@section Completion
642@cindex Completion 875@cindex Completion
643 876@cindex Keyword completion
644IDLWAVE offers completion for routine names and keywords. As in many 877@cindex Method completion
645programming modes, completion is bound to @kbd{M-@key{TAB}}. 878@cindex Object method completion
646Completion uses the same internal information as routine info, 879@cindex Class name completion
647so in order to update IDLWAVE's idea about your own routines after you 880@cindex Function name completion
648have edited or compiled them, press @kbd{C-c C-i} 881@cindex Procedure name completion
649(@code{idlwave-update-routine-info}).@refill 882
883@kindex M-@key{TAB}
884@kindex C-c C-i
885IDLWAVE offers completion for class names, routine names and keywords.
886As in many programming modes, completion is bound to @kbd{M-@key{TAB}}.
887Completion uses the same internal information as routine info, so when
888necessary it can be updated with @kbd{C-c C-i}
889(@code{idlwave-update-routine-info}).
650 890
651The completion function is context sensitive and figures out what to 891The completion function is context sensitive and figures out what to
652complete at point. Here are example lines and what @kbd{M-@key{TAB}} 892complete at point. Here are example lines and what @kbd{M-@key{TAB}}
@@ -663,15 +903,24 @@ obj -> a* @r{Object method (procedure)}
663a(2,3) = obj -> a* @r{Object method (function)} 903a(2,3) = obj -> a* @r{Object method (function)}
664x = obj_new('IDL* @r{Class name} 904x = obj_new('IDL* @r{Class name}
665x = obj_new('MyCl',a* @r{Keyword to @code{Init} method in class @code{MyCl}} 905x = obj_new('MyCl',a* @r{Keyword to @code{Init} method in class @code{MyCl}}
906pro A* @r{Class name}
907pro * @r{Fill in @code{Class::} of first method in this file}
666@end example 908@end example
667 909
668@cindex Scrolling the @file{*Completions*} window 910@cindex Scrolling the @file{*Completions*} window
669@cindex Completion, scrolling 911@cindex Completion, scrolling
912@cindex Completion, Online Help
913@cindex Online Help in @file{*Completions*} buffer
670If the list of completions is too long to fit in the 914If the list of completions is too long to fit in the
671@file{*Completions*} window, the window can be scrolled by pressing 915@file{*Completions*} window, the window can be scrolled by pressing
672@kbd{M-@key{TAB}} repeatedly.@refill 916@kbd{M-@key{TAB}} repeatedly. Online help (if installed) for each
917possible completion is available by clicking with @kbd{mouse-3} on the
918item. Items for which system online help (from the IDL manual) is
919available will be displayed in a different font. For other items, the
920corresponding source code or DocLib header is available as help text.
673 921
674@cindex Case of completed words 922@cindex Case of completed words
923@cindex Mixed case completion
675The case of the completed words is determined by what is already in the 924The case of the completed words is determined by what is already in the
676buffer. When the partial word being completed is all lower case, the 925buffer. When the partial word being completed is all lower case, the
677completion will be lower case as well. If at least one character is 926completion will be lower case as well. If at least one character is
@@ -679,11 +928,11 @@ upper case, the string will be completed in upper case or mixed case.
679The default is to use upper case for procedures, functions and keywords, 928The default is to use upper case for procedures, functions and keywords,
680and mixed case for object class names and methods, similar to the 929and mixed case for object class names and methods, similar to the
681conventions in the IDL manuals. These defaults can be changed with the 930conventions in the IDL manuals. These defaults can be changed with the
682variable @code{idlwave-completion-case}.@refill 931variable @code{idlwave-completion-case}.
683 932
684@defopt idlwave-completion-case 933@defopt idlwave-completion-case
685Association list setting the case (UPPER/lower/Capitalized/...) of completed 934Association list setting the case (UPPER/lower/Capitalized/...) of completed
686words.@refill 935words.
687@end defopt 936@end defopt
688 937
689@defopt idlwave-completion-force-default-case (@code{nil}) 938@defopt idlwave-completion-force-default-case (@code{nil})
@@ -694,28 +943,33 @@ strings will be completed to lower case.
694 943
695@defopt idlwave-complete-empty-string-as-lower-case (@code{nil}) 944@defopt idlwave-complete-empty-string-as-lower-case (@code{nil})
696Non-@code{nil} means, the empty string is considered lower case for 945Non-@code{nil} means, the empty string is considered lower case for
697completion.@refill 946completion.
698@end defopt 947@end defopt
699 948
700@defopt idlwave-keyword-completion-adds-equal (@code{t}) 949@defopt idlwave-keyword-completion-adds-equal (@code{t})
701Non-@code{nil} means, completion automatically adds @samp{=} after 950Non-@code{nil} means, completion automatically adds @samp{=} after
702completed keywords.@refill 951completed keywords.
703@end defopt 952@end defopt
704 953
705@defopt idlwave-function-completion-adds-paren (@code{t}) 954@defopt idlwave-function-completion-adds-paren (@code{t})
706Non-@code{nil} means, completion automatically adds @samp{(} after 955Non-@code{nil} means, completion automatically adds @samp{(} after
707completed function. A value of `2' means, also add the closing 956completed function. A value of `2' means, also add the closing
708parenthesis and position cursor between the two.@refill 957parenthesis and position cursor between the two.
709@end defopt 958@end defopt
710 959
711@defopt idlwave-completion-restore-window-configuration (@code{t}) 960@defopt idlwave-completion-restore-window-configuration (@code{t})
712Non-@code{nil} means, restore window configuration after successful 961Non-@code{nil} means, restore window configuration after successful
713completion.@refill 962completion.
963@end defopt
964
965@defopt idlwave-highlight-help-links-in-completion (@code{t})
966Non-nil means, highlight completions for which system help is available.
714@end defopt 967@end defopt
715 968
716@subsubheading Object Method Completion and Class Ambiguity 969@subsubheading Object Method Completion and Class Ambiguity
717@cindex Object methods 970@cindex Object methods
718@cindex Class ambiguity 971@cindex Class ambiguity
972@cindex @code{self} object, default class
719An object method is not uniquely determined without the object's class. 973An object method is not uniquely determined without the object's class.
720Since the class part is usually omitted in the source code, IDLWAVE 974Since the class part is usually omitted in the source code, IDLWAVE
721considers all available methods in all classes as possible completions 975considers all available methods in all classes as possible completions
@@ -723,24 +977,28 @@ of an object method name. For keywords, the combined keywords of the
723current method in all available classes will be considered. In the 977current method in all available classes will be considered. In the
724@file{*Completions*} buffer, the classes allowed for each completion 978@file{*Completions*} buffer, the classes allowed for each completion
725will be shown next to the item (see option 979will be shown next to the item (see option
726@code{idlwave-completion-show-classes}).@refill 980@code{idlwave-completion-show-classes}). As a special case, the class
981of an object called @samp{self} object is always the class of the
982current routine.
727 983
984@cindex Forcing class query.
985@cindex Class query, forcing
728You can also call @code{idlwave-complete} with a prefix arg: @kbd{C-u 986You can also call @code{idlwave-complete} with a prefix arg: @kbd{C-u
729M-@key{TAB}}. IDLWAVE will then prompt you for the class in order to 987M-@key{TAB}}. IDLWAVE will then prompt you for the class in order to
730narrow down the number of possible completions. The variable 988narrow down the number of possible completions. The variable
731@code{idlwave-query-class} can be configured to make this behavior the 989@code{idlwave-query-class} can be configured to make this behavior the
732default (not really recommended). After you have specified the class 990default (not recommended). After you have specified the class
733for a particular statement (e.g. when completing the method), IDLWAVE 991for a particular statement (e.g. when completing the method), IDLWAVE
734can remember it for the rest of the editing session. Subsequent 992can remember it for the rest of the editing session. Subsequent
735completions in the same statement (e.g. keywords) can then reuse this 993completions in the same statement (e.g. keywords) can then reuse this
736class information. Remembering the class works by placing a text 994class information. Remembering the class works by placing a text
737property in the object operator @samp{->}. This is not enabled by 995property in the object operator @samp{->}. This is not enabled by
738default - the variable @code{idlwave-store-inquired-class} can be used 996default - the variable @code{idlwave-store-inquired-class} can be used
739to turn it on.@refill 997to turn it on.
740 998
741@defopt idlwave-completion-show-classes (@code{1}) 999@defopt idlwave-completion-show-classes (@code{1})
742Non-@code{nil} means, show classes in @file{*Completions*} buffer when 1000Non-@code{nil} means, show classes in @file{*Completions*} buffer when
743completing object methods and keywords.@refill 1001completing object methods and keywords.
744@end defopt 1002@end defopt
745 1003
746@defopt idlwave-completion-fontify-classes (@code{t}) 1004@defopt idlwave-completion-fontify-classes (@code{t})
@@ -748,20 +1006,64 @@ Non-@code{nil} means, fontify the classes in completions buffer.
748@end defopt 1006@end defopt
749 1007
750@defopt idlwave-query-class (@code{nil}) 1008@defopt idlwave-query-class (@code{nil})
751Association list governing query for object classes during completion.@refill 1009Association list governing query for object classes during completion.
752@end defopt 1010@end defopt
753 1011
754@defopt idlwave-store-inquired-class (@code{nil}) 1012@defopt idlwave-store-inquired-class (@code{nil})
755Non-@code{nil} means, store class of a method call as text property on 1013Non-@code{nil} means, store class of a method call as text property on
756@samp{->}.@refill 1014@samp{->}.
757@end defopt 1015@end defopt
758 1016
759@defopt idlwave-class-arrow-face 1017@defopt idlwave-class-arrow-face
760Face to highlight object operator arrows @samp{->} which carry a class 1018Face to highlight object operator arrows @samp{->} which carry a class
761property.@refill 1019text property.
762@end defopt 1020@end defopt
763 1021
764@node Code Templates, Actions, Completion, The IDLWAVE Major Mode 1022@node Routine Source, Resolving Routines, Completion, The IDLWAVE Major Mode
1023
1024@section Routine Source
1025@cindex Routine source file
1026@cindex Module source file
1027@cindex Source file, of a routine
1028@kindex C-c C-v
1029Apart from clicking on a @i{Source:} line in the routine info window,
1030there is also another way to find the source file of a routine. The
1031command @kbd{C-c C-v} (@code{idlwave-find-module}) asks for a module
1032name, offering the same default as @code{idlwave-routine-info} would
1033have used. In the minibuffer, specify a complete routine name
1034(including the class part). IDLWAVE will display the source file in
1035another window.
1036
1037@cindex Buffers, killing
1038@cindex Killing autoloaded buffers
1039Since getting the source of a routine into a buffer is so easy with
1040IDLWAVE, too many buffers visiting different IDL source files are
1041sometimes created. The special command @kbd{C-c C-k}
1042(@code{idlwave-kill-autoloaded-buffers}) can be used to remove these
1043buffers.
1044
1045@node Resolving Routines, Code Templates, Routine Source, The IDLWAVE Major Mode
1046@section Resolving Routines
1047@cindex @code{RESOLVE_ROUTINE}
1048@cindex Compiling library modules
1049@cindex Routines, resolving
1050
1051The key sequence @kbd{C-c =} calls the command @code{idlwave-resolve}
1052and sends the line @samp{RESOLVE_ROUTINE, '@var{routine_name}'} to IDL
1053in order to resolve (compile) it. The default routine to be resolved is
1054taken from context, but you get a chance to edit it.
1055
1056@code{idlwave-resolve} is one way to get a library module within reach
1057of IDLWAVE's routine info collecting functions. A better way is to
1058scan (parts of) the library (@pxref{Library Scan}). Routine info on
1059library modules will then be available without the need to compile the
1060modules first, and even without a running shell.
1061
1062@xref{Sources of Routine Info}, for in-depth information where IDLWAVE
1063collects data about routines, and how to update this information.
1064
1065
1066@node Code Templates, Actions, Resolving Routines, The IDLWAVE Major Mode
765@section Code Templates 1067@section Code Templates
766@cindex Code templates 1068@cindex Code templates
767@cindex Abbreviations 1069@cindex Abbreviations
@@ -811,11 +1113,11 @@ idlwave-list-abbrevs}.
811 1113
812The templates are expanded in upper or lower case, depending upon the 1114The templates are expanded in upper or lower case, depending upon the
813variables @code{idlwave-abbrev-change-case} and 1115variables @code{idlwave-abbrev-change-case} and
814@code{idlwave-reserved-word-upcase}.@refill 1116@code{idlwave-reserved-word-upcase}.
815 1117
816@defopt idlwave-abbrev-start-char 1118@defopt idlwave-abbrev-start-char
817A single character string used to start abbreviations in abbrev 1119A single character string used to start abbreviations in abbrev
818mode.@refill 1120mode.
819@end defopt 1121@end defopt
820 1122
821@defopt idlwave-abbrev-move (@code{t}) 1123@defopt idlwave-abbrev-move (@code{t})
@@ -834,20 +1136,21 @@ to enforce coding standards. Most actions which have been implemented
834in IDLWAVE are turned off by default, assuming that the average user 1136in IDLWAVE are turned off by default, assuming that the average user
835wants her code the way she writes it. But if you are a lazy typist and 1137wants her code the way she writes it. But if you are a lazy typist and
836want your code to adhere to certain standards, they can be 1138want your code to adhere to certain standards, they can be
837helpful.@refill 1139helpful.
838 1140
839Action can be applied in three ways: 1141Action can be applied in three ways:
1142
840@itemize @bullet 1143@itemize @bullet
841@item 1144@item
842Some actions are applied directly while typing. For example, pressing 1145Some actions are applied directly while typing. For example, pressing
843@samp{=} can run a check to make sure that this operator is surrounded 1146@samp{=} can run a check to make sure that this operator is surrounded
844by spaces and insert these spaces if necessary. Pressing @key{SPC} 1147by spaces and insert these spaces if necessary. Pressing @key{SPC}
845after a reserved word can call a command to change the word to upper 1148after a reserved word can call a command to change the word to upper
846case.@refill 1149case.
847@item 1150@item
848When a line is re-indented with @key{TAB}, actions can be applied to the 1151When a line is re-indented with @key{TAB}, actions can be applied to the
849entire line. To enable this, the variable @code{idlwave-do-actions} 1152entire line. To enable this, the variable @code{idlwave-do-actions}
850must be non-@code{nil}.@refill 1153must be non-@code{nil}.
851@item 1154@item
852@cindex Foreign code, adapting 1155@cindex Foreign code, adapting
853@cindex Actions, applied to foreign code 1156@cindex Actions, applied to foreign code
@@ -856,7 +1159,7 @@ convert foreign code to your own style. To do this, mark the relevant
856part of the code and execute @kbd{M-x expand-region-abbrevs}. Useful 1159part of the code and execute @kbd{M-x expand-region-abbrevs}. Useful
857marking commands are @kbd{C-x h} (the entire file) or @kbd{M-C-h} (the 1160marking commands are @kbd{C-x h} (the entire file) or @kbd{M-C-h} (the
858current subprogram). @xref{Code Indentation}, for information how to 1161current subprogram). @xref{Code Indentation}, for information how to
859ajust the indentation of the code.@refill 1162adjust the indentation of the code.
860@end itemize 1163@end itemize
861 1164
862@defopt idlwave-do-actions (@code{nil}) 1165@defopt idlwave-do-actions (@code{nil})
@@ -874,6 +1177,7 @@ Non-@code{nil} means performs actions when indenting.
874@cindex Block boundary check 1177@cindex Block boundary check
875@cindex @code{END} type checking 1178@cindex @code{END} type checking
876@cindex @code{END}, automatic insertion 1179@cindex @code{END}, automatic insertion
1180@cindex @code{END}, expanding
877@cindex Block, closing 1181@cindex Block, closing
878@cindex Closing a block 1182@cindex Closing a block
879 1183
@@ -881,38 +1185,43 @@ Whenever you type an @code{END} statement, IDLWAVE finds the
881corresponding start of the block and the cursor blinks back to that 1185corresponding start of the block and the cursor blinks back to that
882location for a second. If you have typed a specific @code{END}, like 1186location for a second. If you have typed a specific @code{END}, like
883@code{ENDIF} or @code{ENDCASE}, you get a warning if that kind of END 1187@code{ENDIF} or @code{ENDCASE}, you get a warning if that kind of END
884does not match the type of block it terminates.@refill 1188does not match the type of block it terminates.
885 1189
886Set the variable @code{idlwave-expand-generic-end} in order to have all 1190Set the variable @code{idlwave-expand-generic-end} in order to have all
887generic @code{END} statements automatically expanded to a specific type. 1191generic @code{END} statements automatically expanded to a specific type.
888You can also type @kbd{C-c ]} to close the current block by inserting 1192You can also type @kbd{C-c ]} to close the current block by inserting
889the appropriate @code{END} statement.@refill 1193the appropriate @code{END} statement.
890 1194
891@defopt idlwave-show-block (@code{t}) 1195@defopt idlwave-show-block (@code{t})
892Non-@code{nil} means point blinks to block beginning for 1196Non-@code{nil} means point blinks to block beginning for
893@code{idlwave-show-begin}.@refill 1197@code{idlwave-show-begin}.
894@end defopt 1198@end defopt
895 1199
896@defopt idlwave-expand-generic-end (@code{nil}) 1200@defopt idlwave-expand-generic-end (@code{nil})
897Non-@code{nil} means expand generic END to ENDIF/ENDELSE/ENDWHILE etc. 1201Non-@code{nil} means expand generic END to ENDIF/ENDELSE/ENDWHILE etc.
898@end defopt 1202@end defopt
899 1203
1204@defopt idlwave-reindent-end (@code{t})
1205Non-nil means re-indent line after END was typed.
1206@end defopt
1207
900@node Padding Operators, Case Changes, Block Boundary Check, Actions 1208@node Padding Operators, Case Changes, Block Boundary Check, Actions
901@subsection Padding Operators 1209@subsection Padding Operators
902@cindex Padding operators with spaces 1210@cindex Padding operators with spaces
903@cindex Operators, padding with spaces 1211@cindex Operators, padding with spaces
1212@cindex Space, around operators
904 1213
905Some operators can be automatically surrounded by spaces. This can 1214Some operators can be automatically surrounded by spaces. This can
906happen when the operator is typed, or also later when the line is 1215happen when the operator is typed, or also later when the line is
907indented. IDLWAVE contains this setting for the operators @samp{&}, 1216indented. IDLWAVE contains this setting for the operators @samp{&},
908@samp{<}, @samp{>}, @samp{,}, @samp{=}, and @samp{->}@footnote{operators 1217@samp{<}, @samp{>}, @samp{,}, @samp{=}, and @samp{->}@footnote{Operators
909longer than one character can only be padded during line indentation.}, 1218longer than one character can only be padded during line indentation.},
910but the feature is turned off by default. If you want to turn it on, 1219but the feature is turned off by default. If you want to turn it on,
911customize the variables @code{idlwave-surround-by-blank} and 1220customize the variables @code{idlwave-surround-by-blank} and
912@code{idlwave-do-actions}. You can also define similar actions for 1221@code{idlwave-do-actions}. You can also define similar actions for
913other operators by using the function @code{idlwave-action-and-binding} 1222other operators by using the function @code{idlwave-action-and-binding}
914in the mode hook. For example, to enforce space padding of the @samp{+} 1223in the mode hook. For example, to enforce space padding of the @samp{+}
915and @samp{*} operators, try this in @file{.emacs}@refill 1224and @samp{*} operators, try this in @file{.emacs}
916 1225
917@lisp 1226@lisp
918(add-hook 'idlwave-mode-hook 1227(add-hook 'idlwave-mode-hook
@@ -925,23 +1234,25 @@ and @samp{*} operators, try this in @file{.emacs}@refill
925@defopt idlwave-surround-by-blank (@code{nil}) 1234@defopt idlwave-surround-by-blank (@code{nil})
926Non-@code{nil} means, enable @code{idlwave-surround}. If non-nil, 1235Non-@code{nil} means, enable @code{idlwave-surround}. If non-nil,
927@samp{=}, @samp{<}, @samp{>}, @samp{&}, @samp{,}, @samp{->} are 1236@samp{=}, @samp{<}, @samp{>}, @samp{&}, @samp{,}, @samp{->} are
928surrounded with spaces by @code{idlwave-surround}.@refill 1237surrounded with spaces by @code{idlwave-surround}.
929@end defopt 1238@end defopt
930 1239
931@defopt idlwave-pad-keyword (@code{t}) 1240@defopt idlwave-pad-keyword (@code{t})
932Non-@code{nil} means pad @samp{=} for keywords like assignments.@refill 1241Non-@code{nil} means pad @samp{=} for keywords like assignments.
933@end defopt 1242@end defopt
934 1243
935@node Case Changes, , Padding Operators, Actions 1244@node Case Changes, , Padding Operators, Actions
936@subsection Case Changes 1245@subsection Case Changes
937@cindex Case changes 1246@cindex Case changes
1247@cindex Upcase, enforcing for reserved words
1248@cindex Downcase, enforcing for reserved words
938 1249
939Actions can be used to change the case of reserved words or expanded 1250Actions can be used to change the case of reserved words or expanded
940abbreviations by customizing the variables 1251abbreviations by customizing the variables
941@code{idlwave-abbrev-change-case} and 1252@code{idlwave-abbrev-change-case} and
942@code{idlwave-reserved-word-upcase}. If you want to change the case of 1253@code{idlwave-reserved-word-upcase}. If you want to change the case of
943additional words automatically, put something like the following into 1254additional words automatically, put something like the following into
944your @file{.emacs} file:@refill 1255your @file{.emacs} file:
945 1256
946@lisp 1257@lisp
947(add-hook 'idlwave-mode-hook 1258(add-hook 'idlwave-mode-hook
@@ -973,11 +1284,14 @@ expansion.
973@node Doc Header, Motion Commands, Actions, The IDLWAVE Major Mode 1284@node Doc Header, Motion Commands, Actions, The IDLWAVE Major Mode
974@section Documentation Header 1285@section Documentation Header
975@cindex Documentation header 1286@cindex Documentation header
1287@cindex DocLib header
976@cindex Modification timestamp 1288@cindex Modification timestamp
977@cindex Header, for file documentation 1289@cindex Header, for file documentation
978@cindex Timestamp, in doc header. 1290@cindex Timestamp, in doc header.
979@cindex Changelog, in doc header. 1291@cindex Changelog, in doc header.
980 1292
1293@kindex C-c C-h
1294@kindex C-c C-m
981The command @kbd{C-c C-h} inserts a standard routine header into the 1295The command @kbd{C-c C-h} inserts a standard routine header into the
982buffer, with the usual fields for documentation. One of the keywords is 1296buffer, with the usual fields for documentation. One of the keywords is
983@samp{MODIFICATION HISTORY} under which the changes to a routine can be 1297@samp{MODIFICATION HISTORY} under which the changes to a routine can be
@@ -1010,6 +1324,14 @@ Regexp matching the start of a document library header.
1010@cindex Motion commands 1324@cindex Motion commands
1011@cindex Program structure, moving through 1325@cindex Program structure, moving through
1012@cindex Code structure, moving through 1326@cindex Code structure, moving through
1327@cindex @file{Func-menu}, XEmacs package
1328@cindex @file{Imenu}, Emacs package
1329@cindex Function definitions, jumping to
1330@cindex Procedure definitions, jumping to
1331
1332IDLWAVE supports both @file{Imenu} and @file{Func-menu}, two packages
1333which make it easy to jump to the definitions of functions and
1334procedures in the current file.
1013 1335
1014Several commands allow to move quickly through the structure of an IDL 1336Several commands allow to move quickly through the structure of an IDL
1015program. These are 1337program. These are
@@ -1038,6 +1360,7 @@ program. These are
1038 1360
1039@node Misc Options, , Motion Commands, The IDLWAVE Major Mode 1361@node Misc Options, , Motion Commands, The IDLWAVE Major Mode
1040@section Miscellaneous Options 1362@section Miscellaneous Options
1363@cindex Hooks
1041 1364
1042@defopt idlwave-help-application 1365@defopt idlwave-help-application
1043The external application providing reference help for programming. 1366The external application providing reference help for programming.
@@ -1075,6 +1398,12 @@ Normal hook. Executed when @file{idlwave.el} is loaded.
1075@chapter The IDLWAVE Shell 1398@chapter The IDLWAVE Shell
1076@cindex IDLWAVE shell 1399@cindex IDLWAVE shell
1077@cindex Major mode, @code{idlwave-shell-mode} 1400@cindex Major mode, @code{idlwave-shell-mode}
1401@cindex IDL, as Emacs subprocess
1402@cindex Subprocess of Emacs, IDL
1403@cindex Comint, Emacs package
1404@cindex Windows
1405@cindex MacOS
1406@cindex Unix
1078 1407
1079The IDLWAVE shell is an Emacs major mode which allows to run the IDL 1408The IDLWAVE shell is an Emacs major mode which allows to run the IDL
1080program as an inferior process of Emacs. It can be used to work with 1409program as an inferior process of Emacs. It can be used to work with
@@ -1084,7 +1413,7 @@ packages which handles the communication with the IDL program.
1084Unfortunately IDL for Windows and MacOS does not allow the interaction 1413Unfortunately IDL for Windows and MacOS does not allow the interaction
1085with Emacs@footnote{Please inform the maintainer if you come up with a way 1414with Emacs@footnote{Please inform the maintainer if you come up with a way
1086to make the IDLWAVE shell work on these systems.} - so the IDLWAVE shell 1415to make the IDLWAVE shell work on these systems.} - so the IDLWAVE shell
1087only works under Unix.@refill 1416only works under Unix.
1088 1417
1089@menu 1418@menu
1090* Starting the Shell:: How to launch IDL as a subprocess 1419* Starting the Shell:: How to launch IDL as a subprocess
@@ -1098,24 +1427,26 @@ only works under Unix.@refill
1098@cindex Shell, starting 1427@cindex Shell, starting
1099@cindex Dedicated frame, for shell buffer 1428@cindex Dedicated frame, for shell buffer
1100@cindex Frame, for shell buffer 1429@cindex Frame, for shell buffer
1430@cindex Subprocess of Emacs, IDL
1101 1431
1432@kindex C-c C-s
1102The IDLWAVE shell can be started with the command @kbd{M-x 1433The IDLWAVE shell can be started with the command @kbd{M-x
1103idlwave-shell}. In @code{idlwave-mode} the function is bound to 1434idlwave-shell}. In @code{idlwave-mode} the function is bound to
1104@kbd{C-c C-s}. It creates a buffer @file{*idl*} which is used to 1435@kbd{C-c C-s}. It creates a buffer @file{*idl*} which is used to
1105interact with the shell. If the shell is already running, @kbd{C-c C-s} 1436interact with the shell. If the shell is already running, @kbd{C-c C-s}
1106will simple switch to the shell buffer. The command @kbd{C-c C-l} 1437will simple switch to the shell buffer. The command @kbd{C-c C-l}
1107(@code{idlwave-shell-recenter-shell-window}) displays the 1438(@code{idlwave-shell-recenter-shell-window}) displays the
1108shell window without selecting it.@refill 1439shell window without selecting it.
1109 1440
1110In order to create a separate frame for the IDLWAVE shell buffer, call 1441In order to create a separate frame for the IDLWAVE shell buffer, call
1111@code{idlwave-shell} with a prefix argument: @kbd{C-u C-c C-s} or 1442@code{idlwave-shell} with a prefix argument: @kbd{C-u C-c C-s} or
1112@kbd{C-u C-c C-l}. If you always want a dedicated frame for the shell 1443@kbd{C-u C-c C-l}. If you always want a dedicated frame for the shell
1113window, configure the variable 1444window, configure the variable
1114@code{idlwave-shell-use-dedicated-frame}.@refill 1445@code{idlwave-shell-use-dedicated-frame}.
1115 1446
1116The shell can also be started automatically when another command tries 1447The shell can also be started automatically when another command tries
1117to send a command to it. To enable auto start, set the variable 1448to send a command to it. To enable auto start, set the variable
1118@code{idlwave-shell-automatic-start} to @code{t}.@refill 1449@code{idlwave-shell-automatic-start} to @code{t}.
1119 1450
1120@defopt idlwave-shell-explicit-file-name 1451@defopt idlwave-shell-explicit-file-name
1121This is the command to run IDL. 1452This is the command to run IDL.
@@ -1152,22 +1483,22 @@ The frame parameters for a dedicated idlwave-shell frame.
1152@end defopt 1483@end defopt
1153 1484
1154@defopt idlwave-shell-temp-pro-prefix 1485@defopt idlwave-shell-temp-pro-prefix
1155The prefix for temporary IDL files used when compiling regions.@refill 1486The prefix for temporary IDL files used when compiling regions.
1156@end defopt 1487@end defopt
1157 1488
1489@cindex Hooks
1158@defopt idlwave-shell-mode-hook 1490@defopt idlwave-shell-mode-hook
1159Hook for customizing @code{idlwave-shell-mode}. 1491Hook for customizing @code{idlwave-shell-mode}.
1160@end defopt 1492@end defopt
1161 1493
1162@node Using the Shell, Debugging IDL Programs, Starting the Shell, The IDLWAVE Shell 1494@node Using the Shell, Debugging IDL Programs, Starting the Shell, The IDLWAVE Shell
1163@section Using the Shell 1495@section Using the Shell
1164@cindex comint 1496@cindex Comint
1165@cindex Shell, basic commands 1497@cindex Shell, basic commands
1166 1498
1167The IDLWAVE shell works in the same fashion as other shell modes in 1499The IDLWAVE shell works in the same fashion as other shell modes in
1168Emacs. It provides command history, command line editing and job 1500Emacs. It provides command history, command line editing and job
1169control. Here is a list of commonly used commands, see the Emacs 1501control. Here is a list of commonly used commands.
1170documentation on @file{comint} for additional information.@refill
1171 1502
1172@multitable @columnfractions .12 .88 1503@multitable @columnfractions .12 .88
1173@item @kbd{M-p} 1504@item @kbd{M-p}
@@ -1201,16 +1532,18 @@ documentation on @file{comint} for additional information.@refill
1201@end multitable 1532@end multitable
1202 1533
1203In addition to these standard @file{comint} commands, 1534In addition to these standard @file{comint} commands,
1204@code{idlwave-shell-mode} has some bindings which correspond to similar 1535@code{idlwave-shell-mode} provides many of the commands which simplify
1205commands in @code{idlwave-mode}. See @ref{Routine Info} and 1536writing IDL code, including abbreviations, online help, and completion.
1206@ref{Completion} for more information on these commands.@refill 1537See @ref{Routine Info} and @ref{Online Help} and @ref{Completion} for more
1207 1538information on these commands.
1208@cindex Completion in the shell 1539
1209@cindex Routine info in the shell 1540@cindex Completion, in the shell
1541@cindex Routine info, in the shell
1542@cindex Online Help, in the shell
1210@multitable @columnfractions .12 .88 1543@multitable @columnfractions .12 .88
1211@item @kbd{@key{TAB}} 1544@item @kbd{@key{TAB}}
1212@tab Completion of file names, routine names and keywords 1545@tab Completion of file names, routine names and keywords
1213(@code{idlwave-shell-complete})@refill 1546(@code{idlwave-shell-complete})
1214@item @kbd{M-@key{TAB}} 1547@item @kbd{M-@key{TAB}}
1215@tab Same as @key{TAB} 1548@tab Same as @key{TAB}
1216@item @kbd{C-c ?} 1549@item @kbd{C-c ?}
@@ -1228,7 +1561,36 @@ commands in @code{idlwave-mode}. See @ref{Routine Info} and
1228 1561
1229@defopt idlwave-shell-file-name-chars 1562@defopt idlwave-shell-file-name-chars
1230The characters allowed in file names, as a string. Used for file name 1563The characters allowed in file names, as a string. Used for file name
1231completion.@refill 1564completion.
1565@end defopt
1566
1567@page
1568@cindex Input mode
1569@cindex Character input mode (Shell)
1570@cindex Line input mode (Shell)
1571@cindex Magic spells, for input mode
1572@cindex Spells, magic
1573IDLWAVE works in line input mode: You compose a full command line, using
1574all the power Emacs gives you to do this. When you press @key{RET}, the
1575whole line is sent to IDL. Sometimes it is necessary to send single
1576characters (without a newline), for example when an IDL program is
1577waiting for single character input with the @code{GET_KBRD} function.
1578You can send a single character to IDL with the command @kbd{C-c C-x}
1579(@code{idlwave-shell-send-char}). When you press @kbd{C-c C-y}
1580(@code{idlwave-shell-char-mode-loop}), IDLWAVE runs a blocking loop
1581which accepts characters and immediately sends them to IDL. The loop
1582can be exited with @kbd{C-g}. It terminates also automatically when the
1583current IDL command is finished. Check the documentation of the two
1584variables described below for a way to make IDL programs trigger
1585automatic switches of the input mode.
1586
1587@defopt idlwave-shell-use-input-mode-magic (@code{nil})
1588Non-nil means, IDLWAVE should check for input mode spells in output.
1589@end defopt
1590
1591@defopt idlwave-shell-input-mode-spells
1592The three regular expressions which match the magic spells for input
1593modes.
1232@end defopt 1594@end defopt
1233 1595
1234@node Debugging IDL Programs, , Using the Shell, The IDLWAVE Shell 1596@node Debugging IDL Programs, , Using the Shell, The IDLWAVE Shell
@@ -1237,12 +1599,13 @@ completion.@refill
1237@cindex Keybindings for debugging 1599@cindex Keybindings for debugging
1238@cindex Toolbar 1600@cindex Toolbar
1239 1601
1602@kindex C-c C-d
1240Programs can be compiled, run, and debugged directly from the source 1603Programs can be compiled, run, and debugged directly from the source
1241buffer in Emacs. The IDLWAVE shell installs keybindings both in the 1604buffer in Emacs. The IDLWAVE shell installs keybindings both in the
1242shell buffer and in all IDL code buffers of the current Emacs session. 1605shell buffer and in all IDL code buffers of the current Emacs session.
1243On Emacs versions which support this, it also installs a debugging 1606On Emacs versions which support this, it also installs a debugging
1244toolbar. The display of the toolbar can be toggled with @kbd{C-c C-d 1607toolbar. The display of the toolbar can be toggled with @kbd{C-c C-d
1245C-t} (@code{idlwave-shell-toggle-toolbar}).@refill 1608C-t} (@code{idlwave-shell-toggle-toolbar}).
1246 1609
1247The debugging keybindings are by default on the prefix key @kbd{C-c 1610The debugging keybindings are by default on the prefix key @kbd{C-c
1248C-d}, so for example setting a breakpoint is done with @kbd{C-c C-d 1611C-d}, so for example setting a breakpoint is done with @kbd{C-c C-d
@@ -1252,9 +1615,9 @@ available, turn on the variable
1252setting on @kbd{A-b}. In the remainder of this chapter we will assume 1615setting on @kbd{A-b}. In the remainder of this chapter we will assume
1253that the @kbd{C-c C-d} bindings are active. 1616that the @kbd{C-c C-d} bindings are active.
1254 1617
1255@defopt idlwave-shell-prefix-key 1618@defopt idlwave-shell-prefix-key (@kbd{C-c C-d})
1256The prefix key for the debugging map 1619The prefix key for the debugging map
1257@code{idlwave-shell-mode-prefix-map}.@refill 1620@code{idlwave-shell-mode-prefix-map}.
1258@end defopt 1621@end defopt
1259 1622
1260@defopt idlwave-shell-activate-prefix-keybindings (@code{t}) 1623@defopt idlwave-shell-activate-prefix-keybindings (@code{t})
@@ -1269,7 +1632,7 @@ keys, like @kbd{A-b}.
1269 1632
1270@defopt idlwave-shell-use-toolbar (@code{t}) 1633@defopt idlwave-shell-use-toolbar (@code{t})
1271Non-@code{nil} means, use the debugging toolbar in all IDL related 1634Non-@code{nil} means, use the debugging toolbar in all IDL related
1272buffers.@refill 1635buffers.
1273@end defopt 1636@end defopt
1274 1637
1275 1638
@@ -1286,10 +1649,11 @@ buffers.@refill
1286@cindex Default command line, executing 1649@cindex Default command line, executing
1287@cindex Executing a default command line 1650@cindex Executing a default command line
1288 1651
1652@kindex C-c C-d C-c
1289In order to compile the current buffer under the IDLWAVE shell, press 1653In order to compile the current buffer under the IDLWAVE shell, press
1290@kbd{C-c C-d C-c} (@code{idlwave-save-and-run}). This first saves the 1654@kbd{C-c C-d C-c} (@code{idlwave-save-and-run}). This first saves the
1291current buffer and then send the command @samp{.run path/to/file} to the 1655current buffer and then send the command @samp{.run path/to/file} to the
1292shell. You can laso execute @kbd{C-c C-d C-c} from the shell buffer, in 1656shell. You can also execute @kbd{C-c C-d C-c} from the shell buffer, in
1293which case the most recently compiled buffer will be saved and 1657which case the most recently compiled buffer will be saved and
1294re-compiled. 1658re-compiled.
1295 1659
@@ -1300,29 +1664,32 @@ This command first resets IDL from a state of interrupted execution by
1300closing all files and returning to the main interpreter level. Then a 1664closing all files and returning to the main interpreter level. Then a
1301default command line is send to the shell. To edit the default command 1665default command line is send to the shell. To edit the default command
1302line, call @code{idlwave-shell-execute-default-command-line} with a 1666line, call @code{idlwave-shell-execute-default-command-line} with a
1303prefix argument: @kbd{C-u C-c C-d C-y}.@refill 1667prefix argument: @kbd{C-u C-c C-d C-y}.
1304 1668
1305@defopt idlwave-shell-mark-stop-line (@code{t}) 1669@defopt idlwave-shell-mark-stop-line (@code{t})
1306Non-@code{nil} means, mark the source code line where IDL is currently 1670Non-@code{nil} means, mark the source code line where IDL is currently
1307stopped. The value decides about the preferred method. Legal values 1671stopped. The value decides about the preferred method. Legal values
1308are @code{nil}, @code{t}, @code{arrow}, and @code{face}.@refill 1672are @code{nil}, @code{t}, @code{arrow}, and @code{face}.
1309@end defopt 1673@end defopt
1310 1674
1311@defopt idlwave-shell-overlay-arrow 1675@defopt idlwave-shell-overlay-arrow (@code{">"})
1312The overlay arrow to display at source lines where execution 1676The overlay arrow to display at source lines where execution
1313halts.@refill 1677halts.
1314@end defopt 1678@end defopt
1315 1679
1316@defopt idlwave-shell-stop-line-face 1680@defopt idlwave-shell-stop-line-face
1317The face which highlights the source line where IDL is 1681The face which highlights the source line where IDL is
1318stopped.@refill 1682stopped.
1319@end defopt 1683@end defopt
1320 1684
1321@node Breakpoints and Stepping, Examining Variables, Compiling Programs, Debugging IDL Programs 1685@node Breakpoints and Stepping, Examining Variables, Compiling Programs, Debugging IDL Programs
1322@subsection Breakpoints and Stepping 1686@subsection Breakpoints and Stepping
1323@cindex Breakpoints 1687@cindex Breakpoints
1324@cindex Stepping 1688@cindex Stepping
1689@cindex Execution, controlled
1325 1690
1691@kindex C-c C-d C-b
1692@kindex C-c C-d C-b
1326You can set breakpoints and step through a program with IDLWAVE. 1693You can set breakpoints and step through a program with IDLWAVE.
1327Setting a breakpoint in the current line of the source buffer is done 1694Setting a breakpoint in the current line of the source buffer is done
1328with @kbd{C-c C-d C-b} (@code{idlwave-shell-break-here}). With a prefix 1695with @kbd{C-c C-d C-b} (@code{idlwave-shell-break-here}). With a prefix
@@ -1332,12 +1699,12 @@ one, the breakpoint will only be active the @code{nth} time it is hit.
1332To clear the breakpoint in the current line, use @kbd{C-c C-d C-d} 1699To clear the breakpoint in the current line, use @kbd{C-c C-d C-d}
1333(@code{idlwave-clear-current-bp}). To clear all breakpoints, use 1700(@code{idlwave-clear-current-bp}). To clear all breakpoints, use
1334@kbd{C-c C-d C-a} (@code{idlwave-clear-all-bp}). Breakpoint lines are 1701@kbd{C-c C-d C-a} (@code{idlwave-clear-all-bp}). Breakpoint lines are
1335highlighted in the source code.@refill 1702highlighted in the source code.
1336 1703
1337Once the program has stopped somewhere, you can step through it. Here 1704Once the program has stopped somewhere, you can step through it. Here
1338is a summary of the breakpoint and stepping commands: 1705is a summary of the breakpoint and stepping commands:
1339 1706
1340@multitable @columnfractions .2 .8 1707@multitable @columnfractions .23 .77
1341@item @kbd{C-c C-d C-b} 1708@item @kbd{C-c C-d C-b}
1342@tab Set breakpoint (@code{idlwave-shell-break-here}) 1709@tab Set breakpoint (@code{idlwave-shell-break-here})
1343@item @kbd{C-c C-d C-i} 1710@item @kbd{C-c C-d C-i}
@@ -1376,7 +1743,7 @@ value indicates the preferred method. Legal values are @code{nil},
1376 1743
1377@defopt idlwave-shell-breakpoint-face 1744@defopt idlwave-shell-breakpoint-face
1378The face for breakpoint lines in the source code if 1745The face for breakpoint lines in the source code if
1379@code{idlwave-shell-mark-breakpoints} has the value @code{face}.@refill 1746@code{idlwave-shell-mark-breakpoints} has the value @code{face}.
1380@end defopt 1747@end defopt
1381 1748
1382@node Examining Variables, , Breakpoints and Stepping, Debugging IDL Programs 1749@node Examining Variables, , Breakpoints and Stepping, Debugging IDL Programs
@@ -1387,6 +1754,7 @@ The face for breakpoint lines in the source code if
1387@cindex Expressions, help 1754@cindex Expressions, help
1388@cindex Mouse binding to print expressions 1755@cindex Mouse binding to print expressions
1389 1756
1757@kindex C-c C-d C-p
1390When execution is stopped you can examine the values of variables. The 1758When execution is stopped you can examine the values of variables. The
1391command @kbd{C-c C-d C-p} prints the expression at point, while @kbd{C-c 1759command @kbd{C-c C-d C-p} prints the expression at point, while @kbd{C-c
1392C-d ?} shows help on this expression. The expression at point is an 1760C-d ?} shows help on this expression. The expression at point is an
@@ -1396,37 +1764,30 @@ code for a short time. Calling the above commands with a prefix
1396argument will prompt for an expression instead of using the one at 1764argument will prompt for an expression instead of using the one at
1397point. 1765point.
1398 1766
1399I find it very convenient to bind these functions to a mouse event, so 1767It is very convenient to click with the mouse on expressions to retrieve
1400that simply clicking on an expression prints its value. The following 1768their value. Expression printing is also bound to @kbd{S-mouse-2} and
1401code binds printing an expression to a click with mouse button 2 while 1769expression help to @kbd{C-S-mouse-2}. I.e. you need to hold down
1402holding down the @key{SHIFT} key: 1770@key{SHIFT} and @key{CONTROL} while clicking with the mouse.
1403
1404@lisp
1405(add-hook 'idlwave-shell-mode-hook
1406 (lambda()
1407 (define-key idlwave-mode-map [(shift mouse-2)]
1408 'idlwave-shell-mouse-print)))
1409@end lisp
1410 1771
1772@cindex Calling stack, motion
1773@cindex Printing expressions, on calling stack
1774@cindex Restrictions for expression printing
1411Printing of expressions also works on higher levels of the calling 1775Printing of expressions also works on higher levels of the calling
1412stack. This means that you can examine the values of variables and 1776stack. This means that you can examine the values of variables and
1413expressions inside the routine which called the current routine etc. 1777expressions inside the routine which called the current routine etc.
1414Use the commands @kbd{C-c C-d C-@key{UP}} 1778Use 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}} 1779(@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 1780(@code{idlwave-shell-stack-down}) or the corresponding toolbar buttons
1417to move through the calling stack. The mode line will indicate the 1781to move through the calling stack. The mode line of the shell window
1418routine and the calling stack level which define the context for 1782will indicate the routine and the calling stack level which define the
1419printing expressions. The following restrictions apply for all levels 1783context for printing expressions. The following restrictions apply for
1420except the current:@refill 1784all levels except the current:
1421 1785
1422@itemize @bullet 1786@itemize @bullet
1423@item 1787@item
1424Array expressions must use the @samp{[ ]} index delimiters. Identifiers 1788Array expressions must use the @samp{[ ]} index delimiters. Identifiers
1425with a @samp{( )} will be interpreted as function calls. 1789with a @samp{( )} will be interpreted as function calls.
1426@item 1790@item
1427Variable names in the expression may not start with an underscore
1428@samp{_}.
1429@item
1430@cindex ROUTINE_NAMES, IDL procedure 1791@cindex ROUTINE_NAMES, IDL procedure
1431Printing values of expressions on higher levels of the calling stack 1792Printing values of expressions on higher levels of the calling stack
1432uses the @emph{unsupported} IDL routine @code{ROUTINE_NAMES}, which may 1793uses the @emph{unsupported} IDL routine @code{ROUTINE_NAMES}, which may
@@ -1446,32 +1807,59 @@ A function to handle special display of evaluated expressions.
1446@node Installation, Acknowledgement, The IDLWAVE Shell, Top 1807@node Installation, Acknowledgement, The IDLWAVE Shell, Top
1447@chapter Installation 1808@chapter Installation
1448@cindex Installation 1809@cindex Installation
1449@cindex FTP site
1450@cindex URL, homepage for IDLWAVE
1451@cindex Homepage for IDLWAVE
1452 1810
1453@menu 1811@menu
1454* Installing IDLWAVE:: How to install the distribution 1812* Installing IDLWAVE:: How to install the distribution
1813* Installing Online Help:: Where to get the additional files needed
1455* Upgrading from idl.el:: Necessary configuration changes 1814* Upgrading from idl.el:: Necessary configuration changes
1456@end menu 1815@end menu
1457 1816
1458@node Installing IDLWAVE, Upgrading from idl.el, Installation, Installation 1817@node Installing IDLWAVE, Installing Online Help, Installation, Installation
1459@section Installing IDLWAVE 1818@section Installing IDLWAVE
1460 1819
1461IDLWAVE is part of Emacs 21.1 and later. It is also an XEmacs packages 1820@cindex FTP site
1821@cindex URL, homepage for IDLWAVE
1822@cindex Homepage for IDLWAVE
1823@cindex IDLWAVE, homepage
1824@cindex XEmacs package IDLWAVE
1825@cindex Emacs, distributed with IDLWAVE
1826@cindex Copyright, of IDL manual
1827IDLWAVE is part of Emacs 21.1 and later. It is also an XEmacs package
1462and can be installed from 1828and can be installed from
1463@uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,the XEmacs ftp site} 1829@uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,the XEmacs ftp site}
1464with the normal package management system on XEmacs 21.@refill 1830with the normal package management system on XEmacs 21. These
1831pre-installed versions should work out-of-the-box. However, the files
1832needed for online help are not distributed with XEmacs/Emacs and have to
1833be installed separately@footnote{Due to copyright reasons, the ASCII
1834version of the IDL manual cannot be distributed under the GPL.}
1835(@pxref{Installing Online Help}).
1465 1836
1466You can also download IDLWAVE and install it yourself from 1837You can also download IDLWAVE and install it yourself from
1467@uref{http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave, the maintainers 1838@uref{@value{IDLWAVE-HOMEPAGE}, the maintainers webpage}. Follow the
1468webpage}. Follow the instructions in the INSTALL file.@refill 1839instructions in the INSTALL file.
1840
1841@node Installing Online Help, Upgrading from idl.el , Installing IDLWAVE, Installation
1842@section Installing Online Help
1843@cindex Installing online help
1844@cindex Online Help, Installation
1469 1845
1470@node Upgrading from idl.el, , Installing IDLWAVE, Installation 1846If you want to use the online help display, two additional files (an
1847ASCII version of the IDL documentation and a topics/code file) must be
1848installed. These files can also be downloaded from
1849@uref{@value{IDLWAVE-HOMEPAGE}, the maintainers webpage}. You need to
1850place the files somewhere on your system and tell IDLWAVE where they are
1851with
1852
1853@lisp
1854(setq idlwave-help-directory "/path/to/help/files/")
1855@end lisp
1856
1857@node Upgrading from idl.el, , Installing Online Help, Installation
1471@section Upgrading from the old @b{@file{idl.el}} file 1858@section Upgrading from the old @b{@file{idl.el}} file
1472@cindex Upgrading from old @b{@file{idl.el}} 1859@cindex Upgrading from old @b{@file{idl.el}}
1473@cindex Renaming old variables 1860@cindex Renaming old variables
1474@cindex Old variables, renaming 1861@cindex Old variables, renaming
1862@kindex M-@key{TAB}
1475 1863
1476If you have been using the old @file{idl.el} and @file{idl-shell.el} 1864If you have been using the old @file{idl.el} and @file{idl-shell.el}
1477files and would like to use IDLWAVE, you need to update your 1865files and would like to use IDLWAVE, you need to update your
@@ -1482,7 +1870,8 @@ customization in @file{.emacs}.
1482Change all variable and function prefixes from @samp{idl-} to @samp{idlwave-}. 1870Change all variable and function prefixes from @samp{idl-} to @samp{idlwave-}.
1483@item 1871@item
1484Remove the now invalid @code{autoload} and @code{auto-mode-alist} forms 1872Remove the now invalid @code{autoload} and @code{auto-mode-alist} forms
1485pointing to the @file{idl.el} and @file{idl-shell.el} files. 1873pointing to the @file{idl.el} and @file{idl-shell.el} files. Install
1874the new autoload forms.
1486@item 1875@item
1487If you have been using the hook function recommended in earlier versions 1876If you have been using the hook function recommended in earlier versions
1488to get a separate frame for the IDL shell, remove that command from your 1877to get a separate frame for the IDL shell, remove that command from your
@@ -1492,23 +1881,45 @@ to get a separate frame for the IDL shell, remove that command from your
1492(setq idlwave-shell-use-dedicated-frame t) 1881(setq idlwave-shell-use-dedicated-frame t)
1493@end lisp 1882@end lisp
1494@item 1883@item
1495The key sequence @kbd{M-@key{TAB}} no longer inserts a TAB character, 1884The key sequence @kbd{M-@key{TAB}} no longer inserts a TAB character.
1496but (as in many other Emacs modes) does completion. Inserting a TAB is 1885Like in in many other Emacs modes, @kbd{M-@key{TAB}} now does
1497now bound to @kbd{C-c @key{SPC}}.@refill 1886completion. Inserting a TAB has therefore been moved to
1887@kbd{C-@key{TAB}}. On a character based terminal you can also use
1888@kbd{C-c @key{SPC}}.
1498@end enumerate 1889@end enumerate
1499 1890
1500@node Acknowledgement, Sources of Routine Info, Installation, Top 1891@node Acknowledgement, Sources of Routine Info, Installation, Top
1501@chapter Acknowledgement 1892@chapter Acknowledgement
1502@cindex Acknowledgement 1893@cindex Acknowledgement
1894@cindex Maintainer, of IDLWAVE
1895@cindex Authors, of IDLWAVE
1896@cindex Contributors, to IDLWAVE
1897@cindex Email address, of Maintainer
1503@cindex Thanks 1898@cindex Thanks
1504 1899
1505@file{idl.el} and @file{idl-shell.el} were written by 1900@noindent
1506@uref{mailto:chase@@att.com, Chris Chase}. The package 1901The main contributors to the IDLWAVE package have been:
1507was extended and renamed to IDLWAVE by the current maintainer
1508@uref{mailto:dominik@@strw.leidenuniv.nl, Carsten Dominik}.
1509 1902
1510Thanks to the following people who have contributed to the development 1903@itemize @minus
1511of IDLWAVE with patches, ideas, bug reports and suggestions. 1904@item
1905@uref{mailto:chase@@att.com, @b{Chris Chase}} wrote
1906@file{idl.el} and @file{idl-shell.el} and maintained them for several
1907years.
1908
1909@item
1910@uref{mailto:dominik@@astro.uva.nl, @b{Carsten Dominik}} has been in
1911charge of the package since version 3.0. He renamed the package to
1912IDLWAVE, rewrote and added large parts and is the current maintainer.
1913
1914@item
1915@uref{mailto:jdsmith@@astrosun.tn.cornell.edu, @b{J.D. Smith}} has
1916shaped Object method completion and most new features in version 4.0
1917with his ideas, bug reports, and patient explanations of IDL internals.
1918@end itemize
1919
1920@noindent
1921The following people have also contributed to the development of IDLWAVE
1922with patches, ideas, bug reports and suggestions.
1512 1923
1513@itemize @minus 1924@itemize @minus
1514@item 1925@item
@@ -1536,14 +1947,16 @@ Marty Ryba <ryba@@ll.mit.edu>
1536@item 1947@item
1537Phil Williams <williams@@irc.chmcc.org> 1948Phil Williams <williams@@irc.chmcc.org>
1538@item 1949@item
1539J.D. Smith <jdsmith@@astrosun.tn.cornell.edu>
1540@item
1541Phil Sterne <sterne@@dublin.llnl.gov> 1950Phil Sterne <sterne@@dublin.llnl.gov>
1542@end itemize 1951@end itemize
1543 1952
1953@noindent
1954Thanks to everyone!
1955
1544@node Sources of Routine Info, Configuration Examples, Acknowledgement, Top 1956@node Sources of Routine Info, Configuration Examples, Acknowledgement, Top
1545@appendix Sources of Routine Info 1957@appendix Sources of Routine Info
1546 1958
1959@cindex Sources of routine information
1547In @ref{Routine Info} and @ref{Completion} it was shown how IDLWAVE 1960In @ref{Routine Info} and @ref{Completion} it was shown how IDLWAVE
1548displays the calling sequence and keywords of routines, and how it 1961displays the calling sequence and keywords of routines, and how it
1549completes routine names and keywords. For these features to work, 1962completes routine names and keywords. For these features to work,
@@ -1551,45 +1964,56 @@ IDLWAVE must know about the accessible routines.
1551 1964
1552@menu 1965@menu
1553* Routine Definitions:: Where IDL Routines are defined. 1966* Routine Definitions:: Where IDL Routines are defined.
1554* Routine Information Sources:: So how does IDLWAVE know about... 1967* Routine Information Sources:: So how does IDLWAVE know about...
1555* Library Scan:: Scanning the Libraries for Routine Info 1968* Library Scan:: Scanning the Libraries for Routine Info
1556* Updating idlw-rinfo.el:: Scanning the IDL Manuals 1969* Load-Path Shadows:: Routines defined in several places
1970* Documentation Scan:: Scanning the IDL Manuals
1557@end menu 1971@end menu
1558 1972
1559@node Routine Definitions, Routine Information Sources, Sources of Routine Info, Sources of Routine Info 1973@node Routine Definitions, Routine Information Sources, Sources of Routine Info, Sources of Routine Info
1560@section Routine Definitions 1974@section Routine Definitions
1561@cindex Routine definitions 1975@cindex Routine definitions
1976@cindex IDL variable @code{!PATH}
1977@cindex @code{!PATH}, IDL variable
1978@cindex @code{CALL_EXTERNAL}, IDL routine
1979@cindex @code{LINKIMAGE}, IDL routine
1980@cindex External routines
1562 1981
1563Routines which can be used in an IDL program can be defined in several 1982Routines which can be used in an IDL program can be defined in several
1564places: 1983places:
1565 1984
1566@enumerate 1985@enumerate
1567@item 1986@item
1568@emph{System routines} are defined inside IDL itself. The source 1987@emph{Builtin routines} are defined inside IDL itself. The source
1569code of such routines is not accessible to the user.@refill 1988code of such routines is not accessible to the user.
1570@item 1989@item
1571Routines @emph{part of the current program} are defined in a file which 1990Routines @emph{part of the current program} are defined in a file which
1572is explicitly compiled by the user. This file may be located on the IDL 1991is explicitly compiled by the user. This file may or may not be located
1573search path, but this is not certain.@refill 1992on the IDL search path.
1574@item 1993@item
1575@emph{Library routines} are defined in special files which are located 1994@emph{Library routines} are defined in special files which are located
1576somewhere on IDL's search path. When a library routine is called for 1995somewhere on IDL's search path. When a library routine is called for
1577the first time, IDL will find the source file and compile it 1996the first time, IDL will find the source file and compile it
1578dynamically.@refill 1997dynamically.
1579@item 1998@item
1580External routines written in other languages (like Fortran or C) can be 1999External routines written in other languages (like Fortran or C) can be
1581called with @code{CALL_EXTERNAL}, linked into IDL via @code{LINKIMAGE}, 2000called with @code{CALL_EXTERNAL}, linked into IDL via @code{LINKIMAGE},
1582or included as dynamically loaded modules (DLMs). Currently IDLWAVE 2001or included as dynamically loaded modules (DLMs). Currently IDLWAVE
1583cannot provide routine info and completion for external 2002cannot provide routine info and completion for external
1584routines.@refill 2003routines.
1585@end enumerate 2004@end enumerate
1586 2005
1587@node Routine Information Sources, Library Scan, Routine Definitions, Sources of Routine Info 2006@node Routine Information Sources, Library Scan, Routine Definitions, Sources of Routine Info
1588@section Routine Information Sources 2007@section Routine Information Sources
1589@cindex Routine info sources 2008@cindex Routine info sources
2009@cindex Builtin list of routines
2010@cindex Updating routine info
2011@cindex Scanning buffers for routine info
2012@cindex Buffers, scanning for routine info
2013@cindex Shell, querying for routine info
1590 2014
1591In oder to know about as many routines as possible, IDLWAVE will do the 2015In oder to know about as many routines as possible, IDLWAVE will do the
1592following to collect information:@refill 2016following to collect information:
1593 2017
1594@enumerate 2018@enumerate
1595 2019
@@ -1599,81 +2023,92 @@ routines. IDLWAVE @value{VERSION} is distributed with a list of
1599@value{NSYSROUTINES} routines and @value{NSYSKEYWORDS} keywords, 2023@value{NSYSROUTINES} routines and @value{NSYSKEYWORDS} keywords,
1600reflecting IDL version @value{IDLVERSION}. This list has been created 2024reflecting IDL version @value{IDLVERSION}. This list has been created
1601by scanning the IDL manuals and is stored in the file 2025by scanning the IDL manuals and is stored in the file
1602@file{idlw-rinfo.el}. @xref{Updating idlw-rinfo.el}, for 2026@file{idlw-rinfo.el}. @xref{Documentation Scan}, for
1603information how to regenerate this file for new versions of IDL.@refill 2027information how to regenerate this file for new versions of IDL.
1604 2028
1605@item 2029@item
1606It @emph{scans} all @emph{buffers} of the current Emacs session for 2030It @emph{scans} all @emph{buffers} of the current Emacs session for
1607routine definitions. This is done automatically when routine 2031routine definitions. This is done automatically when routine
1608information or completion is first requested by the user. The command 2032information or completion is first requested by the user. Each new
1609@kbd{C-c C-i} (@code{idlwave-update-routine-info}) can be used at any 2033buffer and each buffer which is saved after making changes is also
1610time to rescan all buffers.@refill 2034scanned. The command @kbd{C-c C-i} (@code{idlwave-update-routine-info})
2035can be used at any time to rescan all buffers.
1611 2036
1612@item 2037@item
1613If you have an IDLWAVE-Shell running as inferior process of the current 2038If you have an IDLWAVE-Shell running as inferior process of the current
1614Emacs session, IDLWAVE will @emph{query the shell} for compiled routines 2039Emacs session, IDLWAVE will @emph{query the shell} for compiled routines
1615and their arguments. This happens automatically when routine 2040and their arguments. This happens automatically when routine
1616information or completion is first requested by the user. The command 2041information or completion is first requested by the user, and each time
2042an Emacs buffer is compiled with @kbd{C-c C-d C-c}. The command
1617@kbd{C-c C-i} (@code{idlwave-update-routine-info}) can be used to ask 2043@kbd{C-c C-i} (@code{idlwave-update-routine-info}) can be used to ask
1618the shell again at any time.@refill 2044the shell again at any time.
1619 2045
1620@item 2046@item
1621IDLWAVE can scan all or selected library files and store the result in a 2047IDLWAVE can scan all or selected library files and store the result in a
1622file which will be automatically loaded just like 2048file which will be automatically loaded just like
1623@file{idlw-rinfo.el}. @xref{Library Scan}, for information how to 2049@file{idlw-rinfo.el}. @xref{Library Scan}, for information how to
1624scan library files.@refill 2050scan library files.
1625@end enumerate 2051@end enumerate
1626 2052
1627@defopt idlwave-scan-all-buffers-for-routine-info (@code{t}) 2053@defopt idlwave-scan-all-buffers-for-routine-info (@code{t})
1628Non-@code{nil} means, scan all buffers for IDL programs when updating 2054Non-@code{nil} means, scan all buffers for IDL programs when updating
1629info. When this variable is @code{nil}, it only parses the current 2055info.
1630buffer.@refill
1631@end defopt 2056@end defopt
1632 2057
1633@defopt idlwave-query-shell-for-routine-info (@code{t}) 2058@defopt idlwave-query-shell-for-routine-info (@code{t})
1634Non-@code{nil} means query the shell for info about compiled routines. 2059Non-@code{nil} means query the shell for info about compiled routines.
1635@end defopt 2060@end defopt
1636 2061
2062@defopt idlwave-auto-routine-info-updates
2063Controls under what circumstances routine info is updated automatically.
2064@end defopt
1637 2065
1638@node Library Scan, Updating idlw-rinfo.el, Routine Information Sources, Sources of Routine Info 2066@node Library Scan, Load-Path Shadows, Routine Information Sources, Sources of Routine Info
1639@section Library Scan 2067@section Library Scan
1640@cindex Library scan 2068@cindex Library scan
1641@cindex IDL library routine info 2069@cindex IDL library routine info
2070@cindex Windows
2071@cindex MacOS
2072@cindex Unix
2073@cindex IDL variable @code{!DIR}
2074@cindex @code{!DIR}, IDL variable
2075
1642 2076
1643IDLWAVE can extract routine information from library modules and store 2077IDLWAVE can extract routine information from library modules and store
1644that information in a file. To do this, the variable 2078that information in a file. To do this, the variable
1645@code{idlwave-libinfo-file} needs to contain the path to a file in an 2079@code{idlwave-libinfo-file} needs to contain the path to a file in an
1646existing directory (e.g. @code{"~/idlwave_libinfo.el"}). Since the file 2080existing directory (the default is @code{"~/.idlcat.el"}). Since the
1647will contain lisp code, it should end in @file{.el}. Under Windows and 2081file will contain lisp code, its name should end in @file{.el}. Under
1648MacOS, you also need to specify the search path for IDL library files in 2082Windows and MacOS, you also need to specify the search path for IDL
1649the variable @code{idlwave-library-path}. Under UNIX, this path will 2083library files in the variable @code{idlwave-library-path}, and the
1650be automatically inferred from an IDLWAVE shell.@refill 2084location of the IDL directory (the value of the @code{!DIR} system
2085variable) in the variable @code{idlwave-system-directory}. Under UNIX,
2086these values will be automatically inferred from an IDLWAVE
2087shell.
1651 2088
1652The command @kbd{M-x idlwave-create-libinfo-file} can then be used to 2089The command @kbd{M-x idlwave-create-libinfo-file} can then be used to
1653scan library files. It brings up a widget in which you can select some 2090scan library files. It brings up a widget in which you can select some
1654or all directories on the search path. Pressing the @w{@samp{[Scan & Save]}} 2091or all directories on the search path. If you only want to have routine
1655button in the widget will scan all files in the selected directories and 2092and completion info of some libraries, it is sufficient to scan those
2093directories. However, if you want IDLWAVE to detect possible name
2094conflicts with routines defined in other libraries, the whole pass
2095should be scanned.
2096
2097After selecting directories, click on the @w{@samp{[Scan & Save]}}
2098button in the widget to scan all files in the selected directories and
1656write the resulting routine information into the file 2099write the resulting routine information into the file
1657@code{idlwave-libinfo-file}. In order to update the library information 2100@code{idlwave-libinfo-file}. In order to update the library information
1658from the same directories, call the command 2101from the same directories, call the command
1659@code{idlwave-update-routine-info} with a double prefix argument: 2102@code{idlwave-update-routine-info} with a double prefix argument:
1660@kbd{C-u C-u C-c C-i}. This will rescan files in the previously 2103@w{@kbd{C-u C-u C-c C-i}}. This will rescan files in the previously
1661selected directories, write an updated version of the libinfo file and 2104selected directories, write an updated version of the libinfo file and
1662rebuild IDLWAVEs internal lists.@refill 2105rebuild IDLWAVEs internal lists.
1663 2106
1664A note of caution: Depending on your local installation, the IDL 2107A note of caution: Depending on your local installation, the IDL
1665library can be very large. Parsing it for routine information will take 2108library can be very large. Parsing it for routine information will take
1666time and loading this information into Emacs can require a 2109time and loading this information into Emacs can require a
1667significant amount of memory.@refill 2110significant amount of memory. However, having this information
1668 2111available will be a great help.
1669A routine which is both in the library listing and compiled under the
1670shell will show up twice in the @file{*Completions*} listing. This is
1671usually not a serious problem. However, if you have scanned the part of
1672the library relevant for you, and if you are not compiling files which
1673are not on the library search path, the information about compiled
1674routines is in fact unnecessary. In this case, you can turn off the
1675shell query for compiled routines with the variable
1676@code{idlwave-query-shell-for-routine-info}.@refill
1677 2112
1678@defopt idlwave-libinfo-file 2113@defopt idlwave-libinfo-file
1679File for routine information of the IDL library. 2114File for routine information of the IDL library.
@@ -1683,28 +2118,101 @@ File for routine information of the IDL library.
1683IDL library path for Windows and MacOS. Not needed under Unix. 2118IDL library path for Windows and MacOS. Not needed under Unix.
1684@end defopt 2119@end defopt
1685 2120
1686 2121@defopt idlwave-system-directory
1687@node Updating idlw-rinfo.el, , Library Scan, Sources of Routine Info 2122The IDL system directory for Windows and MacOS. Not needed under UNIX.
1688@section Updating @file{idlw-rinfo.el} 2123@end defopt
2124
2125@defopt idlwave-special-lib-alist
2126Alist of regular expressions matching special library directories.
2127@end defopt
2128
2129@node Load-Path Shadows, Documentation Scan, Library Scan, Sources of Routine Info
2130@section Load-Path Shadows
2131@cindex Load-path shadows
2132@cindex Shadows, load-path
2133@cindex Duplicate routines
2134@cindex Multiply defined routines
2135@cindex Routine definitions, multiple
2136@cindex Application, testing for shadowing
2137@cindex Buffer, testing for shadowing
2138
2139IDLWAVE can compile a list of routines which are defined in several
2140different files. Since one definition will hide (shadow) the others
2141depending on which file is compiled first, such multiple definitions are
2142called "load-path shadows". IDLWAVE has several routines to scan for
2143load path shadows. The output is placed into s special buffer
2144@file{*Shadows*}. The format of the output is identical to the source
2145section of the routine info buffer (@pxref{Routine Info}). Before
2146calling these routines, you should make sure that routine info is
2147up-to-date by pressing @kbd{C-c C-i}. Here are the different routines:
2148
2149@table @asis
2150@item @kbd{M-x idlwave-list-buffer-load-path-shadows}
2151This commands checks the names of all routines defined in the current
2152buffer for shadowing conflicts with other routines accessible to
2153IDLWAVE. The command also has a key binding: @kbd{C-c C-b}
2154@item @kbd{M-x idlwave-list-shell-load-path-shadows}.
2155Checks all routines compiled under the shell for shadowing. This is
2156very useful when you have written a complete application. Just compile
2157the application, use @code{RESOLVE_ALL} to compile any routines used by
2158your code, update the routine info inside IDLWAVE with @kbd{C-c C-i} and
2159then check for shadowing.
2160@item @kbd{M-x idlwave-list-all-load-path-shadows}
2161This command finally checks all routines accessible to IDLWAVE for
2162shadowing conflicts.
2163@end table
2164
2165For these commands to work properly you should have scanned the entire
2166load path, not just selected directories. Also, IDLWAVE should be able to
2167distinguish between the system library files (normally installed in
2168@file{/usr/local/rsi/idl/lib}) and any site specific or user specific
2169files. Therefore, such local files should not be installed
2170inside the @file{lib} directory of the IDL directory. This is of course
2171also advisable for many other reasons.
2172
2173@cindex Windows
2174@cindex MacOS
2175@cindex IDL variable @code{!DIR}
2176@cindex @code{!DIR}, IDL variable
2177Users of Windows and MacOS also must set the variable
2178@code{idlwave-system-directory} to the value of the @code{!DIR} system
2179variable in IDL. IDLWAVE appends @file{lib} to the value of this
2180variable and assumes that all files found on that path are system
2181routines.
2182
2183Another way to find out if a specific routine has multiple definitions
2184on the load path is routine info display (@pxref{Routine Info}).
2185
2186@node Documentation Scan, , Load-Path Shadows, Sources of Routine Info
2187@section Documentation Scan
1689@cindex @file{get_rinfo} 2188@cindex @file{get_rinfo}
1690@cindex @file{idlw-rinfo.el} 2189@cindex @file{idlw-rinfo.el}
2190@cindex @file{idlw-help.txt}
2191@cindex @file{idlw-help.el}
2192@cindex Scanning the documentation
1691@cindex Perl program, to create @file{idlw-rinfo.el} 2193@cindex Perl program, to create @file{idlw-rinfo.el}
1692 2194
1693The file @file{idlw-rinfo.el} contains the routine information for 2195IDLWAVE derives it knowledge about system routines from the IDL
1694the routines build into IDL. This constant depends upon the version of 2196manuals. The file @file{idlw-rinfo.el} contains the routine information
1695IDL. If you are lucky, the maintainer of IDLWAVE will always have 2197for the IDL system routines. The Online Help feature of IDLWAVE
1696access to the newest version of IDL and provide updates of 2198requires ASCII versions of some IDL manuals to be available in a
1697@file{idlw-rinfo.el} reflecting the currently released version of 2199specific format (@file{idlw-help.txt}), along with an Emacs-Lisp file
1698IDL. The IDLWAVE package also contains a Perl program @file{get_rinfo} 2200@file{idlw-help.el} with supporting code and pointers to the ASCII file.
1699which constructs this file by scanning selected files from the IDL 2201
1700documentation. The program needs @file{pdftotext} by Derek B. Noonburg. 2202All 3 files can be derived from the IDL documentation. If you are
1701Instructions on how to use @file{get_rinfo} are in the program 2203lucky, the maintainer of IDLWAVE will always have access to the newest
1702itself.@refill 2204version of IDL and provide updates. The IDLWAVE distribution also
2205contains the Perl program @file{get_rinfo} which constructs these files
2206by scanning selected files from the IDL documentation. Instructions on
2207how to use @file{get_rinfo} are in the program itself.
1703 2208
1704@node Configuration Examples, Index, Sources of Routine Info, Top 2209@node Configuration Examples, Index, Sources of Routine Info, Top
1705@appendix Configuration Examples 2210@appendix Configuration Examples
1706@cindex Configuration examples 2211@cindex Configuration examples
1707@cindex Example configuration 2212@cindex Example configuration
2213@cindex @file{.emacs}
2214@cindex Default settings, of options
2215@cindex Interview, with the maintainer
1708 2216
1709@noindent 2217@noindent
1710@b{Question:} So now you have all these complicated configuration 2218@b{Question:} So now you have all these complicated configuration
@@ -1715,6 +2223,7 @@ actually set in your own configuration?
1715@b{Answer:} Hardly any. As the maintainer, I set the default of most 2223@b{Answer:} Hardly any. As the maintainer, I set the default of most
1716options to what I think is best. However, the default settings do not 2224options to what I think is best. However, the default settings do not
1717turn on features which 2225turn on features which
2226
1718@itemize @minus 2227@itemize @minus
1719@item 2228@item
1720are not self-evident (i.e. too magic) when used by an unsuspecting user 2229are not self-evident (i.e. too magic) when used by an unsuspecting user
@@ -1723,7 +2232,7 @@ are too intrusive
1723@item 2232@item
1724will not work properly on all Emacs installations out there 2233will not work properly on all Emacs installations out there
1725@item 2234@item
1726break with what I think are widely used standards. 2235break with widely used standards.
1727@end itemize 2236@end itemize
1728 2237
1729@noindent To see what I mean, here is the @emph{entire} configuration I 2238@noindent To see what I mean, here is the @emph{entire} configuration I
@@ -1734,21 +2243,18 @@ have in my @file{.emacs}:
1734 idlwave-expand-generic-end t 2243 idlwave-expand-generic-end t
1735 idlwave-store-inquired-class t 2244 idlwave-store-inquired-class t
1736 idlwave-shell-automatic-start t 2245 idlwave-shell-automatic-start t
1737 idlwave-libinfo-file "~/lib/idl/libinfo.el" 2246 idlwave-main-block-indent 2
1738 idlwave-main-block-indent 2) 2247 idlwave-help-dir "~/lib/emacs/idlwave"
1739(add-hook 'idlwave-shell-mode-hook 2248 idlwave-special-lib-alist '(("/idl-astro/" . "AstroLib")
1740 (lambda() 2249 ("/jhuapl/" . "JHUAPL-Lib")
1741 (define-key idlwave-mode-map [(shift button1)] 2250 ("/dominik/lib/idl/" . "MyLib")))
1742 'idlwave-shell-mouse-print)
1743 (define-key idlwave-mode-map [(shift button2)]
1744 'idlwave-shell-mouse-help)))
1745@end lisp 2251@end lisp
1746 2252
1747However, if you are an Emacs power-user and want IDLWAVE to work 2253However, if you are an Emacs power-user and want IDLWAVE to work
1748completely differently, the options allow you to change almost every 2254completely differently, the options allow you to change almost every
1749aspect of it. Here is an example of a much more extensive configuration 2255aspect of it. Here is an example of a much more extensive configuration
1750of IDLWAVE. To say it again - this is not what I recommend, but the 2256of IDLWAVE. To say it again - this is not what I recommend, but the
1751user is King!@refill 2257user is King!
1752 2258
1753@example 2259@example
1754;;; Settings for IDLWAVE mode 2260;;; Settings for IDLWAVE mode
@@ -1818,8 +2324,5 @@ user is King!@refill
1818@unnumbered Index 2324@unnumbered Index
1819@printindex cp 2325@printindex cp
1820 2326
1821@setchapternewpage odd
1822@summarycontents
1823@contents
1824@bye 2327@bye
1825 2328