diff options
| author | Carsten Dominik | 2000-06-20 12:46:55 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2000-06-20 12:46:55 +0000 |
| commit | a8e833f3910c2430aeec0a90c0f05f4fd8aa4a78 (patch) | |
| tree | 61d63361c61540bd9edb9a62dc48be4f76c6748e | |
| parent | a0d3134105ca086ffd68ee0321aba28426d125df (diff) | |
| download | emacs-a8e833f3910c2430aeec0a90c0f05f4fd8aa4a78.tar.gz emacs-a8e833f3910c2430aeec0a90c0f05f4fd8aa4a78.zip | |
Update to idlwave 4.2
| -rw-r--r-- | man/idlwave.texi | 1069 |
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 |
| 26 | This file documents IDLWAVE, a major mode for editing IDL and | 27 | This file documents IDLWAVE, a major mode for editing IDL and |
| 27 | WAVE/CL files with Emacs. It also implements a shell for running IDL as | 28 | WAVE/CL files with Emacs. It also implements a shell for running IDL as |
| 28 | a subprocess.@refill | 29 | a subprocess. |
| 29 | 30 | ||
| 30 | This is edition @value{EDITION} of the IDLWAVE User Manual for | 31 | This is edition @value{EDITION} of the IDLWAVE User Manual for |
| 31 | IDLWAVE @value{VERSION}@refill | 32 | IDLWAVE @value{VERSION} |
| 32 | 33 | ||
| 33 | Copyright (c) 1999, 2000 Free Software Foundation, Inc. | 34 | Copyright (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 |
| 70 | This is edition @value{EDITION} of the @cite{IDLWAVE User Manual} for | 71 | This is edition @value{EDITION} of the @cite{IDLWAVE User Manual} for |
| 71 | IDLWAVE version @value{VERSION}, @value{DATE}.@refill | 72 | IDLWAVE version @value{VERSION}, @value{DATE}. |
| 72 | 73 | ||
| 73 | @sp 2 | 74 | @sp 2 |
| 74 | 75 | ||
| 76 | @cindex Copyright, of IDLWAVE | ||
| 75 | Permission is granted to make and distribute verbatim | 77 | Permission is granted to make and distribute verbatim |
| 76 | copies of this manual provided the copyright notice and | 78 | copies of this manual provided the copyright notice and |
| 77 | this permission notice are preserved on all copies. | 79 | this permission notice are preserved on all copies. |
| @@ -89,16 +91,19 @@ except that this permission notice may be stated in a | |||
| 89 | translation approved by the Free Software Foundation. | 91 | translation 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 | ||
| 97 | IDLWAVE is a package to support editing command files for the | 102 | IDLWAVE is a package to support editing command files for the |
| 98 | Interactive Data Language (IDL), and for running IDL as an inferior | 103 | Interactive Data Language (IDL), and for running IDL as an inferior |
| 99 | shell. @refill | 104 | shell. |
| 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 | ||
| 118 | The IDLWAVE Major Mode | 121 | The 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 | |||
| 154 | Installation | 160 | Installation |
| 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 | ||
| 159 | Sources of Routine Info | 166 | Sources 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 | ||
| 175 | IDLWAVE is a package to support editing command files for the | 188 | IDLWAVE is a package to support editing command files for the |
| @@ -189,7 +202,7 @@ switch. | |||
| 189 | IDLWAVE consists of two parts: A major mode for editing command files | 202 | IDLWAVE 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 |
| 191 | inferior shell (@code{idlwave-shell-mode}). Both modes work closely | 204 | inferior shell (@code{idlwave-shell-mode}). Both modes work closely |
| 192 | together and form a complete development environment.@refill | 205 | together and form a complete development environment. |
| 193 | 206 | ||
| 194 | Here is a brief summary of what IDLWAVE does. | 207 | Here is a brief summary of what IDLWAVE does. |
| 195 | 208 | ||
| @@ -200,7 +213,11 @@ Code indentation and formatting. | |||
| 200 | Font-lock support on three levels. | 213 | Font-lock support on three levels. |
| 201 | @item | 214 | @item |
| 202 | Display of calling sequence and keywords of more than 1000 IDL | 215 | Display of calling sequence and keywords of more than 1000 IDL |
| 203 | routines. | 216 | routines routines and any routines in your local IDL library. |
| 217 | @item | ||
| 218 | Name space conflict search. | ||
| 219 | @item | ||
| 220 | Fast context-sensitive online help. | ||
| 204 | @item | 221 | @item |
| 205 | Context sensitive completion of routine names and keywords. | 222 | Context 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 |
| 211 | Block structure check. | 228 | Block structure check. |
| 212 | @item | 229 | @item |
| 230 | Support for @file{imenu} (Emacs) and @file{func-menu} (XEmacs). | ||
| 231 | @item | ||
| 213 | Documentation support. | 232 | Documentation support. |
| 214 | @item | 233 | @item |
| 215 | Running IDL as inferior process. | 234 | Running IDL as inferior process. |
| @@ -225,6 +244,7 @@ Examining expressions with a mouse click. | |||
| 225 | @ifnottex | 244 | @ifnottex |
| 226 | @cindex Screenshots | 245 | @cindex Screenshots |
| 227 | Here are a number of screenshots showing IDLWAVE in action. | 246 | Here 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 |
| 272 | at point. | 293 | at 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-\ | ||
| 376 | To re-indent a larger portion of code (e.g. when working with foreign code | 399 | To re-indent a larger portion of code (e.g. when working with foreign code |
| 377 | written with different conventions), use @kbd{M-C-\} | 400 | written 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}) |
| 384 | Extra indentation for the main block of code. That is the block between | 407 | Extra indentation for the main block of code. That is the block between |
| 385 | the FUNCTION/PRO statement and the END statement for that program | 408 | the FUNCTION/PRO statement and the END statement for that program |
| 386 | unit.@refill | 409 | unit. |
| 387 | @end defopt | 410 | @end defopt |
| 388 | 411 | ||
| 389 | @defopt idlwave-block-indent (@code{4}) | 412 | @defopt idlwave-block-indent (@code{5}) |
| 390 | Extra indentation applied to block lines. If you change this, you | 413 | Extra indentation applied to block lines. If you change this, you |
| 391 | probably also want to change @code{idlwave-end-offset}.@refill | 414 | probably 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}) |
| 395 | Extra indentation applied to block END lines. A value equal to negative | 418 | Extra 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 |
| 397 | BEGIN lines.@refill | 420 | BEGIN lines. |
| 398 | @end defopt | 421 | @end defopt |
| 399 | 422 | ||
| 400 | @defopt idlwave-continuation-indent (@code{2}) | 423 | @defopt idlwave-continuation-indent (@code{2}) |
| 401 | Extra indentation applied to continuation lines and insided unbalanced | 424 | Extra indentation applied to continuation lines and inside unbalanced |
| 402 | parenthesis.@refill | 425 | parenthesis. |
| 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 | ||
| 425 | The indentation of comments starting in column 0 is never changed. | 449 | The indentation of comments starting in column 0 is never changed. |
| 426 | 450 | ||
| 427 | @defopt idlwave-no-change-comment | 451 | @defopt idlwave-no-change-comment |
| 428 | The indentation of a comment that starts with this regular | 452 | The indentation of a comment starting with this regexp will not be changed. |
| 429 | expression will not be changed. | ||
| 430 | @end defopt | 453 | @end defopt |
| 431 | 454 | ||
| 432 | @defopt idlwave-begin-line-comment | 455 | @defopt idlwave-begin-line-comment |
| 433 | A comment anchored at the beginning of line. A comment matched by this | 456 | A comment anchored at the beginning of line. |
| 434 | regular 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 |
| 438 | A comment that starts with this regular expression on a line by itself | 460 | A comment that starts with this regexp is indented as if it is a part of |
| 439 | is indented as if it is a part of IDL code.@refill | 461 | IDL 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} | ||
| 451 | In IDL, a newline character terminates a statement unless preceded by a | 472 | In 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 | |||
| 456 | new line. The command @kbd{M-@key{RET}} can also be used in the middle | 477 | new line. The command @kbd{M-@key{RET}} can also be used in the middle |
| 457 | of a line to split the line at that point. When used inside a long | 478 | of a line to split the line at that point. When used inside a long |
| 458 | string constant, the string is split with the @samp{+} concatenation | 479 | string constant, the string is split with the @samp{+} concatenation |
| 459 | operator. You could even use @code{auto-fill-mode} to automatically | 480 | operator. |
| 460 | break code lines into several lines while you type. For this, set the | ||
| 461 | variable @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 | ||
| 465 | When filling comment paragraphs, IDLWAVE overloads the normal filling | 485 | When filling comment paragraphs, IDLWAVE overloads the normal filling |
| 466 | functions and uses a function which creates hanging paragraphs as they | 486 | functions and uses a function which creates hanging paragraphs as they |
| 467 | are customary in the IDL routine headers. When @code{auto-fill-mode} is | 487 | are customary in the IDL routine headers. When @code{auto-fill-mode} is |
| 468 | turned on, comments will be auto-filled. If the first line of a | 488 | turned on (toggle with @kbd{C-c C-a}), comments will be auto-filled. If |
| 469 | paragraph is matched by @code{idlwave-hang-indent-regexp}, subsequent | 489 | the first line of a paragraph is matched by |
| 470 | lines are indented to after the position of this match, as in the | 490 | @code{idlwave-hang-indent-regexp}, subsequent lines are indented to |
| 471 | following example. | 491 | after 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 | ||
| 483 | You also refill a comment paragraph with @kbd{M-q}. | 504 | You 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}) |
| 500 | Non-@code{nil} means comment paragraphs are indented under the hanging | 521 | Non-@code{nil} means comment paragraphs are indented under the hanging |
| 501 | indent given by @code{idlwave-hang-indent-regexp} match in the first | 522 | indent given by @code{idlwave-hang-indent-regexp} match in the first |
| 502 | line of the paragraph.@refill | 523 | line of the paragraph. |
| 503 | @end defopt | 524 | @end defopt |
| 504 | 525 | ||
| 505 | @defopt idlwave-hang-indent-regexp | 526 | @defopt idlwave-hang-indent-regexp |
| 506 | Regular expression matching the position of the hanging indent | 527 | Regular expression matching the position of the hanging indent |
| 507 | in the first line of a comment paragraph.@refill | 528 | in 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}) |
| 511 | Non-@code{nil} means use last match on line for | 532 | Non-@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 | ||
| 520 | Highlighting of keywords, comments, strings etc. can be accomplished | 542 | Highlighting of keywords, comments, strings etc. can be accomplished |
| 521 | with @code{font-lock}. To enable @code{font-lock} for IDL files, place | 543 | with @code{font-lock}. If you are using @code{global-font-lock-mode} |
| 522 | the 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 | 545 | XEmacs, it should also automatically work in IDLWAVE buffers. If not, |
| 546 | you 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 |
| 533 | Items which should be fontified on the default fontification level | 556 | Items which should be fontified on the default fontification level |
| 534 | 2.@refill | 557 | 2. |
| 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 | ||
| 541 | IDL defines more than one thousand procedures, functions and object | 569 | IDL defines more than one thousand procedures, functions and object |
| 542 | methods. This large command set makes it difficult to remember the | 570 | methods. This large command set makes it difficult to remember the |
| 543 | calling sequence and keywords of a command. IDLWAVE contains a list of | 571 | calling 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) | |||
| 546 | errors. Please report any detected errors to the maintainer, so that | 574 | errors. Please report any detected errors to the maintainer, so that |
| 547 | they can be fixed.}. It also scans Emacs buffers and library files for | 575 | they can be fixed.}. It also scans Emacs buffers and library files for |
| 548 | routine definitions and queries the IDLWAVE-Shell for the properties of | 576 | routine definitions and queries the IDLWAVE-Shell for the properties of |
| 549 | modules currently compiled under the shell. When you have edited a | 577 | modules currently compiled under the shell. This information is updated |
| 550 | buffer or compiled additional routines under the shell, use @kbd{C-c | 578 | automatically. If you think the information is not up-to-date, use |
| 551 | C-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 |
| 552 | these routines.@refill | 580 | update. |
| 553 | 581 | ||
| 582 | @kindex C-c ? | ||
| 554 | To display the information about a routine, press @kbd{C-c ?} which | 583 | To display the information about a routine, press @kbd{C-c ?} which |
| 555 | calls the command @code{idlwave-routine-info}. When the current cursor | 584 | calls the command @code{idlwave-routine-info}. When the current cursor |
| 556 | position is on the name or in the argument list of a procedure or | 585 | position 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 |
| 566 | On positions 1,2 and 8, information about the @samp{plot} procedure will | 595 | On positions 1,2 and 8, information about the @samp{plot} procedure will |
| 567 | be shown. On positions 3,4, and 7, the @samp{alog} function will be | 596 | be shown. On positions 3,4, and 7, the @samp{alog} function will be |
| 568 | described, while positions 5 and 6 will select the @samp{sin} function. | 597 | described, 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 | ||
| 575 | The description displayed contains the calling sequence, the list of | 605 | The description displayed contains the calling sequence, the list of |
| 576 | keywords and the origin of this information (@emph{system routine}, | 606 | keywords and the source location of this routine. It looks like this: |
| 577 | @emph{library routine}, @emph{Emacs buffer}, or @emph{compiled | ||
| 578 | module}). It looks like this: | ||
| 579 | 607 | ||
| 580 | @example | 608 | @example |
| 581 | Usage: MAP_PROJ_INFO, iproj | 609 | Usage: XMANAGER, NAME, ID |
| 582 | Keywords: CIRCLE CURRENT CYLINDRICAL NAME UV_LIMITS WIDTH | 610 | Keywords: BACKGROUND CATCH CLEANUP EVENT_HANDLER GROUP_LEADER |
| 583 | Origin: buffer visiting /soft1/idl/lib/map_set.pro | 611 | JUST_REG MODAL NO_BLOCK |
| 612 | Source: 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 | |||
| 623 | If a definition of this routine exists in several files accessible to | ||
| 624 | IDLWAVE, several @samp{Source} lines will point to the different files. | ||
| 625 | This may indicate that your routine is shadowing a library routine, | ||
| 626 | which may or may not be what you want (@pxref{Load-Path Shadows}). The | ||
| 627 | information about the calling sequence and the keywords is derived from | ||
| 628 | the first source listed. Library routines can only be supported if you | ||
| 629 | have scanned the local IDL library (@pxref{Library Scan}). The source | ||
| 630 | entry consists of a @emph{source category}, a set of @emph{flags} and | ||
| 631 | the path to the @emph{source file}. The following categories | ||
| 632 | exist: | ||
| 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 | ||
| 639 | next 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 | |||
| 654 | You can define additional categories based on the file name and path | ||
| 655 | with 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 | ||
| 661 | The flags @code{[CSB]} indicate if the file is known to IDLWAVE from the | ||
| 662 | library catalog (@w{@code{[C--]}}, @pxref{Library Scan}), from the Shell | ||
| 663 | (@w{@code{[-S-]}}) or from an Emacs buffer (@w{@code{[--B]}}). | ||
| 664 | Combinations are possible. If a file contains multiple definitions of | ||
| 665 | the 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 | ||
| 586 | Some of the text in the @file{*Help*} buffer will be active (it | 672 | Some of the text in the @file{*Help*} buffer will be active (it |
| 587 | highlights when you move the mouse over it). Clicking with the middle | 673 | highlights when you move the mouse over it). Clicking on these items |
| 588 | mouse button on any of the active fields will try to find the source file of | 674 | will have the following effects: |
| 589 | the routine and display it in another window. Another click on the same | 675 | |
| 590 | line will switch back to the buffer from which @kbd{C-c ?} was | 676 | @multitable @columnfractions 0.15 0.85 |
| 591 | called. Clicking with the right mouse button on an active field will | 677 | @item @i{Usage} |
| 592 | search the IDL online help for this item.@refill | 678 | @tab If online help is installed, a click with the @emph{right} mouse |
| 679 | button on the @i{Usage:} line will access the help for the | ||
| 680 | routine (@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} | ||
| 684 | mouse button will insert this keyword in the buffer from where | ||
| 685 | @code{idlwave-routine-info} was called. Holding down @key{SHIFT} while | ||
| 686 | clicking also adds the initial @samp{/}. | ||
| 687 | @item @i{Source} | ||
| 688 | @tab Clicking with the @emph{middle} mouse button on a @samp{Source} line | ||
| 689 | finds the source file of the routine and visits it in another window. | ||
| 690 | Another 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 | ||
| 692 | source will not be visited by a buffer, but displayed in the online help | ||
| 693 | window. | ||
| 694 | @end multitable | ||
| 593 | 695 | ||
| 594 | @cindex Routine source file | 696 | @defopt idlwave-resize-routine-help-window (@code{t}) |
| 595 | @cindex Module source file | 697 | Non-@code{nil} means, resize the Routine-info @file{*Help*} window to |
| 596 | Another way to find the source file of a routine is the command @kbd{C-c | 698 | fit the content. |
| 597 | C-v} (@code{idlwave-find-module}). It asks for a module name, offering | 699 | @end defopt |
| 598 | the same default as @code{idlwave-routine-info} would have used. In the | ||
| 599 | minibuffer, specify a complete routine name (including the class part). | ||
| 600 | IDLWAVE 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 | 702 | Alist of regular expressions matching special library directories. |
| 604 | @cindex Routines, resolving | 703 | @end defopt |
| 605 | @cindex Online help, for IDL routines | ||
| 606 | The two other commands that work with the routine at point need a | ||
| 607 | running 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 | ||
| 610 | documentation of the routine in the IDL online documentation. The key | ||
| 611 | sequence @kbd{C-c =} calls the command @code{idlwave-resolve} and sends | ||
| 612 | the line @samp{RESOLVE_ROUTINE, '@var{routine_name}'} to IDL in order to | ||
| 613 | resolve (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}) |
| 616 | of IDLWAVE's routine info collecting functions. A better way is to | 706 | Maximum number of source files displayed in the Routine Info window. |
| 617 | prescan (parts of) the library (@pxref{Library Scan}). Routine info on | 707 | @end defopt |
| 618 | library modules will then be available without the need to compile the | ||
| 619 | modules first, and even without a running shell. | ||
| 620 | 708 | ||
| 621 | @xref{Sources of Routine Info}, for in-depth information where IDLWAVE | 709 | @page |
| 622 | collects 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 |
| 625 | Non-@code{nil} means, scan all buffers for IDL programs when updating | 712 | @section Online Help |
| 626 | info. When this variable is @code{nil}, it only parses the current | 713 | |
| 627 | buffer.@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 | ||
| 721 | For IDL system routines, RSI provides extensive documentation. IDLWAVE | ||
| 722 | can access an ASCII version of this documentation very quickly and | ||
| 723 | accurately. This is @emph{much} faster than using the IDL online help | ||
| 724 | application, also because usually IDLWAVE gets you to the right place in | ||
| 725 | the docs directly, without additional browsing and scrolling. For this | ||
| 726 | online help to work, you need an ASCII version of the IDL documentation | ||
| 727 | which is not part of the standard IDLWAVE distribution. The required | ||
| 728 | files can be downloaded from @uref{@value{IDLWAVE-HOMEPAGE}, the | ||
| 729 | maintainers webpage}. As the text is extracted from PDF files, the | ||
| 730 | formatting of the help text is good for normal text, but graphics and | ||
| 731 | multiline 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 | ||
| 736 | For routines which are not documented in the IDL manual (for example | ||
| 737 | your own routines), the source code is used as help text. If the | ||
| 738 | requested information can be found in a (more or less) standard DocLib | ||
| 739 | file header, IDLWAVE shows the header. Otherwise the routine definition | ||
| 740 | statement (@code{pro}/@code{function}) is shown. | ||
| 741 | |||
| 742 | @kindex M-? | ||
| 743 | In any IDL program, press @kbd{M-?} (@code{idlwave-context-help}) or | ||
| 744 | click with @kbd{S-mouse-3} to access context sensitive online help. The | ||
| 745 | following 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 | ||
| 766 | Note that the @code{OBJ_NEW} function is special in that the help | ||
| 767 | displayed 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 | ||
| 769 | inside the quotes, the documentation for the class is pulled up. If the | ||
| 770 | cursor is @emph{after} the class name, anywhere in the argument list, | ||
| 771 | the documentation for the corresponding @code{Init} method and its | ||
| 772 | keywords is targeted. | ||
| 773 | |||
| 774 | @noindent Apart from source buffers, there are two more places from | ||
| 775 | which online help can be accessed. | ||
| 776 | |||
| 777 | @itemize @bullet | ||
| 778 | @item | ||
| 779 | Online help for routines and keywords can be accessed through the | ||
| 780 | Routine Info display. Click with @kbd{mouse-3} on an item to see the | ||
| 781 | corresponding help (@pxref{Routine Info}). | ||
| 782 | @item | ||
| 783 | When using completion and Emacs pops up a window with possible | ||
| 784 | completions, clicking with @kbd{mouse-3} on a completion item invokes | ||
| 785 | help on that item (@pxref{Completion}). | ||
| 786 | @end itemize | ||
| 787 | @noindent | ||
| 788 | In both cases, a blue face indicates that the item is documented in the | ||
| 789 | IDL manual. | ||
| 790 | |||
| 791 | @page | ||
| 792 | |||
| 793 | @cindex Help application, keybindings | ||
| 794 | @cindex Keybindings, in help application | ||
| 795 | The help window is normally displayed in a separate frame. The | ||
| 796 | following 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. | ||
| 813 | Items under @i{See Also} are active, and classes have links to their | ||
| 814 | methods 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 | ||
| 825 | are also available. | ||
| 826 | @multitable @columnfractions .15 .85 | ||
| 827 | @item @kbd{h} | ||
| 828 | @tab Jump to DocLib Header of the routine whose source is displayed | ||
| 829 | as 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 | ||
| 835 | item 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 | ||
| 841 | The 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}) |
| 631 | Non-@code{nil} means query the shell for info about compiled routines. | 845 | Non-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 |
| 635 | Non-@code{nil} means, resize the Routine-info @file{*Help*} window to | 849 | The frame parameters for the special Online Help frame. |
| 636 | fit the content.@refill | 850 | @end defopt |
| 851 | |||
| 852 | @defopt idlwave-max-popup-menu-items (@code{20}) | ||
| 853 | Maximum number of items per pane in popup menus. | ||
| 854 | @end defopt | ||
| 855 | |||
| 856 | @defopt idlwave-extra-help-function | ||
| 857 | Function 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}) | ||
| 861 | Non-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}) |
| 865 | Non-nil means, try to find help in routine header when displaying source | ||
| 866 | file. | ||
| 867 | @end defopt | ||
| 868 | |||
| 869 | @defopt idlwave-help-link-face | ||
| 870 | The 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 | |
| 644 | IDLWAVE offers completion for routine names and keywords. As in many | 877 | @cindex Method completion |
| 645 | programming modes, completion is bound to @kbd{M-@key{TAB}}. | 878 | @cindex Object method completion |
| 646 | Completion uses the same internal information as routine info, | 879 | @cindex Class name completion |
| 647 | so in order to update IDLWAVE's idea about your own routines after you | 880 | @cindex Function name completion |
| 648 | have 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 | ||
| 885 | IDLWAVE offers completion for class names, routine names and keywords. | ||
| 886 | As in many programming modes, completion is bound to @kbd{M-@key{TAB}}. | ||
| 887 | Completion uses the same internal information as routine info, so when | ||
| 888 | necessary it can be updated with @kbd{C-c C-i} | ||
| 889 | (@code{idlwave-update-routine-info}). | ||
| 650 | 890 | ||
| 651 | The completion function is context sensitive and figures out what to | 891 | The completion function is context sensitive and figures out what to |
| 652 | complete at point. Here are example lines and what @kbd{M-@key{TAB}} | 892 | complete at point. Here are example lines and what @kbd{M-@key{TAB}} |
| @@ -663,15 +903,24 @@ obj -> a* @r{Object method (procedure)} | |||
| 663 | a(2,3) = obj -> a* @r{Object method (function)} | 903 | a(2,3) = obj -> a* @r{Object method (function)} |
| 664 | x = obj_new('IDL* @r{Class name} | 904 | x = obj_new('IDL* @r{Class name} |
| 665 | x = obj_new('MyCl',a* @r{Keyword to @code{Init} method in class @code{MyCl}} | 905 | x = obj_new('MyCl',a* @r{Keyword to @code{Init} method in class @code{MyCl}} |
| 906 | pro A* @r{Class name} | ||
| 907 | pro * @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 | ||
| 670 | If the list of completions is too long to fit in the | 914 | If 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 |
| 917 | possible completion is available by clicking with @kbd{mouse-3} on the | ||
| 918 | item. Items for which system online help (from the IDL manual) is | ||
| 919 | available will be displayed in a different font. For other items, the | ||
| 920 | corresponding 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 | ||
| 675 | The case of the completed words is determined by what is already in the | 924 | The case of the completed words is determined by what is already in the |
| 676 | buffer. When the partial word being completed is all lower case, the | 925 | buffer. When the partial word being completed is all lower case, the |
| 677 | completion will be lower case as well. If at least one character is | 926 | completion 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. | |||
| 679 | The default is to use upper case for procedures, functions and keywords, | 928 | The default is to use upper case for procedures, functions and keywords, |
| 680 | and mixed case for object class names and methods, similar to the | 929 | and mixed case for object class names and methods, similar to the |
| 681 | conventions in the IDL manuals. These defaults can be changed with the | 930 | conventions in the IDL manuals. These defaults can be changed with the |
| 682 | variable @code{idlwave-completion-case}.@refill | 931 | variable @code{idlwave-completion-case}. |
| 683 | 932 | ||
| 684 | @defopt idlwave-completion-case | 933 | @defopt idlwave-completion-case |
| 685 | Association list setting the case (UPPER/lower/Capitalized/...) of completed | 934 | Association list setting the case (UPPER/lower/Capitalized/...) of completed |
| 686 | words.@refill | 935 | words. |
| 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}) |
| 696 | Non-@code{nil} means, the empty string is considered lower case for | 945 | Non-@code{nil} means, the empty string is considered lower case for |
| 697 | completion.@refill | 946 | completion. |
| 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}) |
| 701 | Non-@code{nil} means, completion automatically adds @samp{=} after | 950 | Non-@code{nil} means, completion automatically adds @samp{=} after |
| 702 | completed keywords.@refill | 951 | completed 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}) |
| 706 | Non-@code{nil} means, completion automatically adds @samp{(} after | 955 | Non-@code{nil} means, completion automatically adds @samp{(} after |
| 707 | completed function. A value of `2' means, also add the closing | 956 | completed function. A value of `2' means, also add the closing |
| 708 | parenthesis and position cursor between the two.@refill | 957 | parenthesis 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}) |
| 712 | Non-@code{nil} means, restore window configuration after successful | 961 | Non-@code{nil} means, restore window configuration after successful |
| 713 | completion.@refill | 962 | completion. |
| 963 | @end defopt | ||
| 964 | |||
| 965 | @defopt idlwave-highlight-help-links-in-completion (@code{t}) | ||
| 966 | Non-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 | ||
| 719 | An object method is not uniquely determined without the object's class. | 973 | An object method is not uniquely determined without the object's class. |
| 720 | Since the class part is usually omitted in the source code, IDLWAVE | 974 | Since the class part is usually omitted in the source code, IDLWAVE |
| 721 | considers all available methods in all classes as possible completions | 975 | considers 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 | |||
| 723 | current method in all available classes will be considered. In the | 977 | current 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 |
| 725 | will be shown next to the item (see option | 979 | will 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 |
| 981 | of an object called @samp{self} object is always the class of the | ||
| 982 | current routine. | ||
| 727 | 983 | ||
| 984 | @cindex Forcing class query. | ||
| 985 | @cindex Class query, forcing | ||
| 728 | You can also call @code{idlwave-complete} with a prefix arg: @kbd{C-u | 986 | You can also call @code{idlwave-complete} with a prefix arg: @kbd{C-u |
| 729 | M-@key{TAB}}. IDLWAVE will then prompt you for the class in order to | 987 | M-@key{TAB}}. IDLWAVE will then prompt you for the class in order to |
| 730 | narrow down the number of possible completions. The variable | 988 | narrow 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 |
| 732 | default (not really recommended). After you have specified the class | 990 | default (not recommended). After you have specified the class |
| 733 | for a particular statement (e.g. when completing the method), IDLWAVE | 991 | for a particular statement (e.g. when completing the method), IDLWAVE |
| 734 | can remember it for the rest of the editing session. Subsequent | 992 | can remember it for the rest of the editing session. Subsequent |
| 735 | completions in the same statement (e.g. keywords) can then reuse this | 993 | completions in the same statement (e.g. keywords) can then reuse this |
| 736 | class information. Remembering the class works by placing a text | 994 | class information. Remembering the class works by placing a text |
| 737 | property in the object operator @samp{->}. This is not enabled by | 995 | property in the object operator @samp{->}. This is not enabled by |
| 738 | default - the variable @code{idlwave-store-inquired-class} can be used | 996 | default - the variable @code{idlwave-store-inquired-class} can be used |
| 739 | to turn it on.@refill | 997 | to turn it on. |
| 740 | 998 | ||
| 741 | @defopt idlwave-completion-show-classes (@code{1}) | 999 | @defopt idlwave-completion-show-classes (@code{1}) |
| 742 | Non-@code{nil} means, show classes in @file{*Completions*} buffer when | 1000 | Non-@code{nil} means, show classes in @file{*Completions*} buffer when |
| 743 | completing object methods and keywords.@refill | 1001 | completing 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}) |
| 751 | Association list governing query for object classes during completion.@refill | 1009 | Association 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}) |
| 755 | Non-@code{nil} means, store class of a method call as text property on | 1013 | Non-@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 |
| 760 | Face to highlight object operator arrows @samp{->} which carry a class | 1018 | Face to highlight object operator arrows @samp{->} which carry a class |
| 761 | property.@refill | 1019 | text 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 | ||
| 1029 | Apart from clicking on a @i{Source:} line in the routine info window, | ||
| 1030 | there is also another way to find the source file of a routine. The | ||
| 1031 | command @kbd{C-c C-v} (@code{idlwave-find-module}) asks for a module | ||
| 1032 | name, offering the same default as @code{idlwave-routine-info} would | ||
| 1033 | have used. In the minibuffer, specify a complete routine name | ||
| 1034 | (including the class part). IDLWAVE will display the source file in | ||
| 1035 | another window. | ||
| 1036 | |||
| 1037 | @cindex Buffers, killing | ||
| 1038 | @cindex Killing autoloaded buffers | ||
| 1039 | Since getting the source of a routine into a buffer is so easy with | ||
| 1040 | IDLWAVE, too many buffers visiting different IDL source files are | ||
| 1041 | sometimes created. The special command @kbd{C-c C-k} | ||
| 1042 | (@code{idlwave-kill-autoloaded-buffers}) can be used to remove these | ||
| 1043 | buffers. | ||
| 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 | |||
| 1051 | The key sequence @kbd{C-c =} calls the command @code{idlwave-resolve} | ||
| 1052 | and sends the line @samp{RESOLVE_ROUTINE, '@var{routine_name}'} to IDL | ||
| 1053 | in order to resolve (compile) it. The default routine to be resolved is | ||
| 1054 | taken 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 | ||
| 1057 | of IDLWAVE's routine info collecting functions. A better way is to | ||
| 1058 | scan (parts of) the library (@pxref{Library Scan}). Routine info on | ||
| 1059 | library modules will then be available without the need to compile the | ||
| 1060 | modules first, and even without a running shell. | ||
| 1061 | |||
| 1062 | @xref{Sources of Routine Info}, for in-depth information where IDLWAVE | ||
| 1063 | collects 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 | ||
| 812 | The templates are expanded in upper or lower case, depending upon the | 1114 | The templates are expanded in upper or lower case, depending upon the |
| 813 | variables @code{idlwave-abbrev-change-case} and | 1115 | variables @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 |
| 817 | A single character string used to start abbreviations in abbrev | 1119 | A single character string used to start abbreviations in abbrev |
| 818 | mode.@refill | 1120 | mode. |
| 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 | |||
| 834 | in IDLWAVE are turned off by default, assuming that the average user | 1136 | in IDLWAVE are turned off by default, assuming that the average user |
| 835 | wants her code the way she writes it. But if you are a lazy typist and | 1137 | wants her code the way she writes it. But if you are a lazy typist and |
| 836 | want your code to adhere to certain standards, they can be | 1138 | want your code to adhere to certain standards, they can be |
| 837 | helpful.@refill | 1139 | helpful. |
| 838 | 1140 | ||
| 839 | Action can be applied in three ways: | 1141 | Action can be applied in three ways: |
| 1142 | |||
| 840 | @itemize @bullet | 1143 | @itemize @bullet |
| 841 | @item | 1144 | @item |
| 842 | Some actions are applied directly while typing. For example, pressing | 1145 | Some 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 |
| 844 | by spaces and insert these spaces if necessary. Pressing @key{SPC} | 1147 | by spaces and insert these spaces if necessary. Pressing @key{SPC} |
| 845 | after a reserved word can call a command to change the word to upper | 1148 | after a reserved word can call a command to change the word to upper |
| 846 | case.@refill | 1149 | case. |
| 847 | @item | 1150 | @item |
| 848 | When a line is re-indented with @key{TAB}, actions can be applied to the | 1151 | When a line is re-indented with @key{TAB}, actions can be applied to the |
| 849 | entire line. To enable this, the variable @code{idlwave-do-actions} | 1152 | entire line. To enable this, the variable @code{idlwave-do-actions} |
| 850 | must be non-@code{nil}.@refill | 1153 | must 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 | |||
| 856 | part of the code and execute @kbd{M-x expand-region-abbrevs}. Useful | 1159 | part of the code and execute @kbd{M-x expand-region-abbrevs}. Useful |
| 857 | marking commands are @kbd{C-x h} (the entire file) or @kbd{M-C-h} (the | 1160 | marking commands are @kbd{C-x h} (the entire file) or @kbd{M-C-h} (the |
| 858 | current subprogram). @xref{Code Indentation}, for information how to | 1161 | current subprogram). @xref{Code Indentation}, for information how to |
| 859 | ajust the indentation of the code.@refill | 1162 | adjust 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 | |||
| 881 | corresponding start of the block and the cursor blinks back to that | 1185 | corresponding start of the block and the cursor blinks back to that |
| 882 | location for a second. If you have typed a specific @code{END}, like | 1186 | location 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 |
| 884 | does not match the type of block it terminates.@refill | 1188 | does not match the type of block it terminates. |
| 885 | 1189 | ||
| 886 | Set the variable @code{idlwave-expand-generic-end} in order to have all | 1190 | Set the variable @code{idlwave-expand-generic-end} in order to have all |
| 887 | generic @code{END} statements automatically expanded to a specific type. | 1191 | generic @code{END} statements automatically expanded to a specific type. |
| 888 | You can also type @kbd{C-c ]} to close the current block by inserting | 1192 | You can also type @kbd{C-c ]} to close the current block by inserting |
| 889 | the appropriate @code{END} statement.@refill | 1193 | the appropriate @code{END} statement. |
| 890 | 1194 | ||
| 891 | @defopt idlwave-show-block (@code{t}) | 1195 | @defopt idlwave-show-block (@code{t}) |
| 892 | Non-@code{nil} means point blinks to block beginning for | 1196 | Non-@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}) |
| 897 | Non-@code{nil} means expand generic END to ENDIF/ENDELSE/ENDWHILE etc. | 1201 | Non-@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}) | ||
| 1205 | Non-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 | ||
| 905 | Some operators can be automatically surrounded by spaces. This can | 1214 | Some operators can be automatically surrounded by spaces. This can |
| 906 | happen when the operator is typed, or also later when the line is | 1215 | happen when the operator is typed, or also later when the line is |
| 907 | indented. IDLWAVE contains this setting for the operators @samp{&}, | 1216 | indented. 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 |
| 909 | longer than one character can only be padded during line indentation.}, | 1218 | longer than one character can only be padded during line indentation.}, |
| 910 | but the feature is turned off by default. If you want to turn it on, | 1219 | but the feature is turned off by default. If you want to turn it on, |
| 911 | customize the variables @code{idlwave-surround-by-blank} and | 1220 | customize 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 |
| 913 | other operators by using the function @code{idlwave-action-and-binding} | 1222 | other operators by using the function @code{idlwave-action-and-binding} |
| 914 | in the mode hook. For example, to enforce space padding of the @samp{+} | 1223 | in the mode hook. For example, to enforce space padding of the @samp{+} |
| 915 | and @samp{*} operators, try this in @file{.emacs}@refill | 1224 | and @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}) |
| 926 | Non-@code{nil} means, enable @code{idlwave-surround}. If non-nil, | 1235 | Non-@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 |
| 928 | surrounded with spaces by @code{idlwave-surround}.@refill | 1237 | surrounded 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}) |
| 932 | Non-@code{nil} means pad @samp{=} for keywords like assignments.@refill | 1241 | Non-@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 | ||
| 939 | Actions can be used to change the case of reserved words or expanded | 1250 | Actions can be used to change the case of reserved words or expanded |
| 940 | abbreviations by customizing the variables | 1251 | abbreviations 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 |
| 943 | additional words automatically, put something like the following into | 1254 | additional words automatically, put something like the following into |
| 944 | your @file{.emacs} file:@refill | 1255 | your @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 | ||
| 981 | The command @kbd{C-c C-h} inserts a standard routine header into the | 1295 | The command @kbd{C-c C-h} inserts a standard routine header into the |
| 982 | buffer, with the usual fields for documentation. One of the keywords is | 1296 | buffer, 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 | |||
| 1332 | IDLWAVE supports both @file{Imenu} and @file{Func-menu}, two packages | ||
| 1333 | which make it easy to jump to the definitions of functions and | ||
| 1334 | procedures in the current file. | ||
| 1013 | 1335 | ||
| 1014 | Several commands allow to move quickly through the structure of an IDL | 1336 | Several commands allow to move quickly through the structure of an IDL |
| 1015 | program. These are | 1337 | program. 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 |
| 1043 | The external application providing reference help for programming. | 1366 | The 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 | ||
| 1079 | The IDLWAVE shell is an Emacs major mode which allows to run the IDL | 1408 | The IDLWAVE shell is an Emacs major mode which allows to run the IDL |
| 1080 | program as an inferior process of Emacs. It can be used to work with | 1409 | program 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. | |||
| 1084 | Unfortunately IDL for Windows and MacOS does not allow the interaction | 1413 | Unfortunately IDL for Windows and MacOS does not allow the interaction |
| 1085 | with Emacs@footnote{Please inform the maintainer if you come up with a way | 1414 | with Emacs@footnote{Please inform the maintainer if you come up with a way |
| 1086 | to make the IDLWAVE shell work on these systems.} - so the IDLWAVE shell | 1415 | to make the IDLWAVE shell work on these systems.} - so the IDLWAVE shell |
| 1087 | only works under Unix.@refill | 1416 | only 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 | ||
| 1102 | The IDLWAVE shell can be started with the command @kbd{M-x | 1433 | The IDLWAVE shell can be started with the command @kbd{M-x |
| 1103 | idlwave-shell}. In @code{idlwave-mode} the function is bound to | 1434 | idlwave-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 |
| 1105 | interact with the shell. If the shell is already running, @kbd{C-c C-s} | 1436 | interact with the shell. If the shell is already running, @kbd{C-c C-s} |
| 1106 | will simple switch to the shell buffer. The command @kbd{C-c C-l} | 1437 | will 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 |
| 1108 | shell window without selecting it.@refill | 1439 | shell window without selecting it. |
| 1109 | 1440 | ||
| 1110 | In order to create a separate frame for the IDLWAVE shell buffer, call | 1441 | In 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 |
| 1113 | window, configure the variable | 1444 | window, configure the variable |
| 1114 | @code{idlwave-shell-use-dedicated-frame}.@refill | 1445 | @code{idlwave-shell-use-dedicated-frame}. |
| 1115 | 1446 | ||
| 1116 | The shell can also be started automatically when another command tries | 1447 | The shell can also be started automatically when another command tries |
| 1117 | to send a command to it. To enable auto start, set the variable | 1448 | to 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 |
| 1121 | This is the command to run IDL. | 1452 | This 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 |
| 1155 | The prefix for temporary IDL files used when compiling regions.@refill | 1486 | The 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 |
| 1159 | Hook for customizing @code{idlwave-shell-mode}. | 1491 | Hook 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 | ||
| 1167 | The IDLWAVE shell works in the same fashion as other shell modes in | 1499 | The IDLWAVE shell works in the same fashion as other shell modes in |
| 1168 | Emacs. It provides command history, command line editing and job | 1500 | Emacs. It provides command history, command line editing and job |
| 1169 | control. Here is a list of commonly used commands, see the Emacs | 1501 | control. Here is a list of commonly used commands. |
| 1170 | documentation 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 | ||
| 1203 | In addition to these standard @file{comint} commands, | 1534 | In 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 |
| 1205 | commands in @code{idlwave-mode}. See @ref{Routine Info} and | 1536 | writing IDL code, including abbreviations, online help, and completion. |
| 1206 | @ref{Completion} for more information on these commands.@refill | 1537 | See @ref{Routine Info} and @ref{Online Help} and @ref{Completion} for more |
| 1207 | 1538 | information 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 |
| 1230 | The characters allowed in file names, as a string. Used for file name | 1563 | The characters allowed in file names, as a string. Used for file name |
| 1231 | completion.@refill | 1564 | completion. |
| 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 | ||
| 1573 | IDLWAVE works in line input mode: You compose a full command line, using | ||
| 1574 | all the power Emacs gives you to do this. When you press @key{RET}, the | ||
| 1575 | whole line is sent to IDL. Sometimes it is necessary to send single | ||
| 1576 | characters (without a newline), for example when an IDL program is | ||
| 1577 | waiting for single character input with the @code{GET_KBRD} function. | ||
| 1578 | You 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 | ||
| 1581 | which accepts characters and immediately sends them to IDL. The loop | ||
| 1582 | can be exited with @kbd{C-g}. It terminates also automatically when the | ||
| 1583 | current IDL command is finished. Check the documentation of the two | ||
| 1584 | variables described below for a way to make IDL programs trigger | ||
| 1585 | automatic switches of the input mode. | ||
| 1586 | |||
| 1587 | @defopt idlwave-shell-use-input-mode-magic (@code{nil}) | ||
| 1588 | Non-nil means, IDLWAVE should check for input mode spells in output. | ||
| 1589 | @end defopt | ||
| 1590 | |||
| 1591 | @defopt idlwave-shell-input-mode-spells | ||
| 1592 | The three regular expressions which match the magic spells for input | ||
| 1593 | modes. | ||
| 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 | ||
| 1240 | Programs can be compiled, run, and debugged directly from the source | 1603 | Programs can be compiled, run, and debugged directly from the source |
| 1241 | buffer in Emacs. The IDLWAVE shell installs keybindings both in the | 1604 | buffer in Emacs. The IDLWAVE shell installs keybindings both in the |
| 1242 | shell buffer and in all IDL code buffers of the current Emacs session. | 1605 | shell buffer and in all IDL code buffers of the current Emacs session. |
| 1243 | On Emacs versions which support this, it also installs a debugging | 1606 | On Emacs versions which support this, it also installs a debugging |
| 1244 | toolbar. The display of the toolbar can be toggled with @kbd{C-c C-d | 1607 | toolbar. The display of the toolbar can be toggled with @kbd{C-c C-d |
| 1245 | C-t} (@code{idlwave-shell-toggle-toolbar}).@refill | 1608 | C-t} (@code{idlwave-shell-toggle-toolbar}). |
| 1246 | 1609 | ||
| 1247 | The debugging keybindings are by default on the prefix key @kbd{C-c | 1610 | The debugging keybindings are by default on the prefix key @kbd{C-c |
| 1248 | C-d}, so for example setting a breakpoint is done with @kbd{C-c C-d | 1611 | C-d}, so for example setting a breakpoint is done with @kbd{C-c C-d |
| @@ -1252,9 +1615,9 @@ available, turn on the variable | |||
| 1252 | setting on @kbd{A-b}. In the remainder of this chapter we will assume | 1615 | setting on @kbd{A-b}. In the remainder of this chapter we will assume |
| 1253 | that the @kbd{C-c C-d} bindings are active. | 1616 | that 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}) |
| 1256 | The prefix key for the debugging map | 1619 | The 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}) |
| 1271 | Non-@code{nil} means, use the debugging toolbar in all IDL related | 1634 | Non-@code{nil} means, use the debugging toolbar in all IDL related |
| 1272 | buffers.@refill | 1635 | buffers. |
| 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 | ||
| 1289 | In order to compile the current buffer under the IDLWAVE shell, press | 1653 | In 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 |
| 1291 | current buffer and then send the command @samp{.run path/to/file} to the | 1655 | current buffer and then send the command @samp{.run path/to/file} to the |
| 1292 | shell. You can laso execute @kbd{C-c C-d C-c} from the shell buffer, in | 1656 | shell. You can also execute @kbd{C-c C-d C-c} from the shell buffer, in |
| 1293 | which case the most recently compiled buffer will be saved and | 1657 | which case the most recently compiled buffer will be saved and |
| 1294 | re-compiled. | 1658 | re-compiled. |
| 1295 | 1659 | ||
| @@ -1300,29 +1664,32 @@ This command first resets IDL from a state of interrupted execution by | |||
| 1300 | closing all files and returning to the main interpreter level. Then a | 1664 | closing all files and returning to the main interpreter level. Then a |
| 1301 | default command line is send to the shell. To edit the default command | 1665 | default command line is send to the shell. To edit the default command |
| 1302 | line, call @code{idlwave-shell-execute-default-command-line} with a | 1666 | line, call @code{idlwave-shell-execute-default-command-line} with a |
| 1303 | prefix argument: @kbd{C-u C-c C-d C-y}.@refill | 1667 | prefix 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}) |
| 1306 | Non-@code{nil} means, mark the source code line where IDL is currently | 1670 | Non-@code{nil} means, mark the source code line where IDL is currently |
| 1307 | stopped. The value decides about the preferred method. Legal values | 1671 | stopped. The value decides about the preferred method. Legal values |
| 1308 | are @code{nil}, @code{t}, @code{arrow}, and @code{face}.@refill | 1672 | are @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{">"}) |
| 1312 | The overlay arrow to display at source lines where execution | 1676 | The overlay arrow to display at source lines where execution |
| 1313 | halts.@refill | 1677 | halts. |
| 1314 | @end defopt | 1678 | @end defopt |
| 1315 | 1679 | ||
| 1316 | @defopt idlwave-shell-stop-line-face | 1680 | @defopt idlwave-shell-stop-line-face |
| 1317 | The face which highlights the source line where IDL is | 1681 | The face which highlights the source line where IDL is |
| 1318 | stopped.@refill | 1682 | stopped. |
| 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 | ||
| 1326 | You can set breakpoints and step through a program with IDLWAVE. | 1693 | You can set breakpoints and step through a program with IDLWAVE. |
| 1327 | Setting a breakpoint in the current line of the source buffer is done | 1694 | Setting a breakpoint in the current line of the source buffer is done |
| 1328 | with @kbd{C-c C-d C-b} (@code{idlwave-shell-break-here}). With a prefix | 1695 | with @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. | |||
| 1332 | To clear the breakpoint in the current line, use @kbd{C-c C-d C-d} | 1699 | To 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 |
| 1335 | highlighted in the source code.@refill | 1702 | highlighted in the source code. |
| 1336 | 1703 | ||
| 1337 | Once the program has stopped somewhere, you can step through it. Here | 1704 | Once the program has stopped somewhere, you can step through it. Here |
| 1338 | is a summary of the breakpoint and stepping commands: | 1705 | is 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 |
| 1378 | The face for breakpoint lines in the source code if | 1745 | The 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 | ||
| 1390 | When execution is stopped you can examine the values of variables. The | 1758 | When execution is stopped you can examine the values of variables. The |
| 1391 | command @kbd{C-c C-d C-p} prints the expression at point, while @kbd{C-c | 1759 | command @kbd{C-c C-d C-p} prints the expression at point, while @kbd{C-c |
| 1392 | C-d ?} shows help on this expression. The expression at point is an | 1760 | C-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 | |||
| 1396 | argument will prompt for an expression instead of using the one at | 1764 | argument will prompt for an expression instead of using the one at |
| 1397 | point. | 1765 | point. |
| 1398 | 1766 | ||
| 1399 | I find it very convenient to bind these functions to a mouse event, so | 1767 | It is very convenient to click with the mouse on expressions to retrieve |
| 1400 | that simply clicking on an expression prints its value. The following | 1768 | their value. Expression printing is also bound to @kbd{S-mouse-2} and |
| 1401 | code binds printing an expression to a click with mouse button 2 while | 1769 | expression help to @kbd{C-S-mouse-2}. I.e. you need to hold down |
| 1402 | holding 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 | ||
| 1411 | Printing of expressions also works on higher levels of the calling | 1775 | Printing of expressions also works on higher levels of the calling |
| 1412 | stack. This means that you can examine the values of variables and | 1776 | stack. This means that you can examine the values of variables and |
| 1413 | expressions inside the routine which called the current routine etc. | 1777 | expressions inside the routine which called the current routine etc. |
| 1414 | Use the commands @kbd{C-c C-d C-@key{UP}} | 1778 | Use the commands @kbd{C-c C-d C-@key{UP}} |
| 1415 | (@code{idlwave-shell-stack-up}) and @kbd{C-c C-d C-@key{DOWN}} | 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 |
| 1417 | to move through the calling stack. The mode line will indicate the | 1781 | to move through the calling stack. The mode line of the shell window |
| 1418 | routine and the calling stack level which define the context for | 1782 | will indicate the routine and the calling stack level which define the |
| 1419 | printing expressions. The following restrictions apply for all levels | 1783 | context for printing expressions. The following restrictions apply for |
| 1420 | except the current:@refill | 1784 | all levels except the current: |
| 1421 | 1785 | ||
| 1422 | @itemize @bullet | 1786 | @itemize @bullet |
| 1423 | @item | 1787 | @item |
| 1424 | Array expressions must use the @samp{[ ]} index delimiters. Identifiers | 1788 | Array expressions must use the @samp{[ ]} index delimiters. Identifiers |
| 1425 | with a @samp{( )} will be interpreted as function calls. | 1789 | with a @samp{( )} will be interpreted as function calls. |
| 1426 | @item | 1790 | @item |
| 1427 | Variable 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 |
| 1431 | Printing values of expressions on higher levels of the calling stack | 1792 | Printing values of expressions on higher levels of the calling stack |
| 1432 | uses the @emph{unsupported} IDL routine @code{ROUTINE_NAMES}, which may | 1793 | uses 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 | ||
| 1461 | IDLWAVE 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 | ||
| 1827 | IDLWAVE is part of Emacs 21.1 and later. It is also an XEmacs package | ||
| 1462 | and can be installed from | 1828 | and 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} |
| 1464 | with the normal package management system on XEmacs 21.@refill | 1830 | with the normal package management system on XEmacs 21. These |
| 1831 | pre-installed versions should work out-of-the-box. However, the files | ||
| 1832 | needed for online help are not distributed with XEmacs/Emacs and have to | ||
| 1833 | be installed separately@footnote{Due to copyright reasons, the ASCII | ||
| 1834 | version of the IDL manual cannot be distributed under the GPL.} | ||
| 1835 | (@pxref{Installing Online Help}). | ||
| 1465 | 1836 | ||
| 1466 | You can also download IDLWAVE and install it yourself from | 1837 | You 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 |
| 1468 | webpage}. Follow the instructions in the INSTALL file.@refill | 1839 | instructions 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 | 1846 | If you want to use the online help display, two additional files (an |
| 1847 | ASCII version of the IDL documentation and a topics/code file) must be | ||
| 1848 | installed. These files can also be downloaded from | ||
| 1849 | @uref{@value{IDLWAVE-HOMEPAGE}, the maintainers webpage}. You need to | ||
| 1850 | place the files somewhere on your system and tell IDLWAVE where they are | ||
| 1851 | with | ||
| 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 | ||
| 1476 | If you have been using the old @file{idl.el} and @file{idl-shell.el} | 1864 | If you have been using the old @file{idl.el} and @file{idl-shell.el} |
| 1477 | files and would like to use IDLWAVE, you need to update your | 1865 | files and would like to use IDLWAVE, you need to update your |
| @@ -1482,7 +1870,8 @@ customization in @file{.emacs}. | |||
| 1482 | Change all variable and function prefixes from @samp{idl-} to @samp{idlwave-}. | 1870 | Change all variable and function prefixes from @samp{idl-} to @samp{idlwave-}. |
| 1483 | @item | 1871 | @item |
| 1484 | Remove the now invalid @code{autoload} and @code{auto-mode-alist} forms | 1872 | Remove the now invalid @code{autoload} and @code{auto-mode-alist} forms |
| 1485 | pointing to the @file{idl.el} and @file{idl-shell.el} files. | 1873 | pointing to the @file{idl.el} and @file{idl-shell.el} files. Install |
| 1874 | the new autoload forms. | ||
| 1486 | @item | 1875 | @item |
| 1487 | If you have been using the hook function recommended in earlier versions | 1876 | If you have been using the hook function recommended in earlier versions |
| 1488 | to get a separate frame for the IDL shell, remove that command from your | 1877 | to 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 |
| 1495 | The key sequence @kbd{M-@key{TAB}} no longer inserts a TAB character, | 1884 | The key sequence @kbd{M-@key{TAB}} no longer inserts a TAB character. |
| 1496 | but (as in many other Emacs modes) does completion. Inserting a TAB is | 1885 | Like in in many other Emacs modes, @kbd{M-@key{TAB}} now does |
| 1497 | now bound to @kbd{C-c @key{SPC}}.@refill | 1886 | completion. 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 | 1901 | The main contributors to the IDLWAVE package have been: |
| 1507 | was extended and renamed to IDLWAVE by the current maintainer | ||
| 1508 | @uref{mailto:dominik@@strw.leidenuniv.nl, Carsten Dominik}. | ||
| 1509 | 1902 | ||
| 1510 | Thanks to the following people who have contributed to the development | 1903 | @itemize @minus |
| 1511 | of 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 | ||
| 1907 | years. | ||
| 1908 | |||
| 1909 | @item | ||
| 1910 | @uref{mailto:dominik@@astro.uva.nl, @b{Carsten Dominik}} has been in | ||
| 1911 | charge of the package since version 3.0. He renamed the package to | ||
| 1912 | IDLWAVE, 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 | ||
| 1916 | shaped Object method completion and most new features in version 4.0 | ||
| 1917 | with his ideas, bug reports, and patient explanations of IDL internals. | ||
| 1918 | @end itemize | ||
| 1919 | |||
| 1920 | @noindent | ||
| 1921 | The following people have also contributed to the development of IDLWAVE | ||
| 1922 | with 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 |
| 1537 | Phil Williams <williams@@irc.chmcc.org> | 1948 | Phil Williams <williams@@irc.chmcc.org> |
| 1538 | @item | 1949 | @item |
| 1539 | J.D. Smith <jdsmith@@astrosun.tn.cornell.edu> | ||
| 1540 | @item | ||
| 1541 | Phil Sterne <sterne@@dublin.llnl.gov> | 1950 | Phil Sterne <sterne@@dublin.llnl.gov> |
| 1542 | @end itemize | 1951 | @end itemize |
| 1543 | 1952 | ||
| 1953 | @noindent | ||
| 1954 | Thanks 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 | ||
| 1547 | In @ref{Routine Info} and @ref{Completion} it was shown how IDLWAVE | 1960 | In @ref{Routine Info} and @ref{Completion} it was shown how IDLWAVE |
| 1548 | displays the calling sequence and keywords of routines, and how it | 1961 | displays the calling sequence and keywords of routines, and how it |
| 1549 | completes routine names and keywords. For these features to work, | 1962 | completes 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 | ||
| 1563 | Routines which can be used in an IDL program can be defined in several | 1982 | Routines which can be used in an IDL program can be defined in several |
| 1564 | places: | 1983 | places: |
| 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 |
| 1569 | code of such routines is not accessible to the user.@refill | 1988 | code of such routines is not accessible to the user. |
| 1570 | @item | 1989 | @item |
| 1571 | Routines @emph{part of the current program} are defined in a file which | 1990 | Routines @emph{part of the current program} are defined in a file which |
| 1572 | is explicitly compiled by the user. This file may be located on the IDL | 1991 | is explicitly compiled by the user. This file may or may not be located |
| 1573 | search path, but this is not certain.@refill | 1992 | on 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 |
| 1576 | somewhere on IDL's search path. When a library routine is called for | 1995 | somewhere on IDL's search path. When a library routine is called for |
| 1577 | the first time, IDL will find the source file and compile it | 1996 | the first time, IDL will find the source file and compile it |
| 1578 | dynamically.@refill | 1997 | dynamically. |
| 1579 | @item | 1998 | @item |
| 1580 | External routines written in other languages (like Fortran or C) can be | 1999 | External routines written in other languages (like Fortran or C) can be |
| 1581 | called with @code{CALL_EXTERNAL}, linked into IDL via @code{LINKIMAGE}, | 2000 | called with @code{CALL_EXTERNAL}, linked into IDL via @code{LINKIMAGE}, |
| 1582 | or included as dynamically loaded modules (DLMs). Currently IDLWAVE | 2001 | or included as dynamically loaded modules (DLMs). Currently IDLWAVE |
| 1583 | cannot provide routine info and completion for external | 2002 | cannot provide routine info and completion for external |
| 1584 | routines.@refill | 2003 | routines. |
| 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 | ||
| 1591 | In oder to know about as many routines as possible, IDLWAVE will do the | 2015 | In oder to know about as many routines as possible, IDLWAVE will do the |
| 1592 | following to collect information:@refill | 2016 | following 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, |
| 1600 | reflecting IDL version @value{IDLVERSION}. This list has been created | 2024 | reflecting IDL version @value{IDLVERSION}. This list has been created |
| 1601 | by scanning the IDL manuals and is stored in the file | 2025 | by 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 |
| 1603 | information how to regenerate this file for new versions of IDL.@refill | 2027 | information how to regenerate this file for new versions of IDL. |
| 1604 | 2028 | ||
| 1605 | @item | 2029 | @item |
| 1606 | It @emph{scans} all @emph{buffers} of the current Emacs session for | 2030 | It @emph{scans} all @emph{buffers} of the current Emacs session for |
| 1607 | routine definitions. This is done automatically when routine | 2031 | routine definitions. This is done automatically when routine |
| 1608 | information or completion is first requested by the user. The command | 2032 | information 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 | 2033 | buffer and each buffer which is saved after making changes is also |
| 1610 | time to rescan all buffers.@refill | 2034 | scanned. The command @kbd{C-c C-i} (@code{idlwave-update-routine-info}) |
| 2035 | can be used at any time to rescan all buffers. | ||
| 1611 | 2036 | ||
| 1612 | @item | 2037 | @item |
| 1613 | If you have an IDLWAVE-Shell running as inferior process of the current | 2038 | If you have an IDLWAVE-Shell running as inferior process of the current |
| 1614 | Emacs session, IDLWAVE will @emph{query the shell} for compiled routines | 2039 | Emacs session, IDLWAVE will @emph{query the shell} for compiled routines |
| 1615 | and their arguments. This happens automatically when routine | 2040 | and their arguments. This happens automatically when routine |
| 1616 | information or completion is first requested by the user. The command | 2041 | information or completion is first requested by the user, and each time |
| 2042 | an 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 |
| 1618 | the shell again at any time.@refill | 2044 | the shell again at any time. |
| 1619 | 2045 | ||
| 1620 | @item | 2046 | @item |
| 1621 | IDLWAVE can scan all or selected library files and store the result in a | 2047 | IDLWAVE can scan all or selected library files and store the result in a |
| 1622 | file which will be automatically loaded just like | 2048 | file 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 |
| 1624 | scan library files.@refill | 2050 | scan 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}) |
| 1628 | Non-@code{nil} means, scan all buffers for IDL programs when updating | 2054 | Non-@code{nil} means, scan all buffers for IDL programs when updating |
| 1629 | info. When this variable is @code{nil}, it only parses the current | 2055 | info. |
| 1630 | buffer.@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}) |
| 1634 | Non-@code{nil} means query the shell for info about compiled routines. | 2059 | Non-@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 | ||
| 2063 | Controls 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 | ||
| 1643 | IDLWAVE can extract routine information from library modules and store | 2077 | IDLWAVE can extract routine information from library modules and store |
| 1644 | that information in a file. To do this, the variable | 2078 | that 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 |
| 1646 | existing directory (e.g. @code{"~/idlwave_libinfo.el"}). Since the file | 2080 | existing directory (the default is @code{"~/.idlcat.el"}). Since the |
| 1647 | will contain lisp code, it should end in @file{.el}. Under Windows and | 2081 | file will contain lisp code, its name should end in @file{.el}. Under |
| 1648 | MacOS, you also need to specify the search path for IDL library files in | 2082 | Windows and MacOS, you also need to specify the search path for IDL |
| 1649 | the variable @code{idlwave-library-path}. Under UNIX, this path will | 2083 | library files in the variable @code{idlwave-library-path}, and the |
| 1650 | be automatically inferred from an IDLWAVE shell.@refill | 2084 | location of the IDL directory (the value of the @code{!DIR} system |
| 2085 | variable) in the variable @code{idlwave-system-directory}. Under UNIX, | ||
| 2086 | these values will be automatically inferred from an IDLWAVE | ||
| 2087 | shell. | ||
| 1651 | 2088 | ||
| 1652 | The command @kbd{M-x idlwave-create-libinfo-file} can then be used to | 2089 | The command @kbd{M-x idlwave-create-libinfo-file} can then be used to |
| 1653 | scan library files. It brings up a widget in which you can select some | 2090 | scan library files. It brings up a widget in which you can select some |
| 1654 | or all directories on the search path. Pressing the @w{@samp{[Scan & Save]}} | 2091 | or all directories on the search path. If you only want to have routine |
| 1655 | button in the widget will scan all files in the selected directories and | 2092 | and completion info of some libraries, it is sufficient to scan those |
| 2093 | directories. However, if you want IDLWAVE to detect possible name | ||
| 2094 | conflicts with routines defined in other libraries, the whole pass | ||
| 2095 | should be scanned. | ||
| 2096 | |||
| 2097 | After selecting directories, click on the @w{@samp{[Scan & Save]}} | ||
| 2098 | button in the widget to scan all files in the selected directories and | ||
| 1656 | write the resulting routine information into the file | 2099 | write 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 |
| 1658 | from the same directories, call the command | 2101 | from 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 |
| 1661 | selected directories, write an updated version of the libinfo file and | 2104 | selected directories, write an updated version of the libinfo file and |
| 1662 | rebuild IDLWAVEs internal lists.@refill | 2105 | rebuild IDLWAVEs internal lists. |
| 1663 | 2106 | ||
| 1664 | A note of caution: Depending on your local installation, the IDL | 2107 | A note of caution: Depending on your local installation, the IDL |
| 1665 | library can be very large. Parsing it for routine information will take | 2108 | library can be very large. Parsing it for routine information will take |
| 1666 | time and loading this information into Emacs can require a | 2109 | time and loading this information into Emacs can require a |
| 1667 | significant amount of memory.@refill | 2110 | significant amount of memory. However, having this information |
| 1668 | 2111 | available will be a great help. | |
| 1669 | A routine which is both in the library listing and compiled under the | ||
| 1670 | shell will show up twice in the @file{*Completions*} listing. This is | ||
| 1671 | usually not a serious problem. However, if you have scanned the part of | ||
| 1672 | the library relevant for you, and if you are not compiling files which | ||
| 1673 | are not on the library search path, the information about compiled | ||
| 1674 | routines is in fact unnecessary. In this case, you can turn off the | ||
| 1675 | shell 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 |
| 1679 | File for routine information of the IDL library. | 2114 | File for routine information of the IDL library. |
| @@ -1683,28 +2118,101 @@ File for routine information of the IDL library. | |||
| 1683 | IDL library path for Windows and MacOS. Not needed under Unix. | 2118 | IDL 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 | 2122 | The 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 | ||
| 2126 | Alist 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 | |||
| 2139 | IDLWAVE can compile a list of routines which are defined in several | ||
| 2140 | different files. Since one definition will hide (shadow) the others | ||
| 2141 | depending on which file is compiled first, such multiple definitions are | ||
| 2142 | called "load-path shadows". IDLWAVE has several routines to scan for | ||
| 2143 | load path shadows. The output is placed into s special buffer | ||
| 2144 | @file{*Shadows*}. The format of the output is identical to the source | ||
| 2145 | section of the routine info buffer (@pxref{Routine Info}). Before | ||
| 2146 | calling these routines, you should make sure that routine info is | ||
| 2147 | up-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} | ||
| 2151 | This commands checks the names of all routines defined in the current | ||
| 2152 | buffer for shadowing conflicts with other routines accessible to | ||
| 2153 | IDLWAVE. The command also has a key binding: @kbd{C-c C-b} | ||
| 2154 | @item @kbd{M-x idlwave-list-shell-load-path-shadows}. | ||
| 2155 | Checks all routines compiled under the shell for shadowing. This is | ||
| 2156 | very useful when you have written a complete application. Just compile | ||
| 2157 | the application, use @code{RESOLVE_ALL} to compile any routines used by | ||
| 2158 | your code, update the routine info inside IDLWAVE with @kbd{C-c C-i} and | ||
| 2159 | then check for shadowing. | ||
| 2160 | @item @kbd{M-x idlwave-list-all-load-path-shadows} | ||
| 2161 | This command finally checks all routines accessible to IDLWAVE for | ||
| 2162 | shadowing conflicts. | ||
| 2163 | @end table | ||
| 2164 | |||
| 2165 | For these commands to work properly you should have scanned the entire | ||
| 2166 | load path, not just selected directories. Also, IDLWAVE should be able to | ||
| 2167 | distinguish between the system library files (normally installed in | ||
| 2168 | @file{/usr/local/rsi/idl/lib}) and any site specific or user specific | ||
| 2169 | files. Therefore, such local files should not be installed | ||
| 2170 | inside the @file{lib} directory of the IDL directory. This is of course | ||
| 2171 | also advisable for many other reasons. | ||
| 2172 | |||
| 2173 | @cindex Windows | ||
| 2174 | @cindex MacOS | ||
| 2175 | @cindex IDL variable @code{!DIR} | ||
| 2176 | @cindex @code{!DIR}, IDL variable | ||
| 2177 | Users of Windows and MacOS also must set the variable | ||
| 2178 | @code{idlwave-system-directory} to the value of the @code{!DIR} system | ||
| 2179 | variable in IDL. IDLWAVE appends @file{lib} to the value of this | ||
| 2180 | variable and assumes that all files found on that path are system | ||
| 2181 | routines. | ||
| 2182 | |||
| 2183 | Another way to find out if a specific routine has multiple definitions | ||
| 2184 | on 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 | ||
| 1693 | The file @file{idlw-rinfo.el} contains the routine information for | 2195 | IDLWAVE derives it knowledge about system routines from the IDL |
| 1694 | the routines build into IDL. This constant depends upon the version of | 2196 | manuals. The file @file{idlw-rinfo.el} contains the routine information |
| 1695 | IDL. If you are lucky, the maintainer of IDLWAVE will always have | 2197 | for the IDL system routines. The Online Help feature of IDLWAVE |
| 1696 | access to the newest version of IDL and provide updates of | 2198 | requires ASCII versions of some IDL manuals to be available in a |
| 1697 | @file{idlw-rinfo.el} reflecting the currently released version of | 2199 | specific format (@file{idlw-help.txt}), along with an Emacs-Lisp file |
| 1698 | IDL. 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. |
| 1699 | which constructs this file by scanning selected files from the IDL | 2201 | |
| 1700 | documentation. The program needs @file{pdftotext} by Derek B. Noonburg. | 2202 | All 3 files can be derived from the IDL documentation. If you are |
| 1701 | Instructions on how to use @file{get_rinfo} are in the program | 2203 | lucky, the maintainer of IDLWAVE will always have access to the newest |
| 1702 | itself.@refill | 2204 | version of IDL and provide updates. The IDLWAVE distribution also |
| 2205 | contains the Perl program @file{get_rinfo} which constructs these files | ||
| 2206 | by scanning selected files from the IDL documentation. Instructions on | ||
| 2207 | how 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 |
| 1716 | options to what I think is best. However, the default settings do not | 2224 | options to what I think is best. However, the default settings do not |
| 1717 | turn on features which | 2225 | turn on features which |
| 2226 | |||
| 1718 | @itemize @minus | 2227 | @itemize @minus |
| 1719 | @item | 2228 | @item |
| 1720 | are not self-evident (i.e. too magic) when used by an unsuspecting user | 2229 | are not self-evident (i.e. too magic) when used by an unsuspecting user |
| @@ -1723,7 +2232,7 @@ are too intrusive | |||
| 1723 | @item | 2232 | @item |
| 1724 | will not work properly on all Emacs installations out there | 2233 | will not work properly on all Emacs installations out there |
| 1725 | @item | 2234 | @item |
| 1726 | break with what I think are widely used standards. | 2235 | break 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 | ||
| 1747 | However, if you are an Emacs power-user and want IDLWAVE to work | 2253 | However, if you are an Emacs power-user and want IDLWAVE to work |
| 1748 | completely differently, the options allow you to change almost every | 2254 | completely differently, the options allow you to change almost every |
| 1749 | aspect of it. Here is an example of a much more extensive configuration | 2255 | aspect of it. Here is an example of a much more extensive configuration |
| 1750 | of IDLWAVE. To say it again - this is not what I recommend, but the | 2256 | of IDLWAVE. To say it again - this is not what I recommend, but the |
| 1751 | user is King!@refill | 2257 | user 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 | ||