]> code.delx.au - gnu-emacs/commitdiff
Updated to IDLWAVE version 4.15. See idlwave.org.
authorJ.D. Smith <jdsmith@as.arizona.edu>
Thu, 12 Sep 2002 17:24:53 +0000 (17:24 +0000)
committerJ.D. Smith <jdsmith@as.arizona.edu>
Thu, 12 Sep 2002 17:24:53 +0000 (17:24 +0000)
lisp/progmodes/idlw-rinfo.el
lisp/progmodes/idlw-shell.el
lisp/progmodes/idlw-toolbar.el
lisp/progmodes/idlwave.el
man/idlwave.texi

index cacafda2106c460b4e8649ea8a60f938f997ba95..b44e0d0210e721339fa1a6f50158352ecec47b51 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Carsten Dominik <dominik@astro.uva.nl>
 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
-;; Version: 4.14
+;; Version: 4.15
 ;; Keywords: languages
 
 ;; This file is part of GNU Emacs.
@@ -31,7 +31,7 @@
 ;; information is extracted automatically from the IDL documentation
 ;; and by talking to IDL.
 ;;
-;; Created by get_rinfo on Wed May 22 16:40:34 2002
+;; Created by get_rinfo on Tue Sep 10 09:15:48 2002
 ;; IDL version: 5.5
 ;; Number of files scanned:  6
 ;;       943 syntax entries in file refguide.txt
@@ -41,9 +41,9 @@
 ;;        45 syntax entries in file obsolete.txt
 ;;        38 syntax entries in file whatsnew55.txt
 ;; Number of routines found: 1324
-;; Number of keywords found: 5958
+;; Number of keywords found: 6129
 ;;
-;; Fixed up documentation with file: ./help55fixup.txt
+;; Fixed up documentation with file: help55fixup.txt
 ;;      93 total fix matches.
 ;
 ;; New versions of IDLWAVE, documentation, and more information
@@ -62,7 +62,7 @@
     ("BLAS_AXPY"              pro nil                 (system) "%s, Y, A, X [, D1, Loc1 [, D2, Range]]" nil)
     ("BOX_CURSOR"             pro nil                 (system) "%s, [ X0, Y0, NX, NY]" (("FIXED_SIZE") ("INIT") ("MESSAGE")))
     ("BREAKPOINT"             pro nil                 (system) "%s [, File], Index" (("AFTER") ("CLEAR") ("CONDITION") ("DISABLE") ("ENABLE") ("ON_RECOMPILE") ("ONCE") ("SET")))
-    ("BYTEORDER"              pro nil                 (system) "%s, Variable1, ..., Variablen" (("DTOGFLOAT") ("DTOVAX") ("DTOXDR") ("FTOVAX") ("FTOXDR") ("GFLOATTOD") ("HTONL") ("HTONS") ("L64SWAP") ("LSWAP") ("NTOHL") ("NTOHS") ("SSWAP") ("SWAP_IF_BIG_ENDIAN") ("SWAP_IF_LITTLE_ENDIAN") ("VAXTOD") ("VAXTOF") ("XDRTOD") ("XDRTOF")))
+    ("BYTEORDER"              pro nil                 (system) "%s, Variable1, ..., Variablen" (("DTOGFLOAT") ("DTOVAX") ("DTOXDR") ("FTOVAX") ("FTOXDR") ("GFLOATTOD") ("HTONL") ("HTONS") ("L64SWAP") ("LSWAP") ("NTOHL") ("NTOHS") ("SSWAP") ("SWAP_IF_BIG_ENDIAN") ("SWAP_IF_LITTLE_ENDIAN") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD") ("VAXTOD") ("VAXTOF") ("XDRTOD") ("XDRTOF")))
     ("CALDAT"                 pro nil                 (system) "%s, Julian, Month [, Day [, Year [, Hour [, Minute [, Second]]]]]" nil)
     ("CALENDAR"               pro nil                 (system) "%s [[, Month] , Year]" nil)
     ("CALL_METHOD"            pro nil                 (system) "%s, Name, ObjRef, [, P1, ..., Pn]" nil)
     ("TV"                     pro nil                 (system) "%s, Image [, Position] or TV, Image [, X, Y [, Channel]]" (("CENTIMETERS") ("CHANNEL") ("DATA") ("DEVICE") ("INCHES") ("NORMAL") ("ORDER") ("T3D") ("TRUE") ("WORDS") ("XSIZE") ("YSIZE") ("Z")))
     ("TVCRS"                  pro nil                 (system) "%s [, ON_OFF] or TVCRS [, X, Y]" (("CENTIMETERS") ("DATA") ("DEVICE") ("HIDE_CURSOR") ("INCHES") ("NORMAL") ("T3D") ("Z")))
     ("TVLCT"                  pro nil                 (system) "%s, V1, V2, V3 [, Start]" (("GET") ("HLS") ("HSV")))
-    ("TVSCL"                  pro nil                 (system) "%s, Image [, Position] or TVSCL, Image [, X, Y [, Channel]]" (("CENTIMETERS") ("CHANNEL") ("DATA") ("DEVICE") ("INCHES") ("NAN") ("NORMAL") ("ORDER") ("T3D") ("TOP") ("TRUE") ("WORDS") ("XSIZE") ("YSIZE") ("Z")))
+    ("TVSCL"                  pro nil                 (system) "%s, Image [, Position] or TVSCL, Image [, X, Y [, Channel]]" (("CENTIMETERS") ("CHANNEL") ("DATA") ("DEVICE") ("INCHES") ("NAN") ("NORMAL") ("ORDER") ("T3D") ("TOP") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD") ("TRUE") ("WORDS") ("XSIZE") ("YSIZE") ("Z")))
     ("USERSYM"                pro nil                 (system) "%s, X [, Y]" (("COLOR") ("FILL") ("THICK")))
     ("VECTOR_FIELD"           pro nil                 (system) "%s, Field, Outverts, Outconn" (("ANISOTROPY") ("SCALE") ("VERTICES")))
     ("VEL"                    pro nil                 (system) "%s, U, V" (("LENGTH") ("NSTEPS") ("NVECS") ("TITLE") ("XMAX")))
     ("ZOOM"                   pro nil                 (system) "%s" (("CONTINUOUS") ("FACT") ("INTERP") ("KEEP") ("NEW_WINDOW") ("XSIZE") ("YSIZE") ("ZOOM_WINDOW")))
     ("ZOOM_24"                pro nil                 (system) "%s" (("FACT") ("RIGHT") ("XSIZE") ("YSIZE")))
     ("A_CORRELATE"            fun nil                 (system) "Result = %s(X, Lag)" (("COVARIANCE") ("DOUBLE")))
-    ("ABS"                    fun nil                 (system) "Result = %s(X)" nil)
-    ("ACOS"                   fun nil                 (system) "Result = %s(X)" nil)
+    ("ABS"                    fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("ACOS"                   fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("ADAPT_HIST_EQUAL"       fun nil                 (system) "Result = %s (Image)" (("CLIP") ("FCN") ("NREGIONS") ("TOP")))
-    ("ALOG"                   fun nil                 (system) "Result = %s(X)" nil)
-    ("ALOG10"                 fun nil                 (system) "Result = %s(X)" nil)
+    ("ALOG"                   fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("ALOG10"                 fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("AMOEBA"                 fun nil                 (system) "Result = %s( Ftol)" (("FUNCTION_NAME") ("FUNCTION_VALUE") ("NCALLS") ("NMAX") ("P0") ("SCALE") ("SIMPLEX")))
     ("ARG_PRESENT"            fun nil                 (system) "Result = %s(Variable)" nil)
     ("ARRAY_EQUAL"            fun nil                 (system) "Result = %s( Op1 , Op2)" (("NO_TYPECONV")))
     ("ASCII_TEMPLATE"         fun nil                 (system) "Result = %s( [Filename])" (("BROWSE_LINES") ("CANCEL") ("GROUP")))
-    ("ASIN"                   fun nil                 (system) "Result = %s(X)" nil)
+    ("ASIN"                   fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("ASSOC"                  fun nil                 (system) "Result = %s( Unit, Array_Structure [, Offset])" (("PACKED")))
-    ("ATAN"                   fun nil                 (system) "Result = %s([Y,] X)" nil)
+    ("ATAN"                   fun nil                 (system) "Result = %s([Y,] X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("BESELI"                 fun nil                 (system) "Result = %s(X, N)" nil)
     ("BESELJ"                 fun nil                 (system) "Result = %s(X, N)" nil)
     ("BESELK"                 fun nil                 (system) "Result = %s( X, N )" nil)
     ("BILINEAR"               fun nil                 (system) "Result = %s(P, IX, JY)" nil)
     ("BIN_DATE"               fun nil                 (system) "Result = %s(Ascii_Time)" nil)
     ("BINARY_TEMPLATE"        fun nil                 (system) "Template = %s ( [Filename])" (("CANCEL") ("GROUP") ("N_ROWS") ("TEMPLATE")))
-    ("BINDGEN"                fun nil                 (system) "Result = %s(D1, ...,D8)" nil)
+    ("BINDGEN"                fun nil                 (system) "Result = %s(D1, ...,D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("BINOMIAL"               fun nil                 (system) "Result = %s(V, N, P)" (("DOUBLE") ("GAUSSIAN")))
     ("BLK_CON"                fun nil                 (system) "Result = %s( Filter, Signal)" (("B_LENGTH") ("DOUBLE")))
     ("BROYDEN"                fun nil                 (system) "Result = %s( X, Vecfunc)" (("CHECK") ("DOUBLE") ("EPS") ("ITMAX") ("STEPMAX") ("TOLF") ("TOLMIN") ("TOLX")))
     ("BYTARR"                 fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
-    ("BYTE"                   fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" nil)
-    ("BYTSCL"                 fun nil                 (system) "Result = %s( Array)" (("MAX") ("MIN") ("NAN") ("TOP")))
+    ("BYTE"                   fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("BYTSCL"                 fun nil                 (system) "Result = %s( Array)" (("MAX") ("MIN") ("NAN") ("TOP") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("C_CORRELATE"            fun nil                 (system) "Result = %s( X, Y, Lag)" (("COVARIANCE") ("DOUBLE")))
     ("CALL_EXTERNAL"          fun nil                 (system) "Result = %s(Image, Entry [, P0, ..., PN-1])" (("ALL_VALUE") ("AUTOGLUE") ("B_VALUE") ("CC") ("CDECL") ("COMPILE_DIRECTORY") ("D_VALUE") ("DEFAULT") ("EXTRA_CFLAGS") ("EXTRA_LFLAGS") ("F_VALUE") ("I_VALUE") ("IGNORE_EXISTING_GLUE") ("L64_VALUE") ("LD") ("NOCLEANUP") ("PORTABLE") ("RETURN_TYPE") ("S_VALUE") ("SHOW_ALL_OUTPUT") ("UI_VALUE") ("UL64_VALUE") ("UL_VALUE") ("UNLOAD") ("VALUE") ("VAX_FLOAT") ("VERBOSE") ("WRITE_WRAPPER")))
     ("CALL_FUNCTION"          fun nil                 (system) "Result = %s(Name [, P1, ..., Pn])" nil)
     ("CDF_VARCREATE"          fun nil                 (system) "Result = %s( Id, Name [, DimVary])" (("ALLOCATERECS") ("CDF_BYTE") ("CDF_CHAR") ("CDF_DOUBLE") ("CDF_EPOCH") ("CDF_FLOAT") ("CDF_INT1") ("CDF_INT2") ("CDF_INT4") ("CDF_REAL4") ("CDF_REAL8") ("CDF_UCHAR") ("CDF_UINT1") ("CDF_UINT2") ("CDF_UINT4") ("DIMENSIONS") ("NUMELEM") ("REC_NOVARY") ("REC_VARY") ("ZVARIABLE")))
     ("CDF_VARINQ"             fun nil                 (system) "Result = %s( Id, Variable)" (("ZVARIABLE")))
     ("CDF_VARNUM"             fun nil                 (system) "Result = %s( Id, VarName [, IsZVar] )" nil)
-    ("CEIL"                   fun nil                 (system) "Result = %s(X)" (("L64")))
+    ("CEIL"                   fun nil                 (system) "Result = %s(X)" (("L64") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("CHEBYSHEV"              fun nil                 (system) "Result = %s(D, N)" nil)
     ("CHECK_MATH"             fun nil                 (system) "Result = %s()" (("MASK") ("NOCLEAR") ("PRINT")))
     ("CHISQR_CVF"             fun nil                 (system) "Result = %s(P, Df)" nil)
     ("CHISQR_PDF"             fun nil                 (system) "Result = %s(V, Df)" nil)
     ("CHOLSOL"                fun nil                 (system) "Result = %s( A, P, B)" (("DOUBLE")))
-    ("CINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
+    ("CINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("CLUST_WTS"              fun nil                 (system) "Result = %s( Array)" (("DOUBLE") ("N_CLUSTERS") ("N_ITERATIONS") ("VARIABLE_WTS")))
     ("CLUSTER"                fun nil                 (system) "Result = %s( Array, Weights)" (("DOUBLE") ("N_CLUSTERS")))
     ("COLOR_QUAN"             fun nil                 (system) "Result = %s( Image_R, Image_G, Image_B, R, G, B) or Result = COLOR_QUAN( Image, Dim, R, G, B )" (("COLORS") ("CUBE") ("DITHER") ("ERROR") ("GET_TRANSLATION") ("MAP_ALL") ("TRANSLATION")))
     ("COLORMAP_APPLICABLE"    fun nil                 (system) "Result = %s( redrawRequired )" nil)
     ("COMFIT"                 fun nil                 (system) "Result = %s( X, Y, A)" (("EXPONENTIAL") ("GEOMETRIC") ("GOMPERTZ") ("HYPERBOLIC") ("LOGISTIC") ("LOGSQUARE") ("SIGMA") ("WEIGHTS") ("YFIT")))
-    ("COMPLEX"                fun nil                 (system) "Result = %s( Real [, Imaginary] ) or Result = COMPLEX(Expression, Offset, Dim1 [, ..., Dim8])" (("DOUBLE")))
+    ("COMPLEX"                fun nil                 (system) "Result = %s( Real [, Imaginary] ) or Result = COMPLEX(Expression, Offset, Dim1 [, ..., Dim8])" (("DOUBLE") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("COMPLEXARR"             fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("COMPLEXROUND"           fun nil                 (system) "Result = %s(Input)" nil)
     ("COMPUTE_MESH_NORMALS"   fun nil                 (system) "Result = %s( fVerts[, iConn] )" nil)
     ("COND"                   fun nil                 (system) "Result = %s( A)" (("DOUBLE") ("LNORM")))
     ("CONGRID"                fun nil                 (system) "Result = %s( Array, X, Y, Z)" (("CENTER") ("CUBIC") ("INTERP") ("MINUS_ONE")))
-    ("CONJ"                   fun nil                 (system) "Result = %s(X)" nil)
+    ("CONJ"                   fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("CONVERT_COORD"          fun nil                 (system) "Result = %s( X [, Y [, Z]])" (("DATA") ("DEVICE") ("DOUBLE") ("NORMAL") ("T3D") ("TO_DATA") ("TO_DEVICE") ("TO_NORMAL")))
-    ("CONVOL"                 fun nil                 (system) "Result = %s( Array, Kernel [, Scale_Factor])" (("CENTER") ("EDGE_TRUNCATE") ("EDGE_WRAP") ("MISSING") ("NAN")))
+    ("CONVOL"                 fun nil                 (system) "Result = %s( Array, Kernel [, Scale_Factor])" (("CENTER") ("EDGE_TRUNCATE") ("EDGE_WRAP") ("MISSING") ("NAN") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("COORD2TO3"              fun nil                 (system) "Result = %s( Mx, My, Dim, D0 [, PTI] )" nil)
     ("CORRELATE"              fun nil                 (system) "Result = %s( X [, Y])" (("COVARIANCE") ("DOUBLE")))
-    ("COS"                    fun nil                 (system) "Result = %s(X)" nil)
+    ("COS"                    fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("COSH"                   fun nil                 (system) "Result = %s(X)" nil)
     ("CRAMER"                 fun nil                 (system) "Result = %s( A, B)" (("DOUBLE") ("ZERO")))
     ("CREATE_STRUCT"          fun nil                 (system) "Result = %s( [Tag1, Value1, ..., Tagn, Valuen] ) or Result = CREATE_STRUCT()" (("NAME")))
     ("CW_TMPL"                fun nil                 (system) "Result = %s( Parent)" (("UNAME") ("UVALUE")))
     ("CW_ZOOM"                fun nil                 (system) "Result = %s( Parent)" (("FRAME") ("MAX") ("MIN") ("RETAIN") ("SAMPLE") ("SCALE") ("TRACK") ("UNAME") ("UVALUE") ("X_SCROLL_SIZE") ("X_ZSIZE") ("XSIZE") ("Y_SCROLL_SIZE") ("Y_ZSIZE") ("YSIZE")))
     ("DBLARR"                 fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
-    ("DCINDGEN"               fun nil                 (system) "Result = %s( D1, ..., D8 )" nil)
-    ("DCOMPLEX"               fun nil                 (system) "Result = %s( Real [, Imaginary] ) or Result = DCOMPLEX( Expression, Offset, Dim1 [, ..., Dim8] )" nil)
+    ("DCINDGEN"               fun nil                 (system) "Result = %s( D1, ..., D8 )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("DCOMPLEX"               fun nil                 (system) "Result = %s( Real [, Imaginary] ) or Result = DCOMPLEX( Expression, Offset, Dim1 [, ..., Dim8] )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("DCOMPLEXARR"            fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("DEFROI"                 fun nil                 (system) "Result = %s( Sx, Sy [, Xverts, Yverts])" (("NOFILL") ("NOREGION") ("RESTORE") ("X0") ("Y0") ("ZOOM")))
     ("DEMO_MODE"              fun nil                 (system) "Result = %s()" nil)
     ("DIALOG_WRITE_IMAGE"     fun nil                 (system) "Result = %s ( Image [, R, G, B])" (("DIALOG_PARENT") ("FILE") ("FIX_TYPE") ("NOWRITE") ("OPTIONS") ("PATH") ("TITLE") ("TYPE") ("WARN_EXIST")))
     ("DIGITAL_FILTER"         fun nil                 (system) "Result = %s( Flow, Fhigh, A, Nterms )" nil)
     ("DILATE"                 fun nil                 (system) "Result = %s( Image, Structure [, X0 [, Y0 [, Z0]]])" (("BACKGROUND") ("CONSTRAINED") ("GRAY") ("PRESERVE_TYPE") ("UINT") ("ULONG") ("VALUES")))
-    ("DINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
+    ("DINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("DIST"                   fun nil                 (system) "Result = %s(N [, M])" nil)
-    ("DOUBLE"                 fun nil                 (system) "Result = %s(Expression[, Offset [, Dim1, ..., Dimn]])" nil)
+    ("DOUBLE"                 fun nil                 (system) "Result = %s(Expression[, Offset [, Dim1, ..., Dimn]])" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("EIGENQL"                fun nil                 (system) "Result = %s( A)" (("ABSOLUTE") ("ASCENDING") ("DOUBLE") ("EIGENVECTORS") ("OVERWRITE") ("RESIDUAL")))
     ("EIGENVEC"               fun nil                 (system) "Result = %s( A, Eval)" (("DOUBLE") ("ITMAX") ("RESIDUAL")))
     ("ELMHES"                 fun nil                 (system) "Result = %s( A)" (("COLUMN") ("DOUBLE") ("NO_BALANCE")))
     ("ERFC"                   fun nil                 (system) "Result = %s(X)" nil)
     ("ERFCX"                  fun nil                 (system) "Result = %s(X)" nil)
     ("ERODE"                  fun nil                 (system) "Result = %s( Image, Structure [, X0 [, Y0 [, Z0]]])" (("GRAY") ("PRESERVE_TYPE") ("UINT") ("ULONG") ("VALUES")))
-    ("ERRORF"                 fun nil                 (system) "Result = %s(X)" nil)
+    ("ERRORF"                 fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("EXECUTE"                fun nil                 (system) "Result = %s(String [, QuietCompile])" nil)
-    ("EXP"                    fun nil                 (system) "Result = %s(Expression)" nil)
+    ("EXP"                    fun nil                 (system) "Result = %s(Expression)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("EXPAND_PATH"            fun nil                 (system) "Result = %s( String)" (("ALL_DIRS") ("ARRAY") ("COUNT") ("DLM") ("HELP")))
-    ("EXPINT"                 fun nil                 (system) "Result = %s( N, X)" (("DOUBLE") ("EPS") ("ITMAX")))
+    ("EXPINT"                 fun nil                 (system) "Result = %s( N, X)" (("DOUBLE") ("EPS") ("ITMAX") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("EXTRAC"                 fun nil                 (system) "Result = %s( Array, C1, C2, ..., Cn, S1, S2, ..., Sn )" nil)
     ("EXTRACT_SLICE"          fun nil                 (system) "Result = %s( Vol, Xsize, Ysize, Xcenter, Ycenter, Zcenter, Xrot, Yrot, Zrot)" (("ANISOTROPY") ("CUBIC") ("OUT_VAL") ("RADIANS") ("SAMPLE") ("VERTICES")))
     ("F_CVF"                  fun nil                 (system) "Result = %s(P, Dfn, Dfd)" nil)
     ("F_PDF"                  fun nil                 (system) "Result = %s(V, Dfn, Dfd)" nil)
     ("FACTORIAL"              fun nil                 (system) "Result = %s( N)" (("STIRLING") ("UL64")))
-    ("FFT"                    fun nil                 (system) "Result = %s( Array [, Direction])" (("DIMENSION") ("DOUBLE") ("INVERSE") ("OVERWRITE")))
+    ("FFT"                    fun nil                 (system) "Result = %s( Array [, Direction])" (("DIMENSION") ("DOUBLE") ("INVERSE") ("OVERWRITE") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("FILE_EXPAND_PATH"       fun nil                 (system) "Result = %s (Path)" nil)
     ("FILE_INFO"              fun nil                 (system) "Result = %s(Path)" (("NOEXPAND_PATH")))
     ("FILE_SEARCH"            fun nil                 (system) "Result = %s(Path_Specification) or for recursive searching, Result = FILE_SEARCH(Dir_Specification, Recur_Pattern)" (("COUNT") ("EXPAND_ENVIRONMENT") ("EXPAND_TILDE") ("FOLD_CASE") ("FULLY_QUALIFY_PATH") ("ISSUE_ACCESS_ERROR") ("MARK_DIRECTORY") ("MATCH_ALL_INITIAL_DOT") ("MATCH_INITIAL_DOT") ("NOSORT") ("QUOTE") ("TEST_BLOCK_SPECIAL") ("TEST_CHARACTER_SPECIAL") ("TEST_DANGLING_SYMLINK") ("TEST_DIRECTORY") ("TEST_EXECUTABLE") ("TEST_GROUP") ("TEST_NAMED_PIPE") ("TEST_READ") ("TEST_REGULAR") ("TEST_SETGID") ("TEST_SETUID") ("TEST_SOCKET") ("TEST_STICKY_BIT") ("TEST_SYMLINK") ("TEST_USER") ("TEST_WRITE") ("TEST_ZERO_LENGTH")))
     ("FILE_WHICH"             fun nil                 (system) "Result = %s( [Path, ] File)" (("INCLUDE_CURRENT_DIR")))
     ("FILEPATH"               fun nil                 (system) "Result = %s( Filename)" (("ROOT_DIR") ("SUBDIRECTORY") ("TERMINAL") ("TMP")))
     ("FINDFILE"               fun nil                 (system) "Result = %s( File_Specification)" (("COUNT")))
-    ("FINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
-    ("FINITE"                 fun nil                 (system) "Result = %s( X)" (("INFINITY") ("NAN") ("SIGN")))
-    ("FIX"                    fun nil                 (system) "Result = %s( Expression [, Offset [, Dim1, ..., Dim8]])" (("PRINT") ("TYPE")))
-    ("FLOAT"                  fun nil                 (system) "Result = %s( Expression [, Offset [, Dim1, ..., Dim8]] )" nil)
-    ("FLOOR"                  fun nil                 (system) "Result = %s(X)" (("L64")))
+    ("FINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("FINITE"                 fun nil                 (system) "Result = %s( X)" (("INFINITY") ("NAN") ("SIGN") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("FIX"                    fun nil                 (system) "Result = %s( Expression [, Offset [, Dim1, ..., Dim8]])" (("PRINT") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD") ("TYPE")))
+    ("FLOAT"                  fun nil                 (system) "Result = %s( Expression [, Offset [, Dim1, ..., Dim8]] )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("FLOOR"                  fun nil                 (system) "Result = %s(X)" (("L64") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("FLTARR"                 fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("FORMAT_AXIS_VALUES"     fun nil                 (system) "Result = %s( Values )" nil)
     ("FSTAT"                  fun nil                 (system) "Result = %s(Unit)" nil)
     ("FV_TEST"                fun nil                 (system) "Result = %s(X, Y)" nil)
     ("FX_ROOT"                fun nil                 (system) "Result = %s(X, Func)" (("DOUBLE") ("ITMAX") ("STOP") ("TOL")))
     ("FZ_ROOTS"               fun nil                 (system) "Result = %s(C)" (("DOUBLE") ("EPS") ("NO_POLISH")))
-    ("GAMMA"                  fun nil                 (system) "Result = %s(X)" nil)
+    ("GAMMA"                  fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("GAUSS2DFIT"             fun nil                 (system) "Result = %s( Z, A [, X, Y])" (("NEGATIVE") ("TILT")))
     ("GAUSS_CVF"              fun nil                 (system) "Result = %s(P)" nil)
     ("GAUSS_PDF"              fun nil                 (system) "Result = %s(V)" nil)
     ("IBETA"                  fun nil                 (system) "Result = %s( A, B, X)" (("DOUBLE") ("EPS") ("ITER") ("ITMAX")))
     ("IDENTITY"               fun nil                 (system) "Result = %s( N)" (("DOUBLE")))
     ("IGAMMA"                 fun nil                 (system) "Result = %s( A, X)" (("DOUBLE") ("EPS") ("ITER") ("ITMAX") ("METHOD")))
-    ("IMAGINARY"              fun nil                 (system) "Result = %s(Complex_Expression)" nil)
-    ("INDGEN"                 fun nil                 (system) "Result = %s(D1, ..., D8)" (("BYTE") ("COMPLEX") ("DCOMPLEX") ("DOUBLE") ("FLOAT") ("L64") ("LONG") ("STRING") ("TYPE") ("UINT") ("UL64") ("ULONG")))
+    ("IMAGINARY"              fun nil                 (system) "Result = %s(Complex_Expression)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("INDGEN"                 fun nil                 (system) "Result = %s(D1, ..., D8)" (("BYTE") ("COMPLEX") ("DCOMPLEX") ("DOUBLE") ("FLOAT") ("L64") ("LONG") ("STRING") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD") ("TYPE") ("UINT") ("UL64") ("ULONG")))
     ("INT_2D"                 fun nil                 (system) "Result = %s( Fxy, AB_Limits, PQ_Limits, Pts)" (("DOUBLE") ("ORDER")))
     ("INT_3D"                 fun nil                 (system) "Result = %s( Fxyz, AB_Limits, PQ_Limits, UV_Limits, Pts)" (("DOUBLE")))
     ("INT_TABULATED"          fun nil                 (system) "Result = %s( X, F)" (("DOUBLE") ("SORT")))
     ("INTARR"                 fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("INTERPOL"               fun nil                 (system) "Result = %s( V, N) or Result = INTERPOL( V, X, U)" (("LSQUADRATIC") ("QUADRATIC") ("SPLINE")))
-    ("INTERPOLATE"            fun nil                 (system) "Result = %s( P, X [, Y [, Z]])" (("CUBIC") ("GRID") ("MISSING")))
+    ("INTERPOLATE"            fun nil                 (system) "Result = %s( P, X [, Y [, Z]])" (("CUBIC") ("GRID") ("MISSING") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("INVERT"                 fun nil                 (system) "Result = %s( Array [, Status])" (("DOUBLE")))
     ("IOCTL"                  fun nil                 (system) "Result = %s( File_Unit [, Request, Arg])" (("BY_VALUE") ("MT_OFFLINE") ("MT_REWIND") ("MT_SKIP_FILE") ("MT_SKIP_RECORD") ("MT_WEOF") ("SUPPRESS_ERROR")))
-    ("ISHFT"                  fun nil                 (system) "Result = %s(P1, P2)" nil)
+    ("ISHFT"                  fun nil                 (system) "Result = %s(P1, P2)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("JULDAY"                 fun nil                 (system) "Result = %s(Month, Day, Year, Hour, Minute, Second)" nil)
     ("KEYWORD_SET"            fun nil                 (system) "Result = %s(Expression)" nil)
     ("KRIG2D"                 fun nil                 (system) "Result = %s( Z [, X, Y])" (("BOUNDS") ("EXPONENTIAL") ("GS") ("NX") ("NY") ("REGULAR") ("SPHERICAL") ("XGRID") ("XVALUES") ("YGRID") ("YVALUES")))
     ("KURTOSIS"               fun nil                 (system) "Result = %s(X)" (("DOUBLE") ("NAN")))
     ("KW_TEST"                fun nil                 (system) "Result = %s( X)" (("DF") ("MISSING")))
-    ("L64INDGEN"              fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
+    ("L64INDGEN"              fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("LABEL_DATE"             fun nil                 (system) "Result = %s()" (("AM_PM") ("DATE_FORMAT") ("DAYS_OF_WEEK") ("MONTHS") ("OFFSET") ("ROUND_UP") ("XTICKFORMAT")))
     ("LABEL_REGION"           fun nil                 (system) "Result = %s( Data)" (("ALL_NEIGHBORS") ("ULONG")))
     ("LADFIT"                 fun nil                 (system) "Result = %s( X, Y)" (("ABSDEV") ("DOUBLE")))
     ("LEEFILT"                fun nil                 (system) "Result = %s( A [, N [, Sig]])" (("DOUBLE") ("EXACT")))
     ("LEGENDRE"               fun nil                 (system) "Result = %s( X, L [, M])" (("DOUBLE")))
     ("LINBCG"                 fun nil                 (system) "Result = %s( A, B, X)" (("DOUBLE") ("ITER") ("ITMAX") ("ITOL") ("TOL")))
-    ("LINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
+    ("LINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("LINFIT"                 fun nil                 (system) "Result = %s( X, Y)" (("CHISQ") ("COVAR") ("DOUBLE") ("MEASURE_ERRORS") ("PROB") ("SIGMA") ("YFIT")))
     ("LIVE_STYLE"             fun nil                 (system) "Style = %s ({ 'contour' | 'image' | 'plot' | 'surface'})" (("BASE_STYLE") ("COLORBAR_PROPERTIES") ("ERROR") ("GRAPHIC_PROPERTIES") ("GROUP") ("LEGEND_PROPERTIES") ("NAME") ("SAVE") ("TEMPLATE_FILE") ("VISUALIZATION_PROPERTIES") ("XAXIS_PROPERTIES") ("YAXIS_PROPERTIES") ("ZAXIS_PROPERTIES")))
     ("LL_ARC_DISTANCE"        fun nil                 (system) "Result = %s( Lon_lat0, Arc_Dist, Az)" (("DEGREES")))
     ("LMFIT"                  fun nil                 (system) "Result = %s( X, Y, A)" (("ALPHA") ("CHISQ") ("CONVERGENCE") ("COVAR") ("DOUBLE") ("FITA") ("FUNCTION_NAME") ("ITER") ("ITMAX") ("ITMIN") ("MEASURE_ERRORS") ("SIGMA") ("TOL")))
     ("LMGR"                   fun nil                 (system) "Result = %s()" (("CLIENTSERVER") ("DEMO") ("EMBEDDED") ("EXPIRE_DATE") ("FORCE_DEMO") ("INSTALL_NUM") ("LMHOSTID") ("RUNTIME") ("SITE_NOTICE") ("STUDENT") ("TRIAL")))
-    ("LNGAMMA"                fun nil                 (system) "Result = %s(X)" nil)
+    ("LNGAMMA"                fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("LNP_TEST"               fun nil                 (system) "Result = %s( X, Y)" (("DOUBLE") ("HIFAC") ("JMAX") ("OFAC") ("WK1") ("WK2")))
     ("LOCALE_GET"             fun nil                 (system) "Result = %s( )" nil)
     ("LON64ARR"               fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("LONARR"                 fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("LONG"                   fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" nil)
-    ("LONG64"                 fun nil                 (system) "Result = %s( Expression[, Offset [, D1, ..., D8]] )" nil)
+    ("LONG64"                 fun nil                 (system) "Result = %s( Expression[, Offset [, D1, ..., D8]] )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("LSODE"                  fun nil                 (system) "Result = %s( Y, X, H, Derivs[, Status])" (("ATOL") ("RTOL")))
     ("LU_COMPLEX"             fun nil                 (system) "Result = %s( A, B)" (("DOUBLE") ("INVERSE") ("SPARSE")))
     ("LUMPROVE"               fun nil                 (system) "Result = %s( A, Alud, Index, B, X)" (("COLUMN") ("DOUBLE")))
     ("MAP_IMAGE"              fun nil                 (system) "Result = %s( Image [, Startx, Starty [, Xsize, Ysize]])" (("BILINEAR") ("COMPRESS") ("LATMAX") ("LATMIN") ("LONMAX") ("LONMIN") ("MAX_VALUE") ("MIN_VALUE") ("MISSING") ("SCALE")))
     ("MAP_PATCH"              fun nil                 (system) "Result = %s( Image_Orig [, Lons, Lats])" (("LAT0") ("LAT1") ("LON0") ("LON1") ("MAX_VALUE") ("MISSING") ("TRIANGULATE") ("XSIZE") ("XSTART") ("YSIZE") ("YSTART")))
     ("MATRIX_MULTIPLY"        fun nil                 (system) "Result = %s( A, B)" (("ATRANSPOSE") ("BTRANSPOSE")))
-    ("MAX"                    fun nil                 (system) "Result = %s( Array [, Max_Subscript])" (("DIMENSION") ("MIN") ("NAN") ("SUBSCRIPT_MIN")))
+    ("MAX"                    fun nil                 (system) "Result = %s( Array [, Max_Subscript])" (("DIMENSION") ("MIN") ("NAN") ("SUBSCRIPT_MIN") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("MD_TEST"                fun nil                 (system) "Result = %s( X)" (("ABOVE") ("BELOW") ("MDC")))
     ("MEAN"                   fun nil                 (system) "Result = %s( X)" (("DOUBLE") ("NAN")))
     ("MEANABSDEV"             fun nil                 (system) "Result = %s( X)" (("DOUBLE") ("MEDIAN") ("NAN")))
     ("MESH_SURFACEAREA"       fun nil                 (system) "Result = %s ( Verts, Conn)" (("AUXDATA") ("MOMENT")))
     ("MESH_VALIDATE"          fun nil                 (system) "Result = %s ( Verts, Conn)" (("COMBINE_VERTICES") ("PACK_VERTICES") ("REMOVE_NAN") ("TOLERANCE")))
     ("MESH_VOLUME"            fun nil                 (system) "Result = %s ( Verts, Conn)" (("SIGNED")))
-    ("MIN"                    fun nil                 (system) "Result = %s( Array [, Min_Subscript])" (("DIMENSION") ("MAX") ("NAN") ("SUBSCRIPT_MAX")))
+    ("MIN"                    fun nil                 (system) "Result = %s( Array [, Min_Subscript])" (("DIMENSION") ("MAX") ("NAN") ("SUBSCRIPT_MAX") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("MIN_CURVE_SURF"         fun nil                 (system) "Result = %s(Z [, X, Y])" (("BOUNDS") ("CONST") ("DOUBLE") ("GS") ("NX") ("NY") ("REGULAR") ("SPHERE") ("TPS") ("XGRID") ("XOUT") ("XPOUT") ("XVALUES") ("YGRID") ("YOUT") ("YPOUT") ("YVALUES")))
     ("MOMENT"                 fun nil                 (system) "Result = %s( X)" (("DOUBLE") ("MDEV") ("NAN") ("SDEV")))
     ("MORPH_CLOSE"            fun nil                 (system) "Result = %s (Image, Structure)" (("GRAY") ("PRESERVE_TYPE") ("UINT") ("ULONG") ("VALUES")))
     ("PNT_LINE"               fun nil                 (system) "Result = %s( P0, L0, L1 [, Pl])" (("INTERVAL")))
     ("POLAR_SURFACE"          fun nil                 (system) "Result = %s( Z, R, Theta)" (("BOUNDS") ("GRID") ("MISSING") ("QUINTIC") ("SPACING")))
     ("POLY"                   fun nil                 (system) "Result = %s(X, C)" nil)
-    ("POLY_2D"                fun nil                 (system) "Result = %s( Array, P, Q [, Interp [, Dimx, Dimy]])" (("CUBIC") ("MISSING")))
+    ("POLY_2D"                fun nil                 (system) "Result = %s( Array, P, Q [, Interp [, Dimx, Dimy]])" (("CUBIC") ("MISSING") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("POLY_AREA"              fun nil                 (system) "Result = %s( X, Y)" (("DOUBLE") ("SIGNED")))
     ("POLY_FIT"               fun nil                 (system) "Result = %s( X, Y, Degree)" (("CHISQ") ("COVAR") ("DOUBLE") ("MEASURE_ERRORS") ("SIGMA") ("STATUS") ("YBAND") ("YERROR") ("YFIT")))
     ("POLYFILLV"              fun nil                 (system) "Result = %s( X, Y, Sx, Sy [, Run_Length] )" nil)
     ("REFORM"                 fun nil                 (system) "Result = %s( Array, D1, ..., D8)" (("OVERWRITE")))
     ("REGION_GROW"            fun nil                 (system) "Result = %s(Array, ROIPixels)" (("ALL_NEIGHBORS") ("STDDEV_MULTIPLIER") ("THRESHOLD")))
     ("REGRESS"                fun nil                 (system) "Result = %s( X, Y)" (("CHISQ") ("CONST") ("CORRELATION") ("DOUBLE") ("FTEST") ("MCORRELATION") ("MEASURE_ERRORS") ("SIGMA") ("STATUS") ("YFIT")))
-    ("REPLICATE"              fun nil                 (system) "Result = %s( Value, D1 [, ..., D8] )" nil)
+    ("REPLICATE"              fun nil                 (system) "Result = %s( Value, D1 [, ..., D8] )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("REVERSE"                fun nil                 (system) "Result = %s( Array [, Subscript_Index])" (("OVERWRITE")))
     ("RK4"                    fun nil                 (system) "Result = %s( Y, Dydx, X, H, Derivs)" (("DOUBLE")))
     ("ROBERTS"                fun nil                 (system) "Result = %s(Image)" nil)
     ("ROT"                    fun nil                 (system) "Result = %s( A, Angle, [Mag, X0, Y0])" (("CUBIC") ("INTERP") ("MISSING") ("PIVOT")))
     ("ROTATE"                 fun nil                 (system) "Result = %s(Array, Direction)" nil)
-    ("ROUND"                  fun nil                 (system) "Result = %s(X)" (("L64")))
+    ("ROUND"                  fun nil                 (system) "Result = %s(X)" (("L64") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("ROUTINE_INFO"           fun nil                 (system) "Result = %s( [Routine])" (("DISABLED") ("ENABLED") ("FUNCTIONS") ("PARAMETERS") ("SOURCE") ("SYSTEM") ("UNRESOLVED") ("VARIABLES")))
     ("RS_TEST"                fun nil                 (system) "Result = %s( X, Y)" (("UX") ("UY")))
     ("RSTRPOS"                fun nil                 (system) "Result = %s( Expression, Search_String [, Pos] )" nil)
     ("SFIT"                   fun nil                 (system) "Result = %s( Data, Degree)" (("KX")))
     ("SHIFT"                  fun nil                 (system) "Result = %s(Array, S1, ..., Sn)" nil)
     ("SIMPLEX"                fun nil                 (system) "Result = %s( Zequation, Constraints, M1, M2, M3 [, Tableau [, Izrov [, Iposv]]])" (("DOUBLE") ("EPS") ("STATUS")))
-    ("SIN"                    fun nil                 (system) "Result = %s(X)" nil)
+    ("SIN"                    fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("SINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
-    ("SINH"                   fun nil                 (system) "Result = %s(X)" nil)
+    ("SINH"                   fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("SIZE"                   fun nil                 (system) "Result = %s( Expression)" (("DIMENSIONS") ("FILE_LUN") ("L64") ("N_DIMENSIONS") ("N_ELEMENTS") ("STRUCTURE") ("TNAME") ("TYPE")))
     ("SKEWNESS"               fun nil                 (system) "Result = %s( X)" (("DOUBLE") ("NAN")))
     ("SMOOTH"                 fun nil                 (system) "Result = %s( Array, Width)" (("EDGE_TRUNCATE") ("MISSING") ("NAN")))
     ("SPRSAX"                 fun nil                 (system) "Result = %s( A, X)" (("DOUBLE")))
     ("SPRSIN"                 fun nil                 (system) "Result = %s( A)" (("COLUMN") ("DOUBLE") ("THRESHOLD")))
     ("SPRSTP"                 fun nil                 (system) "Result = %s(A)" nil)
-    ("SQRT"                   fun nil                 (system) "Result = %s(X)" nil)
+    ("SQRT"                   fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("STANDARDIZE"            fun nil                 (system) "Result = %s( A)" (("DOUBLE")))
     ("STDDEV"                 fun nil                 (system) "Result = %s( X)" (("DOUBLE") ("NAN")))
     ("STR_SEP"                fun nil                 (system) "Result = %s( Str, Separator)" (("ESC") ("REMOVE_ALL") ("TRIM")))
     ("T_CVF"                  fun nil                 (system) "Result = %s(P, Df)" nil)
     ("T_PDF"                  fun nil                 (system) "Result = %s(V, Df)" nil)
     ("TAG_NAMES"              fun nil                 (system) "Result = %s( Expression)" (("STRUCTURE_NAME")))
-    ("TAN"                    fun nil                 (system) "Result = %s(X)" nil)
-    ("TANH"                   fun nil                 (system) "Result = %s(X)" nil)
+    ("TAN"                    fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("TANH"                   fun nil                 (system) "Result = %s(X)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("TEMPORARY"              fun nil                 (system) "Result = %s(Variable)" nil)
     ("TETRA_CLIP"             fun nil                 (system) "Result = %s ( Plane, Vertsin, Connin, Vertsout, Connout)" (("AUXDATA_IN") ("AUXDATA_OUT") ("CUT_VERTS")))
     ("TETRA_SURFACE"          fun nil                 (system) "Result = %s (Verts, Connin)" nil)
     ("TIFF_READ"              fun nil                 (system) "Result = %s(File [, R, G, B])" nil)
     ("TIMEGEN"                fun nil                 (system) "Result = %s( [D1,...,D8])" (("DAYS") ("FINAL") ("HOURS") ("MINUTES") ("MONTHS") ("SECONDS") ("START") ("STEP_SIZE") ("UNITS") ("YEAR")))
     ("TM_TEST"                fun nil                 (system) "Result = %s( X, Y)" (("PAIRED") ("UNEQUAL")))
-    ("TOTAL"                  fun nil                 (system) "Result = %s( Array [, Dimension])" (("CUMULATIVE") ("DOUBLE") ("NAN")))
+    ("TOTAL"                  fun nil                 (system) "Result = %s( Array [, Dimension])" (("CUMULATIVE") ("DOUBLE") ("NAN") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("TRACE"                  fun nil                 (system) "Result = %s( A)" (("DOUBLE")))
     ("TRANSPOSE"              fun nil                 (system) "Result = %s( Array [, P] )" nil)
     ("TRI_SURF"               fun nil                 (system) "Result = %s( Z [, X, Y])" (("BOUNDS") ("EXTRAPOLATE") ("GS") ("MISSING") ("NX") ("NY") ("REGULAR") ("XGRID") ("XVALUES") ("YGRID") ("YVALUES")))
     ("TS_FCAST"               fun nil                 (system) "Result = %s( X, P, Nvalues)" (("BACKCAST") ("DOUBLE")))
     ("TS_SMOOTH"              fun nil                 (system) "Result = %s( X, Nvalues)" (("BACKWARD") ("DOUBLE") ("FORWARD") ("ORDER")))
     ("TVRD"                   fun nil                 (system) "Result = %s( [X0 [, Y0 [, Nx [, Ny [, Channel]]]]])" (("CHANNEL") ("ORDER") ("TRUE") ("WORDS")))
-    ("UINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
-    ("UINT"                   fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" nil)
+    ("UINDGEN"                fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("UINT"                   fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("UINTARR"                fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
-    ("UL64INDGEN"             fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
-    ("ULINDGEN"               fun nil                 (system) "Result = %s(D1, ..., D8)" nil)
+    ("UL64INDGEN"             fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
+    ("ULINDGEN"               fun nil                 (system) "Result = %s(D1, ..., D8)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("ULON64ARR"              fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("ULONARR"                fun nil                 (system) "Result = %s( D1, ..., D8)" (("NOZERO")))
     ("ULONG"                  fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" nil)
-    ("ULONG64"                fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" nil)
+    ("ULONG64"                fun nil                 (system) "Result = %s( Expression[, Offset [, Dim1, ..., Dim8]] )" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("UNIQ"                   fun nil                 (system) "Result = %s( Array [, Index] )" nil)
     ("VALUE_LOCATE"           fun nil                 (system) "Result = %s ( Vector, Value)" (("L64")))
     ("VARIANCE"               fun nil                 (system) "Result = %s( X)" (("DOUBLE") ("NAN")))
     ("VAX_FLOAT"              fun nil                 (system) "Result = %s( [Default])" (("FILE_UNIT")))
     ("VERT_T3D"               fun nil                 (system) "Result = %s( Vertex_List)" (("MATRIX") ("NO_COPY") ("NO_DIVIDE") ("SAVE_DIVIDE")))
-    ("VOIGT"                  fun nil                 (system) "Result = %s(A, U)" nil)
+    ("VOIGT"                  fun nil                 (system) "Result = %s(A, U)" (("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("VOXEL_PROJ"             fun nil                 (system) "Result = %s( V [, RGBO])" (("BACKGROUND") ("CUTTING_PLANE") ("INTERPOLATE") ("MAXIMUM_INTENSITY") ("STEP") ("XSIZE") ("YSIZE") ("ZBUFFER") ("ZPIXELS")))
     ("WARP_TRI"               fun nil                 (system) "Result = %s( Xo, Yo, Xi, Yi, Image)" (("EXTRAPOLATE") ("OUTPUT_SIZE") ("QUINTIC") ("TPS")))
     ("WATERSHED"              fun nil                 (system) "Result = %s ( Image)" (("CONNECTIVITY")))
-    ("WHERE"                  fun nil                 (system) "Result = %s( Array_Expression [, Count])" (("COMPLEMENT") ("L64") ("NCOMPLEMENT")))
+    ("WHERE"                  fun nil                 (system) "Result = %s( Array_Expression [, Count])" (("COMPLEMENT") ("L64") ("NCOMPLEMENT") ("TPOOL_MAX_ELTS") ("TPOOL_MIN_ELTS") ("TPOOL_NOTHREAD")))
     ("WIDGET_ACTIVEX"         fun nil                 (system) "Result = %s( Parent, COM_ID)" (("ALIGN_BOTTOM") ("ALIGN_CENTER") ("ALIGN_LEFT") ("ALIGN_RIGHT") ("ALIGN_TOP") ("EVENT_FUNC") ("EVENT_PRO") ("FUNC_GET_VALUE") ("ID_TYPE") ("KILL_NOTIFY") ("NO_COPY") ("NOTIFY_REALIZE") ("PRO_SET_VALUE") ("SCR_XSIZE") ("SCR_YSIZE") ("SENSITIVE") ("UNAME") ("UNITS") ("UVALUE") ("XOFFSET") ("XSIZE") ("YOFFSET") ("YSIZE")))
     ("WIDGET_BASE"            fun nil                 (system) "Result = %s( [Parent])" (("ALIGN_BOTTOM") ("ALIGN_CENTER") ("ALIGN_LEFT") ("ALIGN_RIGHT") ("ALIGN_TOP") ("APP_MBAR") ("BASE_ALIGN_BOTTOM") ("BASE_ALIGN_CENTER") ("BASE_ALIGN_LEFT") ("BASE_ALIGN_RIGHT") ("BASE_ALIGN_TOP") ("COLUMN") ("CONTEXT_MENU") ("DISPLAY_NAME") ("EVENT_FUNC") ("EVENT_PRO") ("EXCLUSIVE") ("FLOATING") ("FRAME") ("FUNC_GET_VALUE") ("GRID_LAYOUT") ("GROUP_LEADER") ("KBRD_FOCUS_EVENTS") ("KILL_NOTIFY") ("MAP") ("MBAR") ("MODAL") ("NO_COPY") ("NONEXCLUSIVE") ("NOTIFY_REALIZE") ("PRO_SET_VALUE") ("RESOURCE_NAME") ("RNAME_MBAR") ("ROW") ("SCR_XSIZE") ("SCR_YSIZE") ("SCROLL") ("SENSITIVE") ("SPACE") ("TITLE") ("TLB_FRAME_ATTR") ("TLB_KILL_REQUEST_EVENTS") ("TLB_SIZE_EVENTS") ("TRACKING_EVENTS") ("UNAME") ("UNITS") ("UVALUE") ("X_SCROLL_SIZE") ("XOFFSET") ("XPAD") ("XSIZE") ("Y_SCROLL_SIZE") ("YOFFSET") ("YPAD") ("YSIZE")))
     ("WIDGET_BUTTON"          fun nil                 (system) "Result = %s( Parent)" (("ALIGN_CENTER") ("ALIGN_LEFT") ("ALIGN_RIGHT") ("BITMAP") ("DYNAMIC_RESIZE") ("EVENT_FUNC") ("EVENT_PRO") ("FONT") ("FRAME") ("FUNC_GET_VALUE") ("GROUP_LEADER") ("HELP") ("KILL_NOTIFY") ("MENU") ("NO_COPY") ("NO_RELEASE") ("NOTIFY_REALIZE") ("PRO_SET_VALUE") ("RESOURCE_NAME") ("SCR_XSIZE") ("SCR_YSIZE") ("SENSITIVE") ("SEPARATOR") ("TRACKING_EVENTS") ("UNAME") ("UNITS") ("UVALUE") ("VALUE") ("X_BITMAP_EXTRA") ("XOFFSET") ("XSIZE") ("YOFFSET") ("YSIZE")))
     ("Init"                   fun "TrackBall"         (system) "Result = Obj -> [%s::]%s( Center, Radius ) ('TrackBall', Center, Radius)" (("AXIS") ("CONSTRAIN") ("MOUSE")))
     ("Update"                 fun "TrackBall"         (system) "Result = Obj -> [%s::]%s( sEvent)" (("MOUSE") ("TRANSFORM") ("TRANSLATE")))
    )
-  "1324 builtin routines with 5958 keywords for IDL version 5.5.")
+  "1324 builtin routines with 6129 keywords for IDL version 5.5.")
 
 (setq idlwave-system-variables-alist
   '(
index f360f690b5c7f7af2f788e302b5494159cb88d63..af7e4e551ac19f17f72e4ec1247a4b035ec39132 100644 (file)
@@ -1,11 +1,11 @@
 ;; idlw-shell.el --- run IDL as an inferior process of Emacs.
-;; Copyright (c) 1999, 2000, 2001 Free Software Foundation
+;; Copyright (c) 1999, 2000, 2001,2002 Free Software Foundation
 
 ;; Author: Carsten Dominik <dominik@astro.uva.nl>
 ;;         Chris Chase <chase@att.com>
 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
-;; Version: 4.14
-;; Date: $Date: 2002/07/18 18:58:07 $
+;; Version: 4.15
+;; Date: $Date: 2002/09/12 16:35:18 $
 ;; Keywords: processes
 
 ;; This file is part of GNU Emacs.
 ;; KNOWN PROBLEMS
 ;; ==============
 ;;
-;; I don't plan on implementing directory tracking by watching the IDL
-;; commands entered at the prompt, since too often an IDL procedure
-;; will change the current directory. If you want the idl process
-;; buffer to match the IDL current working just execute `M-x
-;; idlwave-shell-resync-dirs' (bound to "\C-c\C-d\C-w" by default.)
-;;
 ;; Under XEmacs the Debug menu in the shell does not display the
 ;; keybindings in the prefix map.  There bindings are available anyway - so
 ;; it is a bug in XEmacs.
 
 ;;; Customizations: idlwave-shell group
 
+;; General/Misc. customizations
 (defgroup idlwave-shell-general-setup nil
   "General setup of the Shell interaction for IDLWAVE/Shell."
   :prefix "idlwave-shell"
@@ -141,29 +136,6 @@ process output is made by surrounding this name with `*'s."
 
 ;; (defcustom idlwave-shell-automatic-start...)  See idlwave.el
 
-(defcustom idlwave-shell-initial-commands "!more=0"
-  "Initial commands, separated by newlines, to send to IDL.
-This string is sent to the IDL process by `idlwave-shell-mode' which is
-invoked by `idlwave-shell'."
-  :group 'idlwave-shell-general-setup
-  :type 'string)
-
-(defcustom idlwave-shell-save-command-history t
-  "Non-nil means preserve command history between sessions.
-The file `idlwave-shell-command-history-file' is used to save and restore
-the history."
-  :group 'idlwave-shell-general-setup
-  :type 'boolean)
-
-(defcustom idlwave-shell-command-history-file "~/.idlwhist"
-  "The file in which the command history of the idlwave shell is saved.
-In order to change the size of the history, see the variable
-`comint-input-ring-size'.
-The history is only saved if the variable `idlwave-shell-save-command-history'
-is non-nil."
-  :group 'idlwave-shell-general-setup
-  :type 'file)
-  
 (defcustom idlwave-shell-use-dedicated-frame nil
   "*Non-nil means, IDLWAVE should use a special frame to display shell buffer."
   :group 'idlwave-shell-general-setup
@@ -198,19 +170,6 @@ t          Arrows force the cursor back to the current command line and
          (const :tag "in command line only" cmdline)))
 
 ;; FIXME: add comint-input-ring-size?
-(defcustom idlwave-shell-comint-settings
-  '((comint-scroll-to-bottom-on-input . t)
-    (comint-scroll-to-bottom-on-output . nil)
-    (comint-scroll-show-maximum-output . t)
-    )
-  "Alist of special settings for the comint variables in the IDLWAVE Shell.
-Each entry is a cons cell with the name of a variable and a value.
-The function `idlwave-shell-mode' will make local variables out of each entry.
-Changes to this variable will only be active when the shell buffer is
-newly created."
-  :group 'idlwave-shell-general-setup
-  :type '(repeat
-         (cons variable sexp)))
 
 (defcustom idlwave-shell-use-toolbar t
   "*Non-nil means, use the debugging toolbar in all IDL related buffers.
@@ -268,7 +227,7 @@ to set this option to nil."
   :group 'idlwave-shell-general-setup
   :type 'boolean)
 
-(defcustom idlwave-shell-file-name-chars "~/A-Za-z0-9+@:_.$#%={}\\-"
+(defcustom idlwave-shell-file-name-chars "~/A-Za-z0-9+:_.$#%={}\\-"
   "The characters allowed in file names, as a string.
 Used for file name completion. Must not contain `'', `,' and `\"'
 because these are used as separators by IDL."
@@ -280,8 +239,58 @@ because these are used as separators by IDL."
   :group 'idlwave-shell-general-setup
   :type 'hook)
 
-(defvar idlwave-shell-print-expression-function nil
-  "*OBSOLETE VARIABLE, is no longer used.")
+(defcustom idlwave-shell-graphics-window-size '(500 400)
+  "Size of IDL graphics windows popped up by special IDLWAVE command.
+The command is `C-c C-d C-f' and accepts as a prefix the window nr.
+A command like `WINDOW,N,xsize=XX,ysize=YY' is sent to IDL."
+  :group 'idlwave-shell-general-setup
+  :type '(list
+         (integer :tag "x size")
+         (integer :tag "y size")))
+
+;; Commands Sent to Shell... etc.
+(defgroup idlwave-shell-command-setup nil
+  "Setup for command parameters of the Shell interaction for IDLWAVE."
+  :prefix "idlwave-shell"
+  :group 'idlwave)
+
+(defcustom idlwave-shell-initial-commands "!more=0"
+  "Initial commands, separated by newlines, to send to IDL.
+This string is sent to the IDL process by `idlwave-shell-mode' which is
+invoked by `idlwave-shell'."
+  :group 'idlwave-shell-command-setup
+  :type 'string)
+
+(defcustom idlwave-shell-save-command-history t
+  "Non-nil means preserve command history between sessions.
+The file `idlwave-shell-command-history-file' is used to save and restore
+the history."
+  :group 'idlwave-shell-command-setup
+  :type 'boolean)
+
+(defcustom idlwave-shell-command-history-file "~/.idlwhist"
+  "The file in which the command history of the idlwave shell is saved.
+In order to change the size of the history, see the variable
+`comint-input-ring-size'.
+The history is only saved if the variable `idlwave-shell-save-command-history'
+is non-nil."
+  :group 'idlwave-shell-command-setup
+  :type 'file)
+  
+(defcustom idlwave-shell-show-commands
+  '(run misc breakpoint)
+  "*A list of command types to show output from in the shell.  
+Possibilities are 'run, 'debug, 'breakpoint, and 'misc .  Unlisted
+types are not displayed in the shell.  The single type 'everything
+causes all the copious shell traffic to be displayed."
+  :group 'idlwave-shell-command-setup
+  :type '(choice
+         (const everything)
+         (set :tag "Checklist" :greedy t
+              (const :tag "All .run and .compile commands"  run)
+              (const :tag "All breakpoint commands"         breakpoint)
+              (const :tag "All debug and stepping commands" debug)
+              (const :tag "Return, close, etc. commands"    misc))))
 
 (defcustom idlwave-shell-examine-alist 
   '(("Print"           . "print,___")
@@ -299,24 +308,46 @@ The keys are used in the selection popup created by
 `idlwave-shell-examine-select', and the corresponding value is sent as
 a command to the shell, with special sequence `___' replaced by the
 expression being examined."
-  :group 'idlwave-shell-general-setup
+  :group 'idlwave-shell-command-setup
   :type '(repeat
          (cons 
           (string :tag "Label  ")
           (string :tag "Command"))))
 
+(defvar idlwave-shell-print-expression-function nil
+  "*OBSOLETE VARIABLE, is no longer used.")
+
 (defcustom idlwave-shell-separate-examine-output t
   "*Non-nil mean, put output of examine commands in their own buffer."
-  :group 'idlwave-shell-general-setup
+  :group 'idlwave-shell-command-setup
   :type 'boolean)
   
+(defcustom idlwave-shell-comint-settings
+  '((comint-scroll-to-bottom-on-input . t)
+    (comint-scroll-to-bottom-on-output . t)
+    (comint-scroll-show-maximum-output . nil))
+
+  "Alist of special settings for the comint variables in the IDLWAVE Shell.
+Each entry is a cons cell with the name of a variable and a value.
+The function `idlwave-shell-mode' will make local variables out of each entry.
+Changes to this variable will only be active when the shell buffer is
+newly created."
+  :group 'idlwave-shell-command-setup
+  :type '(repeat
+         (cons variable sexp)))
+
+(defcustom idlwave-shell-query-for-class t
+  "*Non-nil means query the shell for object class on object completions."
+  :group 'idlwave-shell-command-setup
+  :type 'boolean)
+
 (defcustom idlwave-shell-use-input-mode-magic nil
   "*Non-nil means, IDLWAVE should check for input mode spells in output.
 The spells are strings printed by your IDL program and matched
 by the regular expressions in `idlwave-shell-input-mode-spells'.
 When these expressions match, IDLWAVE switches to character input mode and
 back, respectively.  See `idlwave-shell-input-mode-spells' for details."
-  :group 'idlwave-shell-general-setup
+  :group 'idlwave-shell-command-setup
   :type 'boolean)
 
 (defcustom idlwave-shell-input-mode-spells
@@ -372,23 +403,14 @@ pro idlwave_char_input,on=on,off=off
         else                          print,'<onechar>'
   endif 
 end"
-  :group 'idlwave-shell-general-setup
+  :group 'idlwave-shell-command-setup
   :type '(list
          (regexp :tag "One-char  regexp")
          (regexp :tag "Char-mode regexp")
          (regexp :tag "Line-mode regexp")))
 
-(defcustom idlwave-shell-graphics-window-size '(500 400)
-  "Size of IDL graphics windows popped up by special IDLWAVE command.
-The command is `C-c C-d C-f' and accepts as a prefix the window nr.
-A command like `WINDOW,N,xsize=XX,ysize=YY' is sent to IDL."
-  :group 'idlwave-shell-general-setup
-  :type '(list
-         (integer :tag "x size")
-         (integer :tag "y size")))
-
-;;; Breakpoint Overlays etc
 
+;; Breakpoint Overlays etc
 (defgroup idlwave-shell-highlighting-and-faces nil
   "Highlighting and Faces used by the IDLWAVE Shell mode."
   :prefix "idlwave-shell"
@@ -540,12 +562,10 @@ idlwave-shell-temp-rinfo-save-file is set (respectively)."
 This is used to speed up the reloading of the routine info procedure
 before use by the shell.")
 
-(defvar idlwave-shell-dirstack-query "printd"
+(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
   "Command used by `idlwave-shell-resync-dirs' to query IDL for 
 the directory stack.")
 
-(defvar idlwave-shell-wd-is-synched nil)
-
 (defvar idlwave-shell-path-query "__pa=expand_path(!path,/array)&for i=0,n_elements(__pa)-1 do print,'PATH:<'+__pa[i]+'>'&print,'SYSDIR:<'+!dir+'>'"
   "The command which gets !PATH and !DIR infor from the shell.")
 
@@ -661,6 +681,9 @@ with `*'s."
 (defvar idlwave-shell-ready nil
   "If non-nil can send next command to IDL process.")
 
+(defvar idlwave-shell-wait-for-output nil
+  "Whether to wait for output to accumulate.")
+
 ;;; The following are the types of messages we attempt to catch to
 ;;; resync our idea of where IDL execution currently is.
 ;;; 
@@ -833,11 +856,17 @@ IDL has currently stepped.")
   (idlwave-shell-display-line nil)
   (setq idlwave-shell-calling-stack-index 0)
 
+  (when idlwave-shell-query-for-class
+      (add-to-list (make-local-variable 'idlwave-determine-class-special)
+                  'idlwave-shell-get-object-class)
+      (setq idlwave-store-inquired-class t))
+
   ;; Make sure comint-last-input-end does not go to beginning of
   ;; buffer (in case there were other processes already in this buffer).
   (set-marker comint-last-input-end (point))
   (setq idlwave-idlwave_routine_info-compiled nil)
   (setq idlwave-shell-ready nil)
+  (setq idlwave-shell-wait-for-output nil)
   (setq idlwave-shell-bp-alist nil)
   (idlwave-shell-update-bp-overlays) ; Throw away old overlays
   (setq idlwave-shell-sources-alist nil)
@@ -1016,24 +1045,38 @@ See also the variable `idlwave-shell-prompt-pattern'.
     (idlwave-shell arg)
     (select-window window)))
 
+(defun idlwave-shell-hide-p (type)
+  "Whether to hide this type of command.
+Return either nil or 'hide."
+  (if (listp idlwave-shell-show-commands)
+      (if (not (memq type idlwave-shell-show-commands)) 'hide)))
+
 (defun idlwave-shell-send-command (&optional cmd pcmd hide preempt)
   "Send a command to IDL process.
 
-\(CMD PCMD HIDE\) are placed at the end of `idlwave-shell-pending-commands'.
-If IDL is ready the first command, CMD, in
-`idlwave-shell-pending-commands' is sent to the IDL process.  If optional
-second argument PCMD is non-nil it will be placed on
-`idlwave-shell-post-command-hook' when CMD is executed.  If the optional
-third argument HIDE is non-nil, then hide output from CMD.
+\(CMD PCMD HIDE\) are placed at the end of
+` idlwave-shell-pending-commands'.  If IDL is ready the first command,
+CMD, in `idlwave-shell-pending-commands' is sent to the IDL process.
+If optional second argument PCMD is non-nil it will be placed on
+`idlwave-shell-post-command-hook' when CMD is executed.  If the
+optional third argument HIDE is non-nil, then hide output from CMD.
 If optional fourth argument PREEMPT is non-nil CMD is put at front of
-`idlwave-shell-pending-commands'.
-
-IDL is considered ready if the prompt is present
-and if `idlwave-shell-ready' is non-nil."
-
-  ;(setq hide nil)  ;  FIXME: turn this on for debugging only
-;  (message "SENDING %s|||%s" cmd pcmd) ;??????????????????????
-  (let (buf proc)
+`idlwave-shell-pending-commands'.  If PREEMPT is 'wait, wait for all
+output to complete and the next prompt to arrive before returning
+\(useful if you need an answer now\). IDL is considered ready if the
+prompt is present and if `idlwave-shell-ready' is non-nil."
+
+;  (setq hide nil)  ;  FIXME: turn this on for debugging only
+;  (if (null cmd) 
+;      (progn
+;      (message "SENDING Pending commands: %s" 
+;               (prin1-to-string idlwave-shell-pending-commands)))
+;    (message "SENDING %s|||%s" cmd pcmd))
+  (if (and (symbolp idlwave-shell-show-commands) 
+          (eq idlwave-shell-show-commands 'everything))
+      (setq hide nil))
+  (let ((save-buffer (current-buffer))
+       buf proc)
     ;; Get or make the buffer and its process
     (if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
            (not (setq proc (get-buffer-process buf))))
@@ -1047,51 +1090,53 @@ and if `idlwave-shell-ready' is non-nil."
                  (not (setq proc (get-buffer-process buf))))
              ;; Still nothing
              (error "Problem with autostarting IDL shell"))))
-
-    (save-excursion
+    (when (or cmd idlwave-shell-pending-commands)
       (set-buffer buf)
-      (goto-char (process-mark proc))
       ;; To make this easy, always push CMD onto pending commands
       (if cmd
-          (setq idlwave-shell-pending-commands
-                (if preempt
-                    ;; Put at front.
-                    (append (list (list cmd pcmd hide))
-                            idlwave-shell-pending-commands)
-                  ;; Put at end.
-                  (append idlwave-shell-pending-commands 
-                          (list (list cmd pcmd hide))))))
+         (setq idlwave-shell-pending-commands
+               (if preempt
+                   ;; Put at front.
+                   (append (list (list cmd pcmd hide))
+                           idlwave-shell-pending-commands)
+                 ;; Put at end.
+                 (append idlwave-shell-pending-commands 
+                         (list (list cmd pcmd hide))))))
       ;; Check if IDL ready
-      (if (and idlwave-shell-ready
-               ;; Check for IDL prompt
-               (save-excursion
-                (forward-line 0)
-                 ;; (beginning-of-line) ; Changed for Emacs 21
-                 (looking-at idlwave-shell-prompt-pattern)))
-          ;; IDL ready for command
-          (if idlwave-shell-pending-commands
-              ;; execute command
-              (let* ((lcmd (car idlwave-shell-pending-commands))
-                    (cmd (car lcmd))
-                     (pcmd (nth 1 lcmd))
-                     (hide (nth 2 lcmd)))
-               ;; If this is an executive command, reset the stack pointer
-               (if (eq (string-to-char cmd) ?.)
-                   (setq idlwave-shell-calling-stack-index 0))
-                ;; Set post-command
-                (setq idlwave-shell-post-command-hook pcmd)
-                ;; Output hiding
-;;; Debug code          
-;;;             (setq idlwave-shell-hide-output nil)
-                (setq idlwave-shell-hide-output hide)
-                ;; Pop command
-                (setq idlwave-shell-pending-commands
-                      (cdr idlwave-shell-pending-commands))
-                ;; Send command for execution
-                (set-marker comint-last-input-start (point))
-                (set-marker comint-last-input-end (point))
-                (comint-simple-send proc cmd)
-                (setq idlwave-shell-ready nil)))))))
+      (let ((save-point (point-marker)))
+       (goto-char (process-mark proc))
+       (if (and idlwave-shell-ready
+                ;; Check for IDL prompt
+                (prog2
+                  (forward-line 0)
+                  ;; (beginning-of-line) ; Changed for Emacs 21
+                  (looking-at idlwave-shell-prompt-pattern)
+                  (goto-char (process-mark proc))))
+           ;; IDL ready for command, execute it
+           (let* ((lcmd (car idlwave-shell-pending-commands))
+                  (cmd (car lcmd))
+                  (pcmd (nth 1 lcmd))
+                  (hide (nth 2 lcmd)))
+             ;; If this is an executive command, reset the stack pointer
+             (if (eq (string-to-char cmd) ?.)
+                 (setq idlwave-shell-calling-stack-index 0))
+             ;; Set post-command
+             (setq idlwave-shell-post-command-hook pcmd)
+             ;; Output hiding
+             (setq idlwave-shell-hide-output hide)
+             ;; Pop command
+             (setq idlwave-shell-pending-commands
+                   (cdr idlwave-shell-pending-commands))
+             ;; Send command for execution
+             (set-marker comint-last-input-start (point))
+             (set-marker comint-last-input-end (point))
+             (comint-simple-send proc cmd)
+             (setq idlwave-shell-ready nil)
+             (when (equal preempt 'wait) ; Get all the output at once
+               (setq idlwave-shell-wait-for-output t)
+               (accept-process-output proc))))
+       (goto-char save-point))
+      (set-buffer save-buffer))))
 
 (defun idlwave-shell-send-char (c &optional no-error)
   "Send one character to the shell, without a newline."
@@ -1172,38 +1217,36 @@ when the IDL prompt gets displayed again after the current IDL command."
           (and (eq idlwave-shell-char-mode-active 'exit)
                (throw 'exit "Single char loop exited"))))))))
 
-(defun idlwave-shell-up-or-history (&optional arg)
+(defun idlwave-shell-move-or-history (up &optional arg)
   "When in last line of process buffer, do `comint-previous-input'.
-Otherwise just do `previous-line'."
+Otherwise just move the line.  Move down unless UP is non-nil."
+  (let* ((proc-pos (marker-position
+                   (process-mark (get-buffer-process (current-buffer)))))
+        (arg (or arg 1))
+        (arg (if up arg (- arg))))
+    (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos))
+    (if (and idlwave-shell-arrows-do-history
+            (>= (1+ (save-excursion (end-of-line) (point))) proc-pos))
+       (progn
+         (goto-char proc-pos)
+         (and (not (eolp)) (kill-line nil))
+         (comint-previous-input arg))
+      (previous-line arg))))
+
+(defun idlwave-shell-up-or-history (&optional arg)
+"When in last line of process buffer, move to previous input.
+ Otherwise just go up one line."
   (interactive "p")
-  (if (eq t idlwave-shell-arrows-do-history) (goto-char (point-max)))
-  (if (and idlwave-shell-arrows-do-history
-          (>= (1+ (save-excursion (end-of-line) (point)))
-              (marker-position
-               (process-mark (get-buffer-process (current-buffer))))))
-      (progn
-       (and (not (eolp)) (kill-line nil))
-       (comint-previous-input arg))
-    (previous-line arg)))
+  (idlwave-shell-move-or-history t arg))
 
 (defun idlwave-shell-down-or-history (&optional arg)
-  "When in last line of process buffer, do `comint-next-input'.
- Otherwise just do `next-line'."
+"When in last line of process buffer, move to next input.
+ Otherwise just go down one line."
   (interactive "p")
-  (if (eq t idlwave-shell-arrows-do-history) (goto-char (point-max)))
-  (if (and idlwave-shell-arrows-do-history
-          (>= (1+ (save-excursion (end-of-line) (point)))
-              (marker-position
-               (process-mark (get-buffer-process (current-buffer))))))
-      (progn
-       (and (not (eolp)) (kill-line nil))
-       (comint-next-input arg))
-    (next-line arg)))
-
-;; There was a report that a newer version of comint.el changed the
-;; name of comint-filter to comint-output-filter.  Unfortunately, we
-;; have yet to upgrade.
+  (idlwave-shell-move-or-history nil arg))
 
+;; Newer versions of comint.el changed the name of comint-filter to
+;; comint-output-filter.
 (defun idlwave-shell-comint-filter (process string) nil)
 (if (fboundp 'comint-output-filter)
     (fset 'idlwave-shell-comint-filter (symbol-function 'comint-output-filter))
@@ -1223,7 +1266,6 @@ and then calls `idlwave-shell-send-command' for any pending commands."
   ;; We no longer do the cleanup here - this is done by the process sentinel
   (when (eq (process-status idlwave-shell-process-name) 'run)
     ;; OK, process is still running, so we can use it.
-    (setq idlwave-shell-wd-is-synched nil)  ;; something might have changed cwd
     (let ((data (match-data)) p)
       (unwind-protect
           (progn
@@ -1252,7 +1294,7 @@ and then calls `idlwave-shell-send-command' for any pending commands."
                    (get-buffer-create idlwave-shell-hidden-output-buffer))
                   (goto-char (point-max))
                   (insert string))
-              (idlwave-shell-comint-filter proc string))
+             (idlwave-shell-comint-filter proc string))
             ;; Watch for magic - need to accumulate the current line
             ;; since it may not be sent all at once.
             (if (string-match "\n" string)
@@ -1266,46 +1308,44 @@ and then calls `idlwave-shell-send-command' for any pending commands."
                                          (match-end 0)))))
               (setq idlwave-shell-accumulation
                     (concat idlwave-shell-accumulation string)))
-
-
+           
+           
 ;;; Test/Debug code
 ;           (save-excursion (set-buffer
 ;                            (get-buffer-create "*idlwave-shell-output*"))
 ;                           (goto-char (point-max))
 ;                           (insert "\nSTRING===>\n" string "\n<====\n"))
            
-            ;; Check for prompt in current accumulating line 
-            (if (setq idlwave-shell-ready
-                      (string-match idlwave-shell-prompt-pattern
-                                    idlwave-shell-accumulation))
-                (progn
-                  (if idlwave-shell-hide-output
-                      (save-excursion
-                        (set-buffer idlwave-shell-hidden-output-buffer)
-;                        (goto-char (point-min))
-;                        (re-search-forward idlwave-shell-prompt-pattern nil t)
-                        (goto-char (point-max))
-                        (re-search-backward idlwave-shell-prompt-pattern nil t)
+           ;; Check for prompt in current accumulating output
+           (if (setq idlwave-shell-ready
+                     (string-match idlwave-shell-prompt-pattern
+                                   idlwave-shell-accumulation))
+               (progn
+                 (if idlwave-shell-hide-output
+                     (save-excursion
+                       (set-buffer idlwave-shell-hidden-output-buffer)
+                       (goto-char (point-max))
+                       (re-search-backward idlwave-shell-prompt-pattern nil t)
                        (goto-char (match-end 0))
-                        (setq idlwave-shell-command-output
-                              (buffer-substring (point-min) (point)))
-;; Test/Debug
+                       (setq idlwave-shell-command-output
+                             (buffer-substring (point-min) (point)))
+                       
+;;; Test/Debug
 ;                       (save-excursion (set-buffer
 ;                                        (get-buffer-create "*idlwave-shell-output*"))
 ;                                       (goto-char (point-max))
 ;                                       (insert "\nOUPUT===>\n" idlwave-shell-command-output "\n<===\n"))
-
-                        (delete-region (point-min) (point)))
+                       
+                       (delete-region (point-min) (point)))
                     (setq idlwave-shell-command-output
-                          (save-excursion
-                            (set-buffer
-                             (process-buffer proc))
-                            (buffer-substring
-                             (progn
-                               (goto-char (process-mark proc))
-                               (beginning-of-line nil)
-                               (point))
-                             comint-last-input-end))))
+                         (with-current-buffer (process-buffer proc)
+                           (buffer-substring
+                            (save-excursion
+                              (goto-char (process-mark proc))
+                              (beginning-of-line nil)
+                              (point))
+                            comint-last-input-end))))
+
                   ;; Scan for state and do post command - bracket them
                   ;; with idlwave-shell-ready=nil since they
                   ;; may call idlwave-shell-send-command.
@@ -1321,10 +1361,19 @@ and then calls `idlwave-shell-send-command' for any pending commands."
                     (setq idlwave-shell-accumulation nil
                           idlwave-shell-command-output nil
                           idlwave-shell-post-command-hook nil
-                          idlwave-shell-hide-output nil))
+                          idlwave-shell-hide-output nil
+                         idlwave-shell-wait-for-output nil))
                   ;; Done with post command. Do pending command if
                   ;; any.
-                  (idlwave-shell-send-command))))
+                  (idlwave-shell-send-command))
+             ;; We didn't get the prompt yet... maybe accept more output
+             (when idlwave-shell-wait-for-output
+;;; Test/Debug code
+;              (save-excursion (set-buffer
+;                               (get-buffer-create "*idlwave-shell-output*"))
+;                              (goto-char (point-max))
+;                              (insert "\n<=== WAITING ON OUTPUT ==>\n"))
+                 (accept-process-output proc nil 100))))
         (store-match-data data)))))
 
 (defun idlwave-shell-sentinel (process event)
@@ -1367,75 +1416,63 @@ messages.  We ignore error messages otherwise.
 For breakpoint messages process any attached count or command
 parameters.
 Update the windows if a message is found."
-  (let (update)
-    (cond
-     ;; Make sure we have output
-     ((not idlwave-shell-command-output))
-
-     ;; Various types of HALT messages.
-     ((string-match idlwave-shell-halt-messages-re
-                   idlwave-shell-command-output)
-      ;; Grab the file and line state info.
-      (setq idlwave-shell-calling-stack-index 0)
-      (setq idlwave-shell-halt-frame
-            (idlwave-shell-parse-line 
-             (substring idlwave-shell-command-output (match-end 0)))
-            update t))
-
-     ;; Handle breakpoints separately
-     ((string-match idlwave-shell-break-message
-                    idlwave-shell-command-output)
-      (setq idlwave-shell-calling-stack-index 0)
-      (setq idlwave-shell-halt-frame 
-            (idlwave-shell-parse-line 
-             (substring idlwave-shell-command-output (match-end 0)))
-            update t)
-      ;; We used to to counting hits on breakpoints
-      ;; this is no longer supported since IDL breakpoints
-      ;; have learned counting.
-      ;; Do breakpoint command processing
-      (let ((bp (assoc 
-                 (list
-                  (nth 0 idlwave-shell-halt-frame)
-                  (nth 1 idlwave-shell-halt-frame))
-                 idlwave-shell-bp-alist)))
-        (if bp
-            (let ((cmd (idlwave-shell-bp-get bp 'cmd)))
-              (if cmd
-                  ;; Execute command
-                  (if (listp cmd)
-                      (eval cmd)
-                    (funcall cmd))))
-          ;; A breakpoint that we did not know about - perhaps it was
-          ;; set by the user or IDL isn't reporting breakpoints like
-          ;; we expect.  Lets update our list.
-          (idlwave-shell-bp-query)))))
-
-    ;; Handle compilation errors in addition to the above
-    (if (and idlwave-shell-command-output
-             (or (string-match
-                  idlwave-shell-syntax-error idlwave-shell-command-output)
-                 (string-match
-                  idlwave-shell-other-error idlwave-shell-command-output)))
-       (progn
-         (save-excursion
-           (set-buffer
-            (get-buffer-create idlwave-shell-error-buffer))
-           (erase-buffer)
-           (insert idlwave-shell-command-output)
-           (goto-char (point-min))
-           (setq idlwave-shell-error-last (point)))
-          (idlwave-shell-goto-next-error)))
-    
-    ;; Do update
-    (when update
-      (idlwave-shell-display-line (idlwave-shell-pc-frame)))))
-
+  (cond
+   ;; Make sure we have output
+   ((not idlwave-shell-command-output))
+   
+   ;; First Priority: Syntax and other errors
+   ((or 
+     (string-match idlwave-shell-syntax-error idlwave-shell-command-output)
+     (string-match idlwave-shell-other-error idlwave-shell-command-output))
+    (save-excursion
+      (set-buffer
+       (get-buffer-create idlwave-shell-error-buffer))
+      (erase-buffer)
+      (insert idlwave-shell-command-output)
+      (goto-char (point-min))
+      (setq idlwave-shell-error-last (point)))
+    (idlwave-shell-goto-next-error))
+   
+   ;; Second Priority: Various types of HALT messages.
+   ((string-match idlwave-shell-halt-messages-re
+                 idlwave-shell-command-output)
+    ;; Grab the file and line state info.
+    (setq idlwave-shell-calling-stack-index 0)
+    (setq idlwave-shell-halt-frame
+         (idlwave-shell-parse-line 
+          (substring idlwave-shell-command-output (match-end 0))))
+    (idlwave-shell-display-line (idlwave-shell-pc-frame)))
+   
+   ;; Last Priority: Breakpoints 
+   ((string-match idlwave-shell-break-message
+                 idlwave-shell-command-output)
+    (setq idlwave-shell-calling-stack-index 0)
+    (setq idlwave-shell-halt-frame 
+         (idlwave-shell-parse-line 
+          (substring idlwave-shell-command-output (match-end 0))))
+    ;; We used to count hits on breakpoints
+    ;; this is no longer supported since IDL breakpoints
+    ;; have learned counting.
+    ;; Do breakpoint command processing
+    (let ((bp (assoc 
+              (list
+               (nth 0 idlwave-shell-halt-frame)
+               (nth 1 idlwave-shell-halt-frame))
+              idlwave-shell-bp-alist)))
+      (if bp
+         (let ((cmd (idlwave-shell-bp-get bp 'cmd)))
+           (if cmd
+               ;; Execute command
+               (if (listp cmd) (eval cmd) (funcall cmd))))
+       ;; A breakpoint that we did not know about - perhaps it was
+       ;; set by the user or IDL isn't reporting breakpoints like
+       ;; we expect.  Lets update our list.
+       (idlwave-shell-bp-query)))
+    (idlwave-shell-display-line (idlwave-shell-pc-frame)))))
 
 (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*"
   "Buffer containing syntax errors from IDL compilations.")
 
-
 ;; FIXME: the following two variables do not currently allow line breaks
 ;; in module and file names.  I am not sure if it will be necessary to
 ;; change this.  Currently it seems to work the way it is.
@@ -1498,7 +1535,8 @@ plus garbage match an existing regular file.  This is hopefully very
 unlikely."
 
   (let (number procedure file)
-    (when (string-match idlwave-shell-file-line-message string)
+    (when (and (not (string-match ":\\s-*\\$MAIN" string))
+               (string-match idlwave-shell-file-line-message string))
       (setq procedure (match-string 1 string)
            number (match-string 3 string)
            file (match-string 5 string))
@@ -1554,7 +1592,7 @@ file name."
        idlwave-shell-command-line-to-execute nil
        idlwave-shell-bp-alist nil
        idlwave-shell-calling-stack-index 0
-       idlwave-idlwave_routine_info-compiled nil)
+       idlwave-idlwave_routine_info-compile nil)
   (idlwave-shell-delete-temp-files)
   (idlwave-shell-display-line nil)
   (idlwave-shell-update-bp-overlays) ; kill old overlays
@@ -1585,27 +1623,28 @@ The size is given by `idlwave-shell-graphics-window-size'."
   (let ((n (if n (prefix-numeric-value n) 0)))
     (idlwave-shell-send-command 
      (apply 'format "window,%d,xs=%d,ys=%d"
-           n idlwave-shell-graphics-window-size))))
+           n idlwave-shell-graphics-window-size)
+     nil (idlwave-shell-hide-p 'misc))))
 
 (defun idlwave-shell-resync-dirs ()
-  "Resync the buffer's idea of the current directory stack.
-This command queries IDL with the command bound to 
-`idlwave-shell-dirstack-query' (default \"printd\"), reads the
-output for the new directory stack."
+  "Resync the buffer's idea of the current directory.
+This command queries IDL with the command bound to
+`idlwave-shell-dirstack-query', reads the output for the new
+directory."
   (interactive)
   (idlwave-shell-send-command idlwave-shell-dirstack-query
                              'idlwave-shell-filter-directory
-                             'hide))
+                             'hide 'wait))
 
 (defun idlwave-shell-retall (&optional arg)
   "Return from the entire calling stack."
   (interactive "P")
-  (idlwave-shell-send-command "retall"))
+  (idlwave-shell-send-command "retall" nil (idlwave-shell-hide-p 'misc)))
 
 (defun idlwave-shell-closeall (&optional arg)
   "Close all open files."
   (interactive "P")
-  (idlwave-shell-send-command "close,/all"))
+  (idlwave-shell-send-command "close,/all" nil (idlwave-shell-hide-p 'misc)))
 
 (defun idlwave-shell-quit (&optional arg)
   "Exit the idl process after confirmation.
@@ -1619,7 +1658,7 @@ With prefix ARG, exit without confirmation."
          (error nil)))))
 
 (defun idlwave-shell-reset (&optional hidden)
-  "Reset IDL.  Return to main level and destroy the leaftover variables.
+  "Reset IDL.  Return to main level and destroy the leftover variables.
 This issues the following commands:  
 RETALL
 WIDGET_CONTROL,/RESET
@@ -1752,20 +1791,62 @@ HEAP_GC, /VERBOSE"
 Change the default directory for the process buffer to concur."
   (save-excursion
     (set-buffer (idlwave-shell-buffer))
-    (if (string-match "Current Directory: *\\(\\S-*\\) *$"
+    (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]"
                      idlwave-shell-command-output)
        (let ((dir (substring idlwave-shell-command-output 
                              (match-beginning 1) (match-end 1))))
-         (message "Setting Emacs wd to %s" dir)
+;        (message "Setting Emacs working dir to %s" dir)
          (setq idlwave-shell-default-directory dir)
          (setq default-directory (file-name-as-directory dir))))))
 
+(defvar idlwave-shell-get-object-class nil)
+(defun idlwave-shell-get-object-class (apos)
+  "Query the shell for the class of the object before point."
+  (let ((bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
+       (bol (save-excursion (forward-line 0) (point)))
+       expression)
+    (save-excursion
+      (goto-char apos)
+      (setq expression (buffer-substring 
+                       (catch 'exit
+                         (while t
+                           (if (not (re-search-backward 
+                                     "[^][.A-Za-z0-9_() ]" bos t))
+                               (throw 'exit bos)) ;ran into bos
+                           (if (not (idlwave-is-pointer-dereference bol))
+                               (throw 'exit (1+ (point))))))
+                       apos)))
+    (when (not (string= expression ""))
+      (setq idlwave-shell-get-object-class nil)
+      (idlwave-shell-send-command
+       (concat "print,obj_class(" expression ")")
+       'idlwave-shell-parse-object-class
+       'hide 'wait)
+      ;; If we don't know anything about the class, update shell routines
+      (if (and idlwave-shell-get-object-class
+              (not (assoc-ignore-case idlwave-shell-get-object-class
+                                      (idlwave-class-alist))))
+         (idlwave-shell-maybe-update-routine-info))
+      idlwave-shell-get-object-class)))
+
+(defun idlwave-shell-parse-object-class ()
+  "Parse the output of the obj_class command."
+  (let ((match "print,obj_class([^\n\r]+[\n\r ]+"))
+    (if (and
+        (not (string-match (concat match match "\\s-*^[\n\r]+"
+                                   "% Syntax error")
+                           idlwave-shell-command-output))
+        (string-match (concat match "\\([A-Za-z_0-9]+\\)")
+                      idlwave-shell-command-output))
+       (setq idlwave-shell-get-object-class 
+             (match-string 1 idlwave-shell-command-output)))))
+
+
 (defun idlwave-shell-complete (&optional arg)
   "Do completion in the idlwave-shell buffer.
 Calls `idlwave-shell-complete-filename' after some executive commands or
 in strings.  Otherwise, calls `idlwave-complete' to complete modules and
 keywords."
-;;FIXME: batch files?
   (interactive "P")
   (let (cmd)
     (cond
@@ -1776,13 +1857,17 @@ keywords."
                    ".COM" ".COMP" ".COMPI" ".COMPIL" ".COMPILE"))
          ;; This command expects file names
          (idlwave-shell-complete-filename)))
+
+     ((idlwave-shell-batch-command)
+      (idlwave-shell-complete-filename))
+
      ((and (idlwave-shell-filename-string)
           (save-excursion
             (beginning-of-line)
             (let ((case-fold-search t))
-              (not (looking-at ".*obj_new"))))
-          ;; In a string, could be a file name to here
-          (idlwave-shell-complete-filename)))
+              (not (looking-at ".*obj_new")))))
+      (idlwave-shell-complete-filename))
+     
      (t
       ;; Default completion of modules and keywords
       (idlwave-complete arg)))))
@@ -1790,36 +1875,17 @@ keywords."
 (defun idlwave-shell-complete-filename (&optional arg)
   "Complete a file name at point if after a file name.
 We assume that we are after a file name when completing one of the
-args of an executive .run, .rnew or .compile.  Also, in a string
-constant we complete file names.  Otherwise return nil, so that
-other completion functions can do their work."
-  ;; Comint does something funny with the default directory,
-  ;; so we set it here from out safe own variable
-  (setq default-directory 
-       (file-name-as-directory idlwave-shell-default-directory))
-  (if (not idlwave-shell-wd-is-synched)
-      ;; Some IDL stuff has been executed since last update, so we need to
-      ;; do it again.
-      (idlwave-shell-send-command
-       idlwave-shell-dirstack-query
-       `(progn
-         (idlwave-shell-filter-directory)
-         (setq idlwave-shell-wd-is-synched t)
-         (switch-to-buffer (idlwave-shell-buffer))
-         (goto-char ,(point))  ;; This is necesary on Emacs, don't know why
-         ;; after the update, we immediately redo the completion, so the
-         ;; user will hardly notice we did the update.
-         (idlwave-shell-complete-filename))
-       'hide)
-    (let* ((comint-file-name-chars idlwave-shell-file-name-chars)
-          (completion-ignore-case (default-value 'completion-ignore-case)))
-      (comint-dynamic-complete-filename))))
+args of an executive .run, .rnew or .compile."
+  ;; CWD might have changed, resync, to set default directory
+  (idlwave-shell-resync-dirs) 
+  (let ((comint-file-name-chars idlwave-shell-file-name-chars))
+    (comint-dynamic-complete-as-filename)))
 
 (defun idlwave-shell-executive-command ()
   "Return the name of the current executive command, if any."
   (save-excursion
     (idlwave-beginning-of-statement)
-    (if (looking-at "[ \t]*\\([.][^ \t\n\r]*\\)")
+    (if (looking-at "[ \t]*\\([.][^ \t\n\r]+\\)")
        (match-string 1))))
 
 (defun idlwave-shell-filename-string ()
@@ -1831,6 +1897,15 @@ other completion functions can do their work."
       ;; Check of the next char is a string delimiter
       (memq (preceding-char) '(?\' ?\")))))
 
+(defun idlwave-shell-batch-command ()
+  "Returns t if we're in a batch command statement like @foo"
+  (let ((limit (save-excursion (beginning-of-line) (point))))
+    (save-excursion
+      ;; Skip backwards over filename
+      (skip-chars-backward idlwave-shell-file-name-chars limit)
+      (skip-chars-backward " \t" limit)
+      (and (eq (preceding-char) ?@) (not (idlwave-in-quote))))))
+
 ;;;
 ;;; This section contains code for debugging IDL programs. --------------------
 ;;;
@@ -2008,7 +2083,8 @@ If FRAME is nil then remove overlay."
   (or (not arg) (< arg 1)
       (setq arg 1))
   (idlwave-shell-send-command 
-   (concat ".s " (if (integerp arg) (int-to-string arg) arg))))
+   (concat ".s " (if (integerp arg) (int-to-string arg) arg))
+   nil (idlwave-shell-hide-p 'debug)))
 
 (defun idlwave-shell-stepover (arg)
   "Stepover one source line.
@@ -2018,9 +2094,10 @@ Uses IDL's stepover executive command which does not enter called functions."
   (or (not arg) (< arg 1)
       (setq arg 1))
   (idlwave-shell-send-command 
-   (concat ".so " (if (integerp arg) (int-to-string arg) arg))))
+   (concat ".so " (if (integerp arg) (int-to-string arg) arg))
+   nil (idlwave-shell-hide-p 'debug)))
 
-(defun idlwave-shell-break-here (&optional count cmd)
+(defun idlwave-shell-break-here (&optional count cmd condition)
   "Set breakpoint at current line.  
 
 If Count is nil then an ordinary breakpoint is set.  We treat a count
@@ -2032,12 +2109,14 @@ Optional argument CMD is a list or function to evaluate upon reaching
 the breakpoint."
   
   (interactive "P")
-  (if (listp count)
-      (setq count nil))
+  (when (listp count)
+    (if (equal (car count) 4) 
+       (setq condition (read-string "Break Condition: ")))
+    (setq count nil))
   (idlwave-shell-set-bp
    ;; Create breakpoint
    (idlwave-shell-bp (idlwave-shell-current-frame)
-                    (list count cmd)
+                    (list count cmd condition)
                     (idlwave-shell-current-module))))
 
 (defun idlwave-shell-set-bp-check (bp)
@@ -2061,7 +2140,8 @@ the problem with not being able to set the breakpoint."
               ;; Clean up before retrying
               (idlwave-shell-command-failure)
               (idlwave-shell-send-command
-               (concat ".run " (idlwave-shell-bp-get bp 'file)) nil nil)
+               (concat ".run " (idlwave-shell-bp-get bp 'file)) nil 
+              (idlwave-shell-hide-p 'run))
               ;; Try setting breakpoint again
               (idlwave-shell-set-bp bp))
           (beep)
@@ -2084,22 +2164,26 @@ breakpoint can not be set."
 (defun idlwave-shell-cont ()
   "Continue executing."
   (interactive)
-  (idlwave-shell-send-command ".c" '(idlwave-shell-redisplay 'hide)))
+  (idlwave-shell-send-command ".c" '(idlwave-shell-redisplay 'hide)
+                             (idlwave-shell-hide-p 'debug)))
 
 (defun idlwave-shell-go ()
   "Run .GO.  This starts the main program of the last compiled file."
   (interactive)
-  (idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide)))
+  (idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide)
+                             (idlwave-shell-hide-p 'debug)))
 
 (defun idlwave-shell-return ()
   "Run .RETURN (continue to next return, but stay in subprogram)."
   (interactive)
-  (idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide)))
+  (idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide)
+                             (idlwave-shell-hide-p 'debug)))
 
 (defun idlwave-shell-skip ()
   "Run .SKIP (skip one line, then step)."
   (interactive)
-  (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide)))
+  (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide)
+                             (idlwave-shell-hide-p 'debug)))
 
 (defun idlwave-shell-clear-bp (bp)
   "Clear breakpoint BP.
@@ -2109,7 +2193,8 @@ Clears in IDL and in `idlwave-shell-bp-alist'."
         (progn
           (idlwave-shell-send-command
            (concat "breakpoint,/clear," 
-                  (if (integerp index) (int-to-string index) index)))
+                  (if (integerp index) (int-to-string index) index))
+          nil (idlwave-shell-hide-p 'breakpoint))
          (idlwave-shell-bp-query)))))
 
 (defun idlwave-shell-current-frame ()
@@ -2155,11 +2240,25 @@ at a breakpoint."
           (beep)
           (message "Cannot identify breakpoint for this line"))))))
 
+(defun idlwave-shell-disable-all-bp (&optional enable)
+  "Disable all breakpoints we know about.
+If ENABLE is non-nil, enable them instead."
+  (let  ((bpl idlwave-shell-bp-alist))
+    (while bpl
+      (idlwave-shell-send-command 
+       (concat "breakpoint,"
+              (if enable "/enable," "/disable," )
+              (idlwave-shell-bp-get (car bpl)))
+       nil (idlwave-shell-hide-p 'breakpoint))
+      (setq bpl (cdr bpl)))))
+  
 (defun idlwave-shell-to-here ()
   "Set a breakpoint with count 1 then continue."
   (interactive)
+  (idlwave-shell-disable-all-bp)
   (idlwave-shell-break-here 1)
-  (idlwave-shell-cont))
+  (idlwave-shell-cont)
+  (idlwave-shell-disable-all-bp 'enable))
 
 (defun idlwave-shell-break-in (&optional module)
   "Look for a module name near point and set a break point for it.
@@ -2244,7 +2343,7 @@ Sets a breakpoint with count 1 at end of block, then continues."
   "Attempt to run until this procedure exits.
 Runs to the last statement and then steps 1 statement.  Use the .out command."
   (interactive)
-  (idlwave-shell-send-command (concat ".o")))
+  (idlwave-shell-send-command ".o" nil (idlwave-shell-hide-p 'debug)))
 
 (defun idlwave-shell-help-expression (arg)
   "Print help on current expression.  See `idlwave-shell-print'."
@@ -2336,7 +2435,7 @@ idlw-shell-examine-alist from which to select the help command text."
        (arg
        (setq expr (read-string "Expression: ")))
        (t
-       (idlwave-with-special-syntax1
+       (idlwave-with-special-syntax
         ;; Move to beginning of current or previous expression
         (if (looking-at "\\<\\|(")
             ;; At beginning of expression, don't move backwards unless
@@ -2683,7 +2782,8 @@ If there is a prefix argument, display IDL process."
                  (idlwave-look-at "\\<end\\>")))
           (insert "\nend\n"))
       (save-buffer 0)))
-  (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file))
+  (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file)
+                             nil (idlwave-shell-hide-p 'run))
   (if n
       (idlwave-display-buffer (idlwave-shell-buffer) 
                              nil (idlwave-shell-shell-frame))))
@@ -2715,8 +2815,27 @@ Does not work for a region with multiline blocks - use
        (error nil))))
 
 (defun idlwave-display-buffer (buf not-this-window-p &optional frame)
-  (if (not (frame-live-p frame)) (setq frame nil))
-  (display-buffer buf not-this-window-p frame))
+  (if (featurep 'xemacs)
+      ;; The XEmacs version enforces the frame
+      (display-buffer buf not-this-window-p frame)
+    ;; For Emacs, we need to force the frame ourselves.
+    (let ((this-frame (selected-frame)))
+      (if (frame-live-p frame)
+          (select-frame frame))
+      (if (eq this-frame (selected-frame))
+          ;; same frame:  use display buffer, to make sure the current
+          ;; window stays.
+          (display-buffer buf)
+        ;; different frame
+        (if (one-window-p)
+            ;; only window:  switch
+            (progn
+              (switch-to-buffer buf)
+              (selected-window))   ; must return the window.
+         ;; several windows - use display-buffer
+          (display-buffer buf not-this-window-p))))))
+;  (if (not (frame-live-p frame)) (setq frame nil))
+;  (display-buffer buf not-this-window-p frame))
 
 (defvar idlwave-shell-bp-buffer " *idlwave-shell-bp*"
   "Scratch buffer for parsing IDL breakpoint lists and other stuff.")
@@ -2744,6 +2863,7 @@ Defaults to 'index."
    ((eq item 'data) (cdr (cdr bp)))
    ((eq item 'count) (nth 0 (cdr (cdr bp))))
    ((eq item 'cmd) (nth 1 (cdr (cdr bp))))
+   ((eq item 'condition) (nth 2 (cdr (cdr bp))))
    ;; IDL breakpoint info
    ((eq item 'module) (nth 1 (car (cdr bp))))
    ;;    index - default
@@ -2762,7 +2882,7 @@ from previous breakpoint list."
          ;; Searching the breakpoints
          ;; In IDL 5.5, the breakpoint reporting format changed.
          (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)")
-         (bp-re55 "^\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\(Uncompiled\\|Func=\\|Pro=\\)\\(\\S-+\\)?\\s-+\\(\\S-+\\)")
+         (bp-re55 "^\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\(Uncompiled\\|Func=\\|Pro=\\)\\([a-zA-Z][a-zA-Z0-9$_:]*\\)\\(,[^\n]*\n\\)?\\s-+\\(\\S-+\\)")
          file line index module 
          bp-re indmap)
       (setq idlwave-shell-bp-alist (list nil))
@@ -2774,7 +2894,7 @@ from previous breakpoint list."
             (if (re-search-forward 
                  "^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t)
                 (setq bp-re bp-re55    ; versions >= 5.5
-                      indmap '(1 4 2 5))))
+                      indmap '(1 4 2 6))))
        ;; There seems to be a breakpoint listing here.
        ;; Parse breakpoint lines.
        ;; Breakpoints have the form 
@@ -2844,8 +2964,8 @@ Otherwise return the filename in bp."
 The breakpoint will be placed at the beginning of the statement on the
 line specified by BP or at the next IDL statement if that line is not
 a statement.
-Determines IDL's internal representation for the breakpoint, which may
-have occurred at a different line than used with the breakpoint
+Determines IDL's internal representation for the breakpoint which may
+have occured at a different line then used with the breakpoint
 command."
   
   ;; Get and save the old breakpoints
@@ -2878,6 +2998,9 @@ only after reaching the statement count times."
                ",/once")
               ((> arg 1)
                (format ",after=%d" arg))))
+       (condition (idlwave-shell-bp-get bp 'condition))
+       (key (concat key 
+                   (if condition (concat ",CONDITION=\"" condition "\""))))
        (line (idlwave-shell-bp-get bp 'line)))
     (idlwave-shell-send-command
      (concat "breakpoint,'" 
@@ -2888,8 +3011,8 @@ only after reaching the statement count times."
      `(progn
        (if (idlwave-shell-set-bp-check (quote ,bp))
            (idlwave-shell-set-bp3 (quote ,bp))))
-     ;; do not hide output 
-     nil
+     ;; hide output?
+     (idlwave-shell-hide-p 'breakpoint)
      'preempt)))
 
 (defun idlwave-shell-set-bp3 (bp)
@@ -3075,21 +3198,21 @@ handled by this command."
                       (t (error "Unknown action %s" action)))
                 idlwave-shell-last-save-and-action-file)
         'idlwave-shell-maybe-update-routine-info
-        nil)
+        (idlwave-shell-hide-p 'run))
        (idlwave-shell-bp-query))
     (let ((msg (format "No such file %s" 
                       idlwave-shell-last-save-and-action-file)))
       (setq idlwave-shell-last-save-and-action-file nil)
       (error msg))))
 
-(defun idlwave-shell-maybe-update-routine-info ()
+(defun idlwave-shell-maybe-update-routine-info (&optional wait)
   "Update the routine info if the shell is not stopped at an error."
   (if (and (not idlwave-shell-is-stopped)
           (or (eq t idlwave-auto-routine-info-updates)
               (memq 'compile-buffer idlwave-auto-routine-info-updates))
           idlwave-query-shell-for-routine-info
           idlwave-routines)
-    (idlwave-shell-update-routine-info t)))
+      (idlwave-shell-update-routine-info t nil 'wait)))
 
 (defvar idlwave-shell-sources-query "help,/source,/full"
   "IDL command to obtain source files for compiled procedures.")
@@ -3161,7 +3284,6 @@ list elements of the form:
                 ))))
       (cdr al))))
 
-
 (defun idlwave-shell-clear-all-bp ()
   "Remove all breakpoints in IDL."
   (interactive)
@@ -3235,7 +3357,9 @@ Otherwise, just expand the file name."
 (define-key idlwave-shell-mode-map "\M-\t"    'idlwave-shell-complete)
 (define-key idlwave-shell-mode-map "\C-c\C-s" 'idlwave-shell)
 (define-key idlwave-shell-mode-map "\C-c?"    'idlwave-routine-info)
+(define-key idlwave-shell-mode-map "\C-g"     'idlwave-keyboard-quit)
 (define-key idlwave-shell-mode-map "\M-?"     'idlwave-context-help)
+(define-key idlwave-shell-mode-map [(control meta ?\?)] 'idlwave-online-help)
 (define-key idlwave-shell-mode-map "\C-c\C-i" 'idlwave-update-routine-info)
 (define-key idlwave-shell-mode-map "\C-c\C-y" 'idlwave-shell-char-mode-loop)
 (define-key idlwave-shell-mode-map "\C-c\C-x" 'idlwave-shell-send-char)
@@ -3526,5 +3650,4 @@ static char * file[] = {
 
 (if idlwave-shell-use-toolbar
     (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere))
-
 ;;; idlw-shell.el ends here
index 0ad1a3b24ce94a561adb3d2417bac75df0340392..651d1bafd2a7a101ff256a37154ef2985b1a616c 100644 (file)
@@ -3,7 +3,7 @@
 
 ;; Author: Carsten Dominik <dominik@astro.uva.nl>
 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
-;; Version: 4.14
+;; Version: 4.15
 ;; Date: $Date: 2002/06/14 19:06:16 $
 ;; Keywords: processes
 
index 7cefcf195085a68da97fea72c2821e0ac82038f6..b9fcd83cb4f7e5d0ef09ca7e9a4d3823e7566498 100644 (file)
@@ -1,11 +1,11 @@
-;;; idlwave.el --- IDL and WAVE CL editing mode for GNU Emacs
+;;; idlwave.el --- IDL editing mode for GNU Emacs
 ;; Copyright (c) 1999, 2000, 2001,2002 Free Software Foundation
 
 ;; Author: Carsten Dominik <dominik@astro.uva.nl>
 ;;         Chris Chase <chase@att.com>
 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
-;; Version: 4.14
-;; Date: $Date: 2002/08/30 11:02:31 $
+;; Version: 4.15
+;; Date: $Date: 2002/09/12 16:31:50 $
 ;; Keywords: languages
 
 ;; This file is part of GNU Emacs.
@@ -57,7 +57,7 @@
 ;; SOURCE
 ;; ======
 ;;
-;; The newest version of this file is available from the maintainers
+;; The newest version of this file is available from the maintainer's
 ;; Webpage.
 ;;
 ;;   http://idlwave.org
 ;;    Simon Marshall <Simon.Marshall@esrin.esa.it>
 ;;    Laurent Mugnier <mugnier@onera.fr>
 ;;    Lubos Pochman <lubos@rsinc.com>
+;;    Bob Portmann <portmann@al.noaa.gov>
 ;;    Patrick M. Ryan <pat@jaameri.gsfc.nasa.gov>
 ;;    Marty Ryba <ryba@ll.mit.edu>
 ;;    Phil Williams <williams@irc.chmcc.org>
-;;    J.D. Smith <jdsmith@astrosun.tn.cornell.edu>
 ;;    Phil Sterne <sterne@dublin.llnl.gov>
 ;;
 ;; CUSTOMIZATION:
 ;; =============
 ;;
-;; IDLWAVE has customize support - so if you want to learn about the
-;;  variables which control the behavior of the mode, use
+;; IDLWAVE has extensive customize support - so if you want to learn
+;; about the variables which control the behavior of the mode, use
 ;; `M-x idlwave-customize'.
 ;;
 ;; You can set your own preferred values with Customize, or with Lisp
 ;; code in .emacs.  For an example of what to put into .emacs, check
-;; the TexInfo documentation.
+;; the TexInfo documentation or see a complete .emacs at
+;; http://idlwave.org.
 ;;
 ;; KNOWN PROBLEMS:
 ;; ==============
 ;;
+;;   IDLWAVE support for the IDL-derived PV-WAVE CL language of Visual
+;;   Numerics, Inc. is growing less and less complete as the two
+;;   languages grow increasingly apart.  The mode probably shouldn't
+;;   even have "WAVE" in it's title, but it's catchy, and required to
+;;   avoid conflict with the CORBA idl.el mode.  Caveat WAVEor.
+;;
 ;;   Moving the point backwards in conjunction with abbrev expansion
 ;;   does not work as I would like it, but this is a problem with
 ;;   emacs abbrev expansion done by the self-insert-command.  It ends
 ;;   limited to comments only and occurs only when a comment
 ;;   paragraph is filled via `idlwave-fill-paragraph'.
 ;;
-;;   "&" is ignored when parsing statements.
 ;;   Avoid muti-statement lines (using "&") on block begin and end
 ;;   lines.  Multi-statement lines can mess up the formatting, for
 ;;   example, multiple end statements on a line: endif & endif.
 ;;   Using "&" outside of block begin/end lines should be okay.
 ;;
-;;   It is possible that the parser which decides what to complete has
-;;   problems with pointer dereferencing statements.  I don't use
-;;   pointers often enough to find out - please report any problems.
+;;   Determining the expression at point for printing and other
+;;   examination commands is somewhat rough: currently only fairly
+;;   simple entities are found.  You can always drag-select or examine
+;;   a region.
 ;;
 ;;   When forcing completion of method keywords, the initial
 ;;   query for a method has multiple entries for some methods.  Would
@@ -653,17 +660,18 @@ class info listed.  See `idlwave-completion-show-classes'."
 When IDLWAVE tries to complete object-oriented methods, it usually
 cannot determine the class of a given object from context.  In order
 to provide the user with a correct list of methods or keywords, it
-needs have to determine the appropriate class.  IDLWAVE has two ways
-to deal with this problem.
-
-1. One possibility is to combine the items of all available classes
-   which contain this method for the purpose of completion.  So when
-   completing a method, all methods of all known classes are
-   available, and when completing a keyword, all keywords allowed for
-   this method in any class are shown.  This behavior is very much
-   like normal completion and is therefore the default.  It works much
-   better than one might think - only for the INIT, GETPROPERTY and
-   SETPROPERTY the keyword lists become uncomfortably long.  See also
+needs to determine the appropriate class.  IDLWAVE has two ways of
+doing this (well, three ways if you count the shell... see
+`idlwave-shell-query-for-class'):
+
+1. Combine the items of all available classes which contain this
+   method for the purpose of completion.  So when completing a method,
+   all methods of all known classes are available, and when completing
+   a keyword, all keywords allowed for this method in any class are
+   shown.  This behavior is very much like normal completion and is
+   therefore the default.  It works much better than one might think -
+   only for the INIT, GETPROPERTY and SETPROPERTY the keyword lists
+   become uncomfortably long.  See also
    `idlwave-completion-show-classes'.
 
 2. The second possibility is to ask the user on each occasion.  To
@@ -1156,38 +1164,39 @@ As a user, you should not set this to t.")
 (defconst idlwave-font-lock-keywords-3 nil
   "Gaudy level highlighting for IDLWAVE mode.")
 
+;; The following are the reserved words in IDL.  Maybe we should
+;; highlight some more stuff as well?       
+;; Procedure declarations.  Fontify keyword plus procedure name.
+(defvar idlwave-idl-keywords
+  ;; To update this regexp, update the list of keywords and 
+  ;; evaluate the form.
+  ;;   (insert 
+  ;;    (prin1-to-string
+  ;;     (concat 
+  ;;      "\\<\\("
+  ;;      (regexp-opt 
+  ;;       '("and" "or" "xor" "not"
+  ;;         "eq" "ge" "gt" "le" "lt" "ne" 
+  ;;         "for" "do" "endfor"
+  ;;         "if" "then" "endif" "else" "endelse" 
+  ;;         "case" "of" "endcase"
+  ;;         "switch" "break" "continue" "endswitch"
+  ;;         "begin" "end"
+  ;;         "repeat" "until" "endrep"
+  ;;         "while" "endwhile" 
+  ;;         "goto" "return"
+  ;;         "inherits" "mod"
+  ;;         "compile_opt" "forward_function"
+  ;;         "on_error" "on_ioerror"))  ; on_error is not officially reserved
+  ;;      "\\)\\>")))
+  "\\<\\(and\\|b\\(egin\\|reak\\)\\|c\\(ase\\|o\\(mpile_opt\\|ntinue\\)\\)\\|do\\|e\\(lse\\|nd\\(case\\|else\\|for\\|if\\|rep\\|switch\\|while\\)?\\|q\\)\\|for\\(ward_function\\)?\\|g\\(oto\\|[et]\\)\\|i\\(f\\|nherits\\)\\|l[et]\\|mod\\|n\\(e\\|ot\\)\\|o\\(n_\\(error\\|ioerror\\)\\|[fr]\\)\\|re\\(peat\\|turn\\)\\|switch\\|then\\|until\\|while\\|xor\\)\\>")
+
 (let* ((oldp (or (string-match "Lucid" emacs-version)
                 (not (boundp 'emacs-minor-version))
                 (and (<= emacs-major-version 19) 
                      (<= emacs-minor-version 29))))
-
-       ;; The following are the reserved words in IDL.  Maybe we should
-       ;; highlight some more stuff as well?       
-       (idl-keywords
-       ;; To update this regexp, update the list of keywords and 
-       ;; evaluate the form.
-;      (insert 
-;       (prin1-to-string
-;        (concat 
-;         "\\<\\("
-;         (regexp-opt 
-;          '("and" "or" "xor" "not"
-;            "eq" "ge" "gt" "le" "lt" "ne" 
-;            "for" "do" "endfor"
-;            "if" "then" "endif" "else" "endelse" 
-;            "case" "of" "endcase"
-;            "switch" "break" "continue" "endswitch"
-;            "begin" "end"
-;            "repeat" "until" "endrep"
-;            "while" "endwhile" 
-;            "goto" "return"
-;            "inherits" "mod"
-;            "compile_opt" "forward_function"
-;            "on_error" "on_ioerror"))  ; on_error is not officially reserved
-;         "\\)\\>")))
-
-       "\\<\\(and\\|b\\(egin\\|reak\\)\\|c\\(ase\\|o\\(mpile_opt\\|ntinue\\)\\)\\|do\\|e\\(lse\\|nd\\(case\\|else\\|for\\|if\\|rep\\|switch\\|while\\)?\\|q\\)\\|for\\(ward_function\\)?\\|g\\(oto\\|[et]\\)\\|i\\(f\\|nherits\\)\\|l[et]\\|mod\\|n\\(e\\|ot\\)\\|o\\(n_\\(error\\|ioerror\\)\\|[fr]\\)\\|re\\(peat\\|turn\\)\\|switch\\|then\\|until\\|while\\|xor\\)\\>")
-
+       
+       (idl-keywords idlwave-idl-keywords)
        ;; Procedure declarations.  Fontify keyword plus procedure name.
        ;; Function  declarations.  Fontify keyword plus function  name.
        (pros-and-functions
@@ -1268,7 +1277,6 @@ As a user, you should not set this to t.")
   ;; The following lines are just a dummy to make the compiler shut up
   ;; about variables bound but not used.
   (setq oldp oldp
-       idl-keywords idl-keywords
        pros-and-functions pros-and-functions
        common-blocks common-blocks
        batch-files batch-files
@@ -1294,7 +1302,7 @@ As a user, you should not set this to t.")
   (setq idlwave-font-lock-keywords-3 
        (list pros-and-functions
              batch-files
-             idl-keywords
+             idlwave-idl-keywords
              label goto
              structtag
              structname
@@ -1437,7 +1445,7 @@ Normally a space.")
   "Character which is inserted as a last character on previous line by
    \\[idlwave-split-line] to begin a continuation line.  Normally $.")
 
-(defconst idlwave-mode-version " 4.14")
+(defconst idlwave-mode-version " 4.15")
 
 (defmacro idlwave-keyword-abbrev (&rest args)
   "Creates a function for abbrev hooks to call `idlwave-check-abbrev' with args."
@@ -1492,29 +1500,13 @@ Otherwise ARGS forms a list that is evaluated."
   (copy-syntax-table idlwave-mode-syntax-table)
   "Syntax table that treats symbol characters as word characters.")
 
-(modify-syntax-entry ?$   "w"  idlwave-find-symbol-syntax-table)
-(modify-syntax-entry ?_   "w"  idlwave-find-symbol-syntax-table)
-
-(defmacro idlwave-with-special-syntax (&rest body)
-  "Execute BODY with a different systax table."
-  `(let ((saved-syntax (syntax-table)))
-     (unwind-protect
-        (progn
-          (set-syntax-table idlwave-find-symbol-syntax-table)
-          ,@body)
-       (set-syntax-table saved-syntax))))
-
-(defvar idlwave-print-symbol-syntax-table
-  (copy-syntax-table idlwave-mode-syntax-table)
-  "Syntax table that treats symbol characters as word characters.")
-
 (modify-syntax-entry ?$   "w"  idlwave-find-symbol-syntax-table)
 (modify-syntax-entry ?_   "w"  idlwave-find-symbol-syntax-table)
 (modify-syntax-entry ?!   "w"  idlwave-find-symbol-syntax-table)
 (modify-syntax-entry ?.   "w"  idlwave-find-symbol-syntax-table)
 
-(defmacro idlwave-with-special-syntax1 (&rest body)
-  "Execute BODY with a different systax table."
+(defmacro idlwave-with-special-syntax (&rest body)
+  "Execute BODY with a different syntax table."
   `(let ((saved-syntax (syntax-table)))
      (unwind-protect
         (progn
@@ -1522,6 +1514,15 @@ Otherwise ARGS forms a list that is evaluated."
           ,@body)
        (set-syntax-table saved-syntax))))
 
+;(defmacro idlwave-with-special-syntax1 (&rest body)
+;  "Execute BODY with a different syntax table."
+;  `(let ((saved-syntax (syntax-table)))
+;     (unwind-protect
+;        (progn
+;          (set-syntax-table idlwave-find-symbol-syntax-table)
+;          ,@body)
+;      (set-syntax-table saved-syntax))))
+
 (defun idlwave-action-and-binding (key cmd &optional select)
   "KEY and CMD are made into a key binding and an indent action.
 KEY is a string - same as for the `define-key' function.  CMD is a
@@ -1576,6 +1577,7 @@ Capitalize system variables - action only
 ;(define-key idlwave-mode-map "\C-c\C- " 'idlwave-hard-tab)
 (define-key idlwave-mode-map "'"        'idlwave-show-matching-quote)
 (define-key idlwave-mode-map "\""       'idlwave-show-matching-quote)
+(define-key idlwave-mode-map "\C-g"     'idlwave-keyboard-quit)
 (define-key idlwave-mode-map "\C-c;"    'idlwave-toggle-comment-region)
 (define-key idlwave-mode-map "\C-\M-a"  'idlwave-beginning-of-subprogram)
 (define-key idlwave-mode-map "\C-\M-e"  'idlwave-end-of-subprogram)
@@ -1593,7 +1595,7 @@ Capitalize system variables - action only
 (define-key idlwave-mode-map "\C-c\C-n" 'idlwave-next-statement)
 ;; (define-key idlwave-mode-map "\r"       'idlwave-newline)
 ;; (define-key idlwave-mode-map "\t"       'idlwave-indent-line)
-(define-key idlwave-mode-map (kbd "S-<iso-lefttab>") 'idlwave-indent-statement)
+(define-key idlwave-mode-map [(shift tab)] 'idlwave-indent-statement)
 (define-key idlwave-mode-map "\C-c\C-a" 'idlwave-auto-fill-mode)
 (define-key idlwave-mode-map "\M-q"     'idlwave-fill-paragraph)
 (define-key idlwave-mode-map "\M-s"     'idlwave-edit-in-idlde)
@@ -1637,6 +1639,7 @@ Capitalize system variables - action only
 (define-key idlwave-mode-map "\C-c\C-v"   'idlwave-find-module)
 (define-key idlwave-mode-map "\C-c?"      'idlwave-routine-info)
 (define-key idlwave-mode-map "\M-?"       'idlwave-context-help)
+(define-key idlwave-mode-map [(control meta ?\?)] 'idlwave-online-help)
 (define-key idlwave-mode-map [(meta tab)] 'idlwave-complete)
 (define-key idlwave-mode-map "\C-c\C-i"   'idlwave-update-routine-info)
 (define-key idlwave-mode-map "\C-c="      'idlwave-resolve)
@@ -1965,7 +1968,7 @@ The main features of this mode are
        "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$")
   (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]")
   (set (make-local-variable 'paragraph-ignore-fill-prefix) nil)
-  (set (make-local-variable 'parse-sexp-ignore-comments) nil)
+  (set (make-local-variable 'parse-sexp-ignore-comments) t)
   
   ;; Set tag table list to use IDLTAGS as file name.
   (if (boundp 'tag-table-alist)
@@ -2134,18 +2137,33 @@ An END token must be preceded by whitespace."
   "Finds the start of current block and blinks to it for a second.
 Also checks if the correct end statement has been used."
   ;; All end statements are reserved words
-  (let* ((pos (point))
-        end end1)
+  ;; Re-indent end line
+  (insert-char ?\ 1) ;; So indent, etc. work well
+  (backward-char 1)
+  (let* ((pos (point-marker))
+        (last-abbrev-marker (copy-marker last-abbrev-location))
+        (eol-pos (save-excursion (end-of-line) (point)))
+        begin-pos end-pos end end1 )
+    (if idlwave-reindent-end  (idlwave-indent-line))
+    
     (when (and (idlwave-check-abbrev 0 t)
               idlwave-show-block)
       (save-excursion
        ;; Move inside current block
-       (setq end (buffer-substring 
-                  (save-excursion (skip-chars-backward "a-zA-Z")
-                                  (point))
-                  (point)))
-       (idlwave-beginning-of-statement)
+       (goto-char last-abbrev-marker)
        (idlwave-block-jump-out -1 'nomark)
+       (setq begin-pos (point))
+       (idlwave-block-jump-out 1 'nomark)
+       (setq end-pos (point))
+       (if (> end-pos eol-pos)
+           (setq end-pos pos))
+       (goto-char end-pos)
+       (setq end (buffer-substring 
+                  (progn
+                    (skip-chars-backward "a-zA-Z")
+                    (point))
+                  end-pos))
+       (goto-char begin-pos)
        (when (setq end1 (cdr (idlwave-block-master)))
          (cond
           ((null end1)) ; no-operation
@@ -2165,9 +2183,7 @@ Also checks if the correct end statement has been used."
            (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" 
                     end1 end)
            (sit-for 1)))))))
-  ;; Re-indent end line
-  (if idlwave-reindent-end
-      (idlwave-indent-line)))
+  (delete-char 1))
 
 (defun idlwave-block-master ()
   (let ((case-fold-search t))
@@ -2588,6 +2604,14 @@ If not in a statement just moves to end of line. Returns position."
                        (looking-at "^@")))))
     last-statement))
 
+(defun idlwave-skip-multi-commands (&optional lim)
+  "Skip past multiple commands on a line (with `&')."
+  (let ((save-point (point)))
+    (when (re-search-forward ".*&" lim t)
+      (goto-char (match-end 0))
+      (if (idlwave-in-quote) (goto-char save-point)))
+    (point)))
+
 (defun idlwave-skip-label-or-case ()
   "Skip label or case statement element.
 Returns position after label.
@@ -2627,6 +2651,7 @@ substatement."
         st nst last)
     (idlwave-beginning-of-statement)
     (idlwave-skip-label-or-case)
+    (idlwave-skip-multi-commands orig)
     (setq last (point))
     ;; Continue looking for substatements until we are past orig
     (while (and (<= (point) orig) (not (eobp)))
@@ -2656,7 +2681,8 @@ list not just the type symbol. Returns nil if not an identifiable
 statement."
   (save-excursion
     ;; Skip whitespace within a statement which is spaces, tabs, continuations
-    (while (looking-at "[ \t]*\\<\\$")
+    ;; and possibly comments
+    (while (looking-at "[ \t]*\\$")
       (forward-line 1))
     (skip-chars-forward " \t")
     (let ((st idlwave-statement-match)
@@ -2757,13 +2783,16 @@ If the optional argument EXPAND is non-nil then the actions in
           ;; indent the line
           (idlwave-indent-left-margin (idlwave-calculate-indent)))
         ;; Adjust parallel comment
-        (end-of-line)
-        (if (idlwave-in-comment)
-            (indent-for-comment))))
+       (end-of-line)
+       (if (idlwave-in-comment)
+           ;; Emacs 21 is too smart with fill-column on comment indent
+           (let ((fill-column (if (fboundp 'comment-indent-new-line)
+                                  (1- (frame-width))
+                                fill-column)))
+             (indent-for-comment)))))
     (goto-char mloc)
     ;; Get rid of marker
-    (set-marker mloc nil)
-    ))
+    (set-marker mloc nil)))
 
 (defun idlwave-do-action (action)
   "Perform an action repeatedly on a line.
@@ -2895,7 +2924,12 @@ statement if this statement is a continuation of the previous line."
            (case-fold-search t)
            (end-reg (progn (beginning-of-line) (point)))
            (close-exp (progn (skip-chars-forward " \t") (looking-at "\\s)")))
-           (beg-reg (progn (idlwave-previous-statement) (point)))
+;           (beg-reg (progn (idlwave-previous-statement) (point)))
+           (beg-reg (progn ;; Use substatement indent unless it's this line
+                     (idlwave-start-of-substatement 'pre) 
+                     (if (eq (line-beginning-position) end-reg)
+                         (idlwave-previous-statement))
+                     (point)))
           (cur-indent (idlwave-current-indent))
           (else-cont (and (goto-char end-reg) (looking-at "[ \t]*else")))
           (basic-indent           ;; The basic, non-fancy indent
@@ -2908,7 +2942,7 @@ statement if this statement is a continuation of the previous line."
              (cond
               ;; A continued Procedure call or definition
               ((progn
-                 (idlwave-look-at "\\(pro\\|function\\)")
+                 (idlwave-look-at "^[ \t]*\\(pro\\|function\\)") ;skip over
                  (looking-at "[ \t]*\\([a-zA-Z0-9$_]+[ \t]*->[ \t]*\\)?[a-zA-Z][:a-zA-Z0-9$_]*[ \t]*\\(,\\)[ \t]*"))
                (goto-char (match-end 0))
                ;; Comment only, or blank line with "$"?  Align with ,
@@ -2917,7 +2951,7 @@ statement if this statement is a continuation of the previous line."
                (current-column))
 
               ;; Continued assignment (with =), 
-              ((looking-at "[ \t]*[a-zA-Z0-9$_]+[ \t]*\\(=\\)[ \t]*")
+              ((looking-at "[ \t]*[][().a-zA-Z0-9$_]+[ \t]*\\(=\\)[ \t]*")
                (goto-char (match-end 0))
                ;; Comment only?  Align with =
                (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$"))
@@ -3574,6 +3608,18 @@ constants - a double quote followed by an octal digit."
       ;; return string beginning position or nil
       (if (> start bq) bq))))
 
+(defun idlwave-is-pointer-dereference (&optional limit)
+  "Determines if the character after point is a pointer dereference *."
+  (let ((pos (point)))
+    (and
+     (eq (char-after) ?\*)
+     (not (idlwave-in-quote))
+     (save-excursion
+       (forward-char)
+       (re-search-backward (concat "\\(" idlwave-idl-keywords 
+                                  "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t)))))
+
+
 ;; Statement templates
 
 ;; Replace these with a general template function, something like
@@ -3951,7 +3997,7 @@ blank lines."
 ;; "sinterned" strings.  The only exception is that the functions
 ;; which scan whole buffers for routine information do not intern the
 ;; grabbed strings.  This is only done afterwards.  Therefore in these 
-;; functions it is *not* save to assume the strings can be compared
+;; functions it is *not* safe to assume the strings can be compared
 ;; with `eq' and be fed into the routine assq functions.
 
 ;; Here we define the hashing functions.
@@ -4542,7 +4588,7 @@ With three prefix args, dispatch asynchronous process to do the update."
        (goto-char (point-min))
        (while (re-search-forward 
                "^[ \t]*\\(pro\\|function\\)[ \t]" nil t)
-         (setq string (buffer-substring 
+         (setq string (buffer-substring-no-properties
                        (match-beginning 0)
                        (progn 
                          (idlwave-end-of-statement)
@@ -5016,7 +5062,7 @@ end
 
 (defvar idlwave-shell-temp-pro-file)
 (defvar idlwave-shell-temp-rinfo-save-file)
-(defun idlwave-shell-update-routine-info (&optional quiet run-hooks)
+(defun idlwave-shell-update-routine-info (&optional quiet run-hooks preempt)
   "Query the shell for routine_info of compiled modules and update the lists."
   ;; Save and compile the procedure.  The compiled procedure is then
   ;; saved into an IDL SAVE file, to allow for fast RESTORE.
@@ -5048,7 +5094,7 @@ end
    `(progn
       (idlwave-shell-routine-info-filter)
       (idlwave-concatenate-rinfo-lists ,quiet ,run-hooks))
-   'hide))
+   'hide preempt))
 
 ;; ---------------------------------------------------------------------------
 ;;
@@ -5127,7 +5173,7 @@ When we force a method or a method keyword, CLASS can specify the class."
 
      ;; Check for any special completion functions
      ((and idlwave-complete-special
-          (idlwave-complete-special)))
+          (idlwave-call-special idlwave-complete-special)))
 
      ((and (idlwave-in-quote)
           (not (eq what 'class)))
@@ -5156,7 +5202,9 @@ When we force a method or a method keyword, CLASS can specify the class."
         (format "Select a %s name%s"
                 isa
                 (if class-selector
-                    (format " (class is %s)" class-selector)
+                    (format " (class is %s)" 
+                            (if (eq class-selector t) 
+                                "unknown" class-selector))
                   ""))
         isa
         'idlwave-attach-method-classes)))
@@ -5177,7 +5225,9 @@ When we force a method or a method keyword, CLASS can specify the class."
         (format "Select a %s name%s"
                 isa
                 (if class-selector
-                    (format " (class is %s)" class-selector)
+                    (format " (class is %s)" 
+                            (if (eq class-selector t)
+                                "unknown" class-selector))
                   ""))
         isa
         'idlwave-attach-method-classes)))
@@ -5264,13 +5314,14 @@ use `idlwave-complete-in-buffer' to do some completion and return `t'.
 If such a function returns `t', *no further* attempts to complete
 other contexts will be done.  If the function returns `nil', other completions
 will be tried.")
-(defun idlwave-complete-special ()
-  (let ((functions idlwave-complete-special)
-       fun)
+
+(defun idlwave-call-special (functions &rest args)
+  (let ((funcs functions)
+       fun ret)
     (catch 'exit
-      (while (setq fun (pop functions))
-       (if (funcall fun)
-           (throw 'exit t)))
+      (while (setq fun (pop funcs))
+       (if (setq ret (apply fun args))
+           (throw 'exit ret)))
       nil)))
 
 (defun idlwave-make-force-complete-where-list (what &optional module class)
@@ -5522,14 +5573,18 @@ INFO is as returned by idlwave-what-function or -procedure."
        (save-excursion (goto-char apos)
                        (looking-at "->[a-zA-Z][a-zA-Z0-9$_]*::")))))
 
+(defvar idlwave-determine-class-special nil
+  "List of special functions for determining class.
+Must accept two arguments: `apos' and `info'")
+
 (defun idlwave-determine-class (info type)
-  ;; Determine the class of a routine call.  INFO is the structure returned
-  ;; `idlwave-what-function' or `idlwave-what-procedure'.
-  ;; The third element in this structure is the class.  When nil, we return nil.
-  ;; When t, try to get the class from text properties at the arrow.  When
-  ;; the object is "self", we use the class of the current routine.
-  ;; otherwise prompt the user for a class name.  Also stores the selected
-  ;; class as a text property at the arrow.
+  ;; Determine the class of a routine call.  
+  ;; INFO is the `cw-list' structure as returned by idlwave-where.
+  ;; The second element in this structure is the class.  When nil, we
+  ;; return nil.  When t, try to get the class from text properties at
+  ;; the arrow.  When the object is "self", we use the class of the
+  ;; current routine.  otherwise prompt the user for a class name.
+  ;; Also stores the selected class as a text property at the arrow.
   ;; TYPE is 'fun or 'pro.
   (let* ((class (nth 2 info))
         (apos (nth 3 info))
@@ -5550,7 +5605,7 @@ INFO is as returned by idlwave-what-function or -procedure."
                               (let ((case-fold-search t))
                                 (looking-at "self\\>")))))
         (force-query idlwave-force-class-query)
-        store class-alist)
+        store special-class class-alist)
     (cond
      ((null class) nil)
      ((eq t class)
@@ -5560,9 +5615,20 @@ INFO is as returned by idlwave-what-function or -procedure."
               (not force-query))
          (setq class (get-text-property apos 'idlwave-class)
                class (idlwave-sintern-class class)))
-      (when (and (eq t class)
-                is-self)
-       (setq class (or (nth 2 (idlwave-current-routine)) class)))
+      (if (and (eq t class) is-self)
+         (setq class (or (nth 2 (idlwave-current-routine)) class)))
+
+      ;; Before prompting, try any special class determination routines
+      (when (and (eq t class) 
+                idlwave-determine-class-special
+                (not force-query))
+       (setq special-class 
+             (idlwave-call-special idlwave-determine-class-special apos))
+       (if special-class 
+           (setq class (idlwave-sintern-class special-class)
+                 store idlwave-store-inquired-class)))
+      
+      ;; Prompt for a class, if we need to
       (when (and (eq class t)
                 (or force-query query))
        (setq class-alist 
@@ -5582,11 +5648,17 @@ INFO is as returned by idlwave-what-function or -procedure."
                                                  type (car info))
                                        ""))
                  class-alist nil nil nil 'idlwave-class-history))))))
+
+      ;; Store it, if requested
       (when (and class (not (eq t class)))
        ;; We have a real class here
        (when (and store arrow)
-         (put-text-property apos (+ apos 2) 'idlwave-class class)
-         (put-text-property apos (+ apos 2) 'face idlwave-class-arrow-face))
+         (condition-case ()
+             (add-text-properties 
+              apos (+ apos 2) 
+              `(idlwave-class ,class face ,idlwave-class-arrow-face 
+                              rear-nonsticky t))
+           (error nil)))
        (setf (nth 2 info) class))
       ;; Return the class
       class)
@@ -5678,7 +5750,7 @@ ARROW:  Location of the arrow"
       (setq cw 'function)
       (save-excursion
        (if (re-search-backward "->[ \t]*\\(\\([$a-zA-Z0-9_]+\\)::\\)?[$a-zA-Z0-9_]*\\=" bos t)
-           (setq cw-arrow (match-beginning 0)
+           (setq cw-arrow (copy-marker (match-beginning 0))
                  cw-class (if (match-end 2)
                               (idlwave-sintern-class (match-string 2))
                             t))))))
@@ -5698,8 +5770,8 @@ ARROW:  Location of the arrow"
 
 (defun idlwave-what-function (&optional bound)
   ;; Find out if point is within the argument list of a function.
-  ;; The return value is ("function-name" (point) level).
-  ;; Level is 1 on the to level parenthesis, higher further down.
+  ;; The return value is ("function-name" class arrow-start (point) level).
+  ;; Level is 1 on the top level parentheses, higher further down.
 
   ;; If the optional BOUND is an integer, bound backwards directed
   ;;    searches to this point.
@@ -5728,7 +5800,7 @@ ARROW:  Location of the arrow"
                     pos func-point)
               (if (re-search-backward 
                    "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t)
-                  (setq arrow-start (match-beginning 0)
+                  (setq arrow-start (copy-marker (match-beginning 0))
                         class (or (match-string 2) t)))
               (throw 
                'exit 
@@ -5752,9 +5824,9 @@ ARROW:  Location of the arrow"
       (idlwave-start-of-substatement 'pre)
       (setq string (buffer-substring (point) pos))
       (if (string-match 
-          "\\`\\(.*&\\)?[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string)
-         (setq pro (match-string 2 string)
-               pro-point (+ (point) (match-beginning 2)))
+          "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string)
+         (setq pro (match-string 1 string)
+               pro-point (+ (point) (match-beginning 1)))
        (if (and (idlwave-skip-object)
                 (setq string (buffer-substring (point) pos))
                 (string-match 
@@ -5764,7 +5836,7 @@ ARROW:  Location of the arrow"
                  pro-point (if (match-beginning 4)
                                (+ (point) (match-beginning 4))
                        pos)
-                 arrow-start (+ (point) (match-beginning 1))
+                 arrow-start (copy-marker (+ (point) (match-beginning 1)))
                  class (or (match-string 3 string) t)))))
     (list (idlwave-sintern-routine-or-method pro class)
          (idlwave-sintern-class class)
@@ -5802,7 +5874,6 @@ ARROW:  Location of the arrow"
        (goto-char pos)
       nil)))
   
-
 (defun idlwave-last-valid-char ()
   "Return the last character before point which is not white or a comment
 and also not part of the current identifier.  Since we do this in
@@ -5839,8 +5910,9 @@ This function is not general, can only be used for completion stuff."
 (defun idlwave-complete-in-buffer (type stype list selector prompt isa
                                        &optional prepare-display-function)
   "Perform TYPE completion of word before point against LIST.
-SELECTOR is the PREDICATE argument for the completion function.
-Show PROMPT in echo area.  TYPE is one of 'function, 'procedure or 'keyword."
+SELECTOR is the PREDICATE argument for the completion function.  Show
+PROMPT in echo area.  TYPE is one of 'function, 'procedure,
+'class-tag, or 'keyword."
   (let* ((completion-ignore-case t)
         beg (end (point)) slash part spart completion all-completions
         dpart dcompletion)
@@ -5869,7 +5941,7 @@ Show PROMPT in echo area.  TYPE is one of 'function, 'procedure or 'keyword."
     (cond
      ((null completion)
       ;; nothing available.
-      (error "Can't find %s completion for \"%s\"" isa part))
+      (error (concat prompt ": no completion for \"%s\"") part))
      ((and (not (equal dpart dcompletion))
           (not (eq t completion)))
       ;; We can add something
@@ -5940,24 +6012,24 @@ Show PROMPT in echo area.  TYPE is one of 'function, 'procedure or 'keyword."
     (idlwave-complete-in-buffer 'class 'class (idlwave-class-alist) nil 
                                "Select a class" "class")))
 
-(defun idlwave-attach-classes (list is-kwd show-classes)
+(defun idlwave-attach-classes (list type show-classes)
   ;; Attach the proper class list to a LIST of completion items.
-  ;; IS-KWD, when non-nil, shows its keywords - otherwise its methods
+  ;; TYPE, when 'kwd, shows classes for method keywords, when
+  ;; 'class-tag, for class tags, and otherwise for methods.
   ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'.
-  (catch 'exit
-    (if (or (null show-classes)           ; don't want to see classes
-           (null class-selector)         ; not a method call
-           (and (stringp class-selector) ; the class is already known
-                (not super-classes)))    ; no possibilities for inheritance
-       ;; In these cases, we do not have to do anything
-       (throw 'exit list))
-    
+  (if (or (null show-classes)           ; don't want to see classes
+         (null class-selector)         ; not a method call
+         (and 
+          (stringp class-selector) ; the class is already known
+          (not super-classes)))    ; no possibilities for inheritance
+      ;; In these cases, we do not have to do anything
+      list
     (let* ((do-prop (and (>= show-classes 0)
                         (>= emacs-major-version 21)))
           (do-buf (not (= show-classes 0)))
-          ; (do-dots (featurep 'xemacs))
+          ;; (do-dots (featurep 'xemacs))
           (do-dots t)
-          (inherit (if super-classes
+          (inherit (if (and (not (eq type 'class-tag)) super-classes)
                        (cons class-selector super-classes)))
           (max (abs show-classes))
           (lmax (if do-dots (apply 'max (mapcar 'length list))))
@@ -5965,16 +6037,22 @@ Show PROMPT in echo area.  TYPE is one of 'function, 'procedure or 'keyword."
       (mapcar 
        (lambda (x)
         ;; get the classes
-        (setq classes
-              (if is-kwd 
-                  (idlwave-all-method-keyword-classes
-                   method-selector x type-selector)
-                (idlwave-all-method-classes x type-selector)))
-        (if inherit
-            (setq classes 
-                  (delq nil
-                        (mapcar (lambda (x) (if (memq x inherit) x nil))
-                                classes))))
+        (if (eq type 'class-tag)
+            ;; Just one class for tags
+            (setq classes
+                  (list 
+                   (idlwave-class-or-superclass-with-tag class-selector x)))
+          ;; Multiple classes for method of method-keyword
+          (setq classes
+                (if (eq type 'kwd)
+                    (idlwave-all-method-keyword-classes
+                     method-selector x type-selector)
+                  (idlwave-all-method-classes x type-selector)))
+          (if inherit
+              (setq classes 
+                    (delq nil
+                          (mapcar (lambda (x) (if (memq x inherit) x nil))
+                                  classes)))))
         (setq nclasses (length classes))
         ;; Make the separator between item and class-info
         (if do-dots
@@ -6001,10 +6079,14 @@ Show PROMPT in echo area.  TYPE is one of 'function, 'procedure or 'keyword."
 
 (defun idlwave-attach-method-classes (list)
   ;; Call idlwave-attach-classes with method parameters
-  (idlwave-attach-classes list nil idlwave-completion-show-classes))
+  (idlwave-attach-classes list 'method idlwave-completion-show-classes))
 (defun idlwave-attach-keyword-classes (list)
   ;; Call idlwave-attach-classes with keyword parameters
-  (idlwave-attach-classes list t idlwave-completion-show-classes))
+  (idlwave-attach-classes list 'kwd idlwave-completion-show-classes))
+(defun idlwave-attach-class-tag-classes (list)
+  ;; Call idlwave-attach-classes with class structure tags
+  (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes))
+                                       
 
 ;;----------------------------------------------------------------------
 ;;----------------------------------------------------------------------
@@ -6163,6 +6245,13 @@ sort the list before displaying"
        (remove-text-properties beg (point) '(face nil))))
   (eval idlwave-complete-after-success-form-force))
 
+(defun idlwave-keyboard-quit ()
+  (interactive)
+  (unwind-protect
+      (if (eq (car-safe last-command) 'idlwave-display-completion-list)
+         (idlwave-restore-wconf-after-completion))
+    (keyboard-quit)))
+
 (defun idlwave-restore-wconf-after-completion ()
   "Restore the old (before completion) window configuration."
   (and idlwave-completion-restore-window-configuration
@@ -6215,7 +6304,7 @@ sort the list before displaying"
                                    (setq this-command last-command)))
     new-map))
 
-;; In Emacs we also to replace choose keybindings in the completion
+;; In Emacs we also replace keybindings in the completion
 ;; map in order to install our wrappers.
 
 (defun idlwave-display-completion-list-emacs (list)
@@ -6271,14 +6360,23 @@ Point is expected just before the opening `{' of the struct definition."
           (end (cdr borders))
           tags)
       (goto-char beg)
-      (while (re-search-forward "[{,][ \t]*\\(\\$.*\n[ \t]*\\)?\\([a-zA-Z][a-zA-Z0-9_]*\\)[ \t]*:" end t)
+      (while (re-search-forward "[{,][ \t]*\\(\\$.*\n\\(^[ \t]*\\(\\$[ \t]*\\)?\\(;.*\\)?\n\\)*[ \t]*\\)?\\([a-zA-Z][a-zA-Z0-9_]*\\)[ \t]*:" end t)
        ;; Check if we are still on the top level of the structure.
        (if (and (condition-case nil (progn (up-list -1) t) (error nil))
                 (= (point) beg))
-           (push (match-string 2) tags))
+           (push (match-string 5) tags))
        (goto-char (match-end 0)))
       (nreverse tags))))
 
+(defun idlwave-find-struct-tag (tag)
+  "Find a given TAG in the structure defined at point."
+  (let* ((borders (idlwave-struct-borders))
+        (beg (car borders))
+        (end (cdr borders))
+        (case-fold-search t))
+    (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") 
+                      end t)))
+
 (defun idlwave-struct-inherits ()
   "Return a list of all `inherits' names in the struct at point.
 Point is expected just before the opening `{' of the struct definition."
@@ -6324,7 +6422,7 @@ If NAME is non-nil, search for a named structure NAME.  If BOUND is an
 integer, limit the search.  If BOUND is the symbol `all', we search
 first back and then forward through the entire file.  If BOUND is the
 symbol `back' we search only backward."
-  (let* ((ws "[ \t]*\\(\\$.*\n[ \t]*\\)?")
+  (let* ((ws "[ \t]*\\(\\$.*\n[ \t]*\\)*")
         (case-fold-search t)
         (lim (if (integerp bound) bound nil))
         (re (concat
@@ -6372,6 +6470,13 @@ symbol `back' we search only backward."
        (setcdr inherits (mapcar (lambda (x) (idlwave-sintern-class x 'set))
                                 (cdr inherits))))))
 
+(defun idlwave-find-class-definition (class)
+  (let ((case-fold-search t))
+    (if (re-search-forward
+        (concat "^[ \t]*pro[ \t]+" (downcase class) "__define" "\\>") nil t)
+       ;; FIXME: should we limit to end of pro here?
+       (idlwave-find-structure-definition nil class))))
+
 (defun idlwave-find-class-info (class)
   "Find the __define procedure for a class structure and return info entry."
   (let* ((pro (concat (downcase class) "__define"))
@@ -6394,14 +6499,10 @@ symbol `back' we search only backward."
          (insert-file-contents file))
        (save-excursion
          (goto-char 1)
-         (setq case-fold-search t)
-         (when (and (re-search-forward
-                     (concat "^[ \t]*pro[ \t]+" pro "\\>") nil t)
-                    ;; FIXME: should we limit to end of pro here?
-                    (idlwave-find-structure-definition nil class))
-           (list class
-                 (cons 'tags (idlwave-struct-tags))
-                 (cons 'inherits (idlwave-struct-inherits)))))))))
+         (if (idlwave-find-class-definition class)
+             (list class
+                   (cons 'tags (idlwave-struct-tags))
+                   (cons 'inherits (idlwave-struct-inherits)))))))))
 
 (defun idlwave-class-tags (class)
   "Return the native tags in CLASS."
@@ -6412,8 +6513,13 @@ symbol `back' we search only backward."
 
 (defun idlwave-all-class-tags (class)
   "Return a list of native and inherited tags in CLASS."
-  (apply 'append (mapcar 'idlwave-class-tags
-                        (cons class (idlwave-all-class-inherits class)))))
+  (condition-case err
+      (apply 'append (mapcar 'idlwave-class-tags
+                            (cons class (idlwave-all-class-inherits class))))
+    (error           
+     (idlwave-class-tag-reset)
+     (error "%s" (error-message-string err)))))
+
 
 (defun idlwave-all-class-inherits (class)
   "Return a list of all superclasses of CLASS (recursively expanded).
@@ -6427,12 +6533,21 @@ The list is cached in `idlwave-class-info' for faster access."
          entry)
       (if (setq entry (assq 'all-inherits info))
          (cdr entry)
-       (let ((inherits (idlwave-class-inherits class))
+       ;; Save the depth of inheritance scan to check for circular references
+       (let ((inherits (mapcar (lambda (x) (cons x 0))
+                               (idlwave-class-inherits class)))
              rtn all-inherits cl)
          (while inherits
            (setq cl (pop inherits)
-                 rtn (cons cl rtn)
-                 inherits (append inherits (idlwave-class-inherits cl))))
+                 rtn (cons (car cl) rtn)
+                 inherits (append (mapcar (lambda (x)
+                                            (cons x (1+ (cdr cl))))
+                                          (idlwave-class-inherits (car cl)))
+                                  inherits))
+           (if (> (cdr cl) 999)
+             (error
+              "Class scan: inheritance depth exceeded. Circular inheritance?")
+             ))
          (setq all-inherits (nreverse rtn))
          (nconc info (list (cons 'all-inherits all-inherits)))
          all-inherits))))))
@@ -6446,10 +6561,10 @@ The list is cached in `idlwave-class-info' for faster access."
 (defvar idlwave-current-tags-class nil)
 (defvar idlwave-current-class-tags nil)
 (defvar idlwave-current-native-class-tags nil)
-(defvar idlwave-sint-classtags nil)
-(idlwave-new-sintern-type 'classtag)
+(defvar idlwave-sint-class-tags nil)
+(idlwave-new-sintern-type 'class-tag)
 (add-to-list 'idlwave-complete-special 'idlwave-complete-class-structure-tag)
-(add-hook 'idlwave-update-rinfo-hook 'idlwave-classtag-reset)
+(add-hook 'idlwave-update-rinfo-hook 'idlwave-class-tag-reset)
 
 (defun idlwave-complete-class-structure-tag ()
   "Complete a structure tag on a `self' argument in an object method."
@@ -6461,33 +6576,39 @@ The list is cached in `idlwave-class-info' for faster access."
          (skip-chars-backward "[a-zA-Z0-9._$]")
          (and (< (point) (- pos 4))
               (looking-at "self\\.")))
-       (let* ((class (nth 2 (idlwave-current-routine))))
+       (let* ((class-selector (nth 2 (idlwave-current-routine)))
+              (super-classes (idlwave-all-class-inherits class-selector)))
          ;; Check if we are in a class routine
-         (unless class
+         (unless class-selector
            (error "Not in a method procedure or function"))
          ;; Check if we need to update the "current" class
-         (if (not (equal class idlwave-current-tags-class))
-             (idlwave-prepare-class-tag-completion class))
-         (setq idlwave-completion-help-info nil)
+         (if (not (equal class-selector idlwave-current-tags-class))
+             (idlwave-prepare-class-tag-completion class-selector))
+         (setq idlwave-completion-help-info 
+               (list 'idlwave-complete-class-structure-tag-help
+                     (idlwave-sintern-routine 
+                      (concat class-selector "__define"))
+                     nil))
          (let  ((idlwave-cpl-bold idlwave-current-native-class-tags))
            (idlwave-complete-in-buffer
-            'classtag 'classtag 
+            'class-tag 'class-tag 
             idlwave-current-class-tags nil
-            (format "Select a tag of class %s" class)
-            "class tag"))
+            (format "Select a tag of class %s" class-selector)
+            "class tag"
+            'idlwave-attach-class-tag-classes))
          t) ; return t to skip other completions
       nil)))
 
-(defun idlwave-classtag-reset ()
+(defun idlwave-class-tag-reset ()
   (setq idlwave-current-tags-class nil))
 
 (defun idlwave-prepare-class-tag-completion (class)
   "Find and parse the necessary class definitions for class structure tags."
-  (setq idlwave-sint-classtags nil)
+  (setq idlwave-sint-class-tags nil)
   (setq idlwave-current-tags-class class)
   (setq idlwave-current-class-tags
        (mapcar (lambda (x)
-                 (list (idlwave-sintern-classtag x 'set)))
+                 (list (idlwave-sintern-class-tag x 'set)))
                (idlwave-all-class-tags class)))
   (setq idlwave-current-native-class-tags
        (mapcar 'downcase (idlwave-class-tags class))))
@@ -6549,6 +6670,8 @@ Gets set in `idlw-rinfo.el'.")
             t)) ; return t to skip other completions
          (t nil))))
 
+;; Here we fake help using the routine "system variables" with keyword
+;; set to the sysvar.  Name and kwd are global variables here.
 (defvar name) 
 (defvar kwd)
 (defun idlwave-complete-sysvar-help (mode word)
@@ -6566,7 +6689,43 @@ Gets set in `idlw-rinfo.el'.")
                          (nth 1 idlwave-completion-help-info)
                        word))))
    (t (error "This should not happen"))))
-                         
+
+;; Fake help in the source buffer for class structure tags.
+;; kwd and name are global-variables here.
+(defvar idlwave-help-do-class-struct-tag nil)
+(defun idlwave-complete-class-structure-tag-help (mode word)
+  (cond
+   ((eq mode 'test) ; nothing gets fontified for class tags
+    nil)
+   ((eq mode 'set)
+    (let (class-with)
+      (when (setq class-with 
+               (idlwave-class-or-superclass-with-tag 
+                idlwave-current-tags-class
+                word))
+       (if (assq (idlwave-sintern-class class-with) 
+                 idlwave-system-class-info)
+           (error "No help available for system class tags."))
+       (setq name (concat class-with "__define"))))
+    (setq kwd word
+         idlwave-help-do-class-struct-tag t))
+   (t (error "This should not happen"))))
+
+(defun idlwave-class-or-superclass-with-tag (class tag)
+  "Find and return the CLASS or one of its superclass with the
+associated TAG, if any."
+  (let ((sclasses (cons class (cdr (assq 'all-inherits 
+                                        (idlwave-class-info class)))))
+       cl)
+   (catch 'exit
+     (while sclasses
+       (setq cl (pop sclasses))
+       (let ((tags (idlwave-class-tags cl)))
+        (while tags
+          (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t))
+            (throw 'exit cl))         
+          (setq tags (cdr tags))))))))
+
 
 (defun idlwave-sysvars-reset ()
   (if (and (fboundp 'idlwave-shell-is-running)
@@ -6620,9 +6779,10 @@ Gets set in `idlw-rinfo.el'.")
       (set-buffer "*Completions*")
       (save-excursion
        (goto-char (point-min))
-       (while (re-search-forward "\\.*<[^>]+>" nil t)
-         (put-text-property (match-beginning 0) (match-end 0)
-                            'face 'font-lock-string-face))))))
+       (let ((buffer-read-only nil))
+         (while (re-search-forward "\\.*<[^>]+>" nil t)
+           (put-text-property (match-beginning 0) (match-end 0)
+                              'face 'font-lock-string-face)))))))
 
 (defun idlwave-uniquify (list)
   (let (nlist)
@@ -6676,10 +6836,13 @@ Restore the pre-completion window configuration if possible."
 (defvar idlwave-last-context-help-pos nil)
 (defun idlwave-context-help (&optional arg)
   "Display IDL Online Help on context.
-If point is on a keyword, help for that keyword will be shown.
-If point is on a routine name or in the argument list of a routine,
-help for that routine will be displayed.
-Works for system routines and keywords only."
+If point is on a keyword, help for that keyword will be shown.  If
+point is on a routine name or in the argument list of a routine, help
+for that routine will be displayed.  Works for system routines and
+keywords, it pulls up text help.  For other routies and keywords,
+visits the source file, finding help in the header (if
+`idlwave-help-source-try-header' is non-nil) or the routine definition
+itself."
   (interactive "P")
   (idlwave-require-online-help)
   (idlwave-do-context-help arg))
@@ -6711,7 +6874,7 @@ Works for system routines and keywords only."
   (if idlwave-help-is-loaded
       t  ;; everything is OK.
     (let* ((dir (or (idlwave-help-directory)
-                   (error "Online Help is not installed (idlwave-help-directory is unknown)")))
+                   (error "Online Help not installed (help directory unknown) - download at idlwave.org")))
           (lfile1 (expand-file-name "idlw-help.elc" dir))
           (lfile2 (expand-file-name "idlw-help.el" dir))
           (hfile (expand-file-name "idlw-help.txt" dir)))
index a087e3e077864979ce610702028c2707be2df4ec..903b648e3c9414ac3f6e71b07172753c48360f3f 100644 (file)
@@ -9,12 +9,12 @@
 @synindex ky cp
 @syncodeindex vr cp
 @syncodeindex fn cp
-@set VERSION 4.14
-@set EDITION 4.14
+@set VERSION 4.15
+@set EDITION 4.15
 @set IDLVERSION 5.5
-@set NSYSROUTINES 1322
-@set NSYSKEYWORDS 5952
-@set DATE June 2002
+@set NSYSROUTINES 1324
+@set NSYSKEYWORDS 6129
+@set DATE September 2002
 @set AUTHOR J.D. Smith & Carsten Dominik
 @set AUTHOR-EMAIL dominik@@astro.uva.nl
 @set MAINTAINER J.D. Smith
@@ -145,12 +145,13 @@ Completion
 
 * Case of Completed Words::     CaseOFcomPletedWords
 * Object Method Completion and Class Ambiguity::  obj->Method, what?
+* Object Method Completion in the Shell::  
 * Class and Keyword Inheritance::  obj->Method, _EXTRA=e
 * Structure Tag Completion::    Completing state.Tag
 
 Actions
 
-* Block Boundary Check::        Is the END correct
+* Block Boundary Check::        Is the END statement correct?
 * Padding Operators::           Enforcing space around `=' etc
 * Case Changes::                Enforcing upper case keywords
 
@@ -158,15 +159,17 @@ The IDLWAVE Shell
 
 * Starting the Shell::          How to launch IDL as a subprocess
 * Using the Shell::             Interactively working with the Shell
-* Debugging IDL Programs::      Compilation/Debugging
+* Commands Sent to the Shell::  
+* Debugging IDL Programs::      
 * Examining Variables::         
 * Custom Expression Examination::  
 
 Debugging IDL Programs
 
-* Compiling Programs::          Compiling buffers under the shell
-* Breakpoints and Stepping::    Deciding where to stop and look
-* Walking the Calling Stack::   From where was this routine called?
+* Debug Key Bindings::          
+* Compiling Programs::          
+* Breakpoints and Stepping::    
+* Walking the Calling Stack::   
 
 Installation
 
@@ -203,9 +206,7 @@ inferior shell@footnote{Note that this package has nothing to do with
 the Interface Definition Language, part of the Common Object Request
 Broker Architecture (CORBA)}.  It can also be used for editing source
 files for the related WAVE/CL language, but with only limited
-support. Note that this package has nothing to do with the Interface
-Definition Language, part of the Common Object Request Broker
-Architecture (CORBA).
+support. 
 
 IDLWAVE consists of two main parts: a major mode for editing IDL source
 files files (@code{idlwave-mode}) and a mode for running the IDL program
@@ -223,7 +224,7 @@ Context-sensitive display of calling sequences and keywords for more
 than 1000 native IDL routines, extendible to any number of additional
 routines in your local IDL libraries.
 @item
-Name space conflict search, with likelihood ranking.
+Routine name space conflict search, likelihood-of-use ranking.
 @item
 Fast, context-sensitive online help.
 @item
@@ -370,6 +371,9 @@ at point.
 (setq idlwave-help-directory "~/.idlwave")
 @end lisp
 
+@ifhtml
+<A NAME="TUTORIAL"></A>
+@end ifhtml
 @node Getting Started, The IDLWAVE Major Mode, IDLWAVE in a Nutshell, Top
 @chapter Getting Started (Tutorial)
 @cindex Quick-Start
@@ -750,12 +754,12 @@ languages along its 25+ year history, has inherited an unusual mix of
 syntax elements.  Left to his or her own devices, a novice IDL
 programmer will often conjure code which is very difficult to read and
 impossible to adapt.  Much can be gleaned from studying available IDL
-code libraries for coding style pointers, but, due to the variety of IDL
-syntax elements, replicating this style can be challenging at best.
-Luckily, IDLWAVE understands the structure IDL code very well, and takes
-care of almost all formatting issues for you.  After configuring it to
-match your coding standards, you can rely on it to help keep your code
-neat and organized.
+code libraries for coding style pointers, but, due to the variety of
+IDL syntax elements, replicating this style can be challenging at
+best.  Luckily, IDLWAVE understands the structure of IDL code very
+well, and takes care of almost all formatting issues for you.  After
+configuring it to match your coding standards, you can rely on it to
+help keep your code neat and organized.
 
 @cindex Foreign code, adapting
 @cindex Indentation, of foreign code
@@ -831,19 +835,20 @@ function thisfunctionnameisverylongsoitwillleavelittleroom, a, b, $
                                                             c, d
 @end example
 
-You can instruct IDLWAVE when to use this special continuation
+You can instruct IDLWAVE when to avoid using this special continuation
 indentation by setting the variable
 @code{idlwave-max-extra-continuation-indent}, which specifies the
-maximum additional indentation beyond the basic indent to be tolerated,
-otherwise defaulting to fixed-offset from the enclosing indent (the size
-of which offset is set in @code{idlwave-continuation-indent}).  Also,
-since the indentation level is somewhat dynamic in continued statements
-with special continuation indentation, especially if
-@code{idlwave-max-extra-continuation-indent} is small, the key @kbd{C-u
-@key{TAB}} will re-indent all lines in the current statement.  Note that
-@code{idlwave-indent-to-open-paren}, if non-nil, overrides the
-@code{idlwave-max-extra-continuation-indent} limit, for parentheses
-only, forcing them always to line up.
+maximum additional indentation beyond the basic indent to be
+tolerated, otherwise defaulting to a fixed-offset from the enclosing
+indent (the size of which offset is set in
+@code{idlwave-continuation-indent}).  Also, since the indentation
+level can be somewhat dynamic in continued statements with special
+continuation indentation, especially if
+@code{idlwave-max-extra-continuation-indent} is small, the key
+@kbd{C-u @key{TAB}} will re-indent all lines in the current statement.
+Note that @code{idlwave-indent-to-open-paren}, if non-nil, overrides
+the @code{idlwave-max-extra-continuation-indent} limit, for
+parentheses only, forcing them always to line up.
 
 
 @defopt idlwave-continuation-indent (@code{2})
@@ -882,7 +887,7 @@ unchanged.
 @item @code{;;}
 @tab Lines starting with two semicolons are indented like the surrounding code.
 @item @code{;}
-@tab Lines starting with a single semicolon are indent to a minimum column.
+@tab Lines starting with a single semicolon are indented to a minimum column.
 @end multitable
 
 @noindent
@@ -1045,21 +1050,23 @@ consistent with the notation for hexadecimal numbers, e.g. @code{'C5'XB}.
 @cindex Shell, querying for routine info
 
 @kindex C-c C-i
-IDL comes bundled with more than one thousand procedures, functions and
-object methods, and large libraries typically contain hundreds or even
-thousands more.  This large command set makes it difficult to remember
-the calling sequence and keywords for routines you use, but IDLWAVE can
-help.  It builds up routine information using a wide variety of sources:
-IDLWAVE in fact knows far more about the routines on your system than
-IDL itself.  It maintains a list of all built-in routines, with calling
-sequences and keywords@footnote{This list is created by scanning the IDL
-manuals and might contain (very few) errors.  Please report any errors
-to the maintainer, so that they can be fixed.}.  It also scans Emacs
-buffers and library files for routine definitions, and queries the
-IDLWAVE-Shell for information about routines currently compiled there.
-This information is updated automatically, and so should usually be
-current.  To force a global update and refresh the routine information,
-use @kbd{C-c C-i} (@code{idlwave-update-routine-info}).
+IDL comes bundled with more than one thousand procedures, functions
+and object methods, and large libraries typically contain hundreds or
+even thousands more (each with a few to tens of keywords and
+arguments).  This large command set can make it difficult to remember
+the calling sequence and keywords for the routines you use, but
+IDLWAVE can help.  It builds up routine information using a wide
+variety of sources: IDLWAVE in fact knows far more about the routines
+on your system than IDL itself.  It maintains a list of all built-in
+routines, with calling sequences and keywords@footnote{This list is
+created by scanning the IDL manuals and might contain (very few)
+errors.  Please report any errors to the maintainer, so that they can
+be fixed.}.  It also scans Emacs buffers and library files for routine
+definitions, and queries the IDLWAVE-Shell for information about
+routines currently compiled there.  This information is updated
+automatically, and so should usually be current.  To force a global
+update and refresh the routine information, use @kbd{C-c C-i}
+(@code{idlwave-update-routine-info}).
 
 @kindex C-c ?
 To display the information about a routine, press @kbd{C-c ?}, which
@@ -1218,11 +1225,11 @@ Maximum number of source files displayed in the Routine Info window.
 For IDL system routines, RSI provides extensive documentation.  IDLWAVE
 can access an ASCII version of this documentation very quickly and
 accurately.  This is @emph{much} faster than using the IDL online help
-application, because usually IDLWAVE gets you to the right place in the
-docs directly, without any additional browsing and scrolling.  For this
-online help to work, an ASCII version of the IDL documentation, which is
-not part of the standalone IDLWAVE distribution, is required.  The
-necessary help files can be downloaded from
+application, because IDLWAVE usually gets you to the right place in the
+documentation directly, without any additional browsing and scrolling.
+For this online help to work, an ASCII version of the IDL documentation,
+which is not part of the standalone IDLWAVE distribution, is required.
+The necessary help files can be downloaded from
 @uref{@value{IDLWAVE-HOMEPAGE}, the maintainers webpage}.  The text
 extracted from the PDF files is fine for normal documentation
 paragraphs, but graphics and multiline equations will not be well
@@ -1240,12 +1247,20 @@ delimited in @code{<NEW>..</NEW>} blocks.
 @cindex Source code, as online help
 @cindex DocLib header, as online help
 For routines which are not documented in the IDL manual (for example
-your own routines), the source code is used as help text.  If the
-requested information can be found in a (more or less) standard DocLib
-file header, IDLWAVE shows the header (scrolling down to appropriate
-keywords).  Otherwise the routine definition statement
+personal or library routines), the source code itself is used as help
+text.  If the requested information can be found in a (more or less)
+standard DocLib file header, IDLWAVE shows the header (scrolling down to
+appropriate keyword).  Otherwise the routine definition statement
 (@code{pro}/@code{function}) is shown.
 
+@cindex Structure tags, in online help
+@cindex Class tags, in online help
+Help is also available for class structure tags (@code{self.TAG}), and
+generic structure tags, if structure tag completion is enabled
+(@pxref{Structure Tag Completion}).  This is implemented by visiting the
+tag within the class or structure definition source itself.  Help is not
+available on built-in system class tags.
+
 @kindex M-?
 In any IDL program (or, as with most IDLWAVE commands, in the IDL
 Shell), press @kbd{M-?} (@code{idlwave-context-help}), or click with
@@ -1268,6 +1283,10 @@ locations are recognized context for help:
 @tab Beyond the class name in an @code{OBJ_NEW} call.
 @item @i{Executive Command}
 @tab An executive command like @code{.RUN}.  Mostly useful in the shell.
+@item @i{Structure Tags}
+@tab In structure tags like @code{state.xsize}
+@item @i{Structure Tags}
+@tab In class tags like @code{self.value}.
 @item @i{Default}
 @tab The routine that would be selected for routine info display.
 @end multitable
@@ -1290,9 +1309,11 @@ Online help for routines and keywords can be accessed through the
 Routine Info display.  Click with @kbd{Mouse-3} on an item to see the
 corresponding help (@pxref{Routine Info}).
 @item
-When using completion and Emacs pops up a window with possible
-completions, clicking with @kbd{Mouse-3} on a completion item invokes
-help on that item (@pxref{Completion}).
+When using completion and Emacs pops up a @file{*Completions*} buffer
+with possible completions, clicking with @kbd{Mouse-3} on a completion
+item invokes help on that item (@pxref{Completion}).  Items for which
+help is available in the online system documentation (vs. just the
+program source itself) will be emphasized (e.g. colored blue).
 @end itemize
 @noindent
 In both cases, a blue face indicates that the item is documented in the
@@ -1431,10 +1452,10 @@ name = 'a_              @r{File name (default inside quotes)}
 @cindex Completion, ambiguity
 @cindex Completion, forcing function name
 The only place where completion is ambiguous is procedure/function
-@emph{keywords} versus @emph{functions}.  After @samp{plot,x_}, IDLWAVE
-will always assume a keyword to plot.  You can force completion of a
-function name at such a location with a prefix arg: @kbd{C-u
-M-@key{TAB}}.
+@emph{keywords} versus @emph{functions}.  After @samp{plot,x,_}, IDLWAVE
+will always assume a keyword to @samp{plot}.  However, a function is
+also a possible completion here.  You can force completion of a function
+name at such a location by using a prefix arg: @kbd{C-u M-@key{TAB}}.
 
 @cindex Scrolling the @file{*Completions*} window
 @cindex Completion, scrolling
@@ -1445,9 +1466,18 @@ If the list of completions is too long to fit in the
 @kbd{M-@key{TAB}} repeatedly.  Online help (if installed) for each
 possible completion is available by clicking with @kbd{Mouse-3} on the
 item.  Items for which system online help (from the IDL manual) is
-available will be displayed in a different font (e.g. colored blue).
-For other items, the corresponding source code or DocLib header will be
-used as the help text.
+available will be emphasized (e.g. colored blue).  For other items, the
+corresponding source code or DocLib header will be used as the help
+text.
+
+@cindex Completion, cancelling
+@cindex Cancelling completion
+Completion is not a blocking operation --- you are free to continue
+editing, enter commands, or simply ignore the @file{*Completions*}
+buffer during a completion operation.  If, however, the most recent
+command was a completion, @kbd{C-g} will remove the buffer and restore
+the window configuration.  You can also remove the buffer at any time
+with no negative consequences.
 
 @defopt idlwave-keyword-completion-adds-equal (@code{t})
 Non-@code{nil} means completion automatically adds @samp{=} after
@@ -1473,6 +1503,7 @@ available.
 @menu
 * Case of Completed Words::     CaseOFcomPletedWords
 * Object Method Completion and Class Ambiguity::  obj->Method, what?
+* Object Method Completion in the Shell::  
 * Class and Keyword Inheritance::  obj->Method, _EXTRA=e
 * Structure Tag Completion::    Completing state.Tag
 @end menu
@@ -1512,7 +1543,7 @@ Non-@code{nil} means the empty string is considered lower case for
 completion.
 @end defopt
 
-@node  Object Method Completion and Class Ambiguity, Class and Keyword Inheritance, Case of Completed Words, Completion
+@node  Object Method Completion and Class Ambiguity, Object Method Completion in the Shell, Case of Completed Words, Completion
 @subsection Object Method Completion and Class Ambiguity
 @cindex Object methods
 @cindex Class ambiguity
@@ -1537,14 +1568,18 @@ narrow down the number of possible completions.  The variable
 @code{idlwave-query-class} can be configured to make such prompting the
 default for all methods (not recommended), or selectively for very
 common methods for which the number of completing keywords would be too
-large (e.g. @code{Init}).  After you have specified the class for a
-particular statement (e.g. when completing the method), IDLWAVE can
-remember it for the rest of the editing session.  Subsequent completions
-in the same statement (e.g. keywords) can then reuse this class
-information.  This works by placing a text property on the method
-invocation operator @samp{->}, after which the operator will be shown in
-a different face.  This is not enabled by default --- the variable
-@code{idlwave-store-inquired-class} can be used to turn it on.
+large (e.g. @code{Init}).  
+
+@cindex Saving object class on @code{->}
+@cindex @code{->}
+After you have specified the class for a particular statement (e.g. when
+completing the method), IDLWAVE can remember it for the rest of the
+editing session.  Subsequent completions in the same statement
+(e.g. keywords) can then reuse this class information.  This works by
+placing a text property on the method invocation operator @samp{->},
+after which the operator will be shown in a different face.  This is not
+enabled by default --- the variable @code{idlwave-store-inquired-class}
+can be used to turn it on.
 
 @defopt idlwave-completion-show-classes (@code{1})
 Non-@code{nil} means show classes in @file{*Completions*} buffer when
@@ -1569,7 +1604,22 @@ Face to highlight object operator arrows @samp{->} which carry a class
 text property.
 @end defopt
 
-@node   Class and Keyword Inheritance, Structure Tag Completion, Object Method Completion and Class Ambiguity, Completion
+@node Object Method Completion in the Shell, Class and Keyword Inheritance, Object Method Completion and Class Ambiguity, Completion
+@subsection Object Method Completion in the Shell
+@cindex Method Completion in Shell
+In the IDLWAVE Shell (@pxref{The IDLWAVE Shell}), objects on which
+methods are being invoked have a special property: they must exist as
+variables, and so their class can be determined (for instance, using the
+@code{obj_class()} function).  In the Shell, when attempting completion,
+routine info, or online help within a method routine, a query is sent to
+determine the class of the object.  If this query is successful, the
+class found will be used to select appropriate completions, routine
+info, or help.  If unsuccessful, information from all known classes will
+be used (as in the buffer).  Setting the variable
+@code{idlwave-store-inquired-class} can eliminate unnecessary repetitive
+queries for the object's class, and speed up completion.
+
+@node   Class and Keyword Inheritance, Structure Tag Completion, Object Method Completion in the Shell, Completion
 @subsection Class and Keyword Inheritance
 @cindex Inheritance, class
 @cindex Keyword inheritance
@@ -1595,20 +1645,22 @@ entire class inheritance chain.  This is often referred to as
 @w{@code{self->MySuperClass::SetProperty,_EXTRA=e}}.
 
 IDLWAVE can accommodate this special synergy between class and keyword
-inheritance: if @code{_EXTRA} or @code{_REF_EXTRA} are detected among a
+inheritance: if @code{_EXTRA} or @code{_REF_EXTRA} is detected among a
 method's keyword parameters, all keywords of superclass versions of the
-method being considered are included in completion.  The completion
-buffer will label keywords based on their originating class.  The
-variable @code{idlwave-keyword-class-inheritance} can be used to
-configure which methods have keyword inheritance treated in this simple,
-class-driven way.  By default, only @code{Init} and
-@code{(Get|Set)Property} are.
+method being considered are included in completion.  There is of course
+no guarantee that this type of keyword chaining actually occurrs, but
+for some methods it's a very convenient assumption.  The variable
+@code{idlwave-keyword-class-inheritance} can be used to configure which
+methods have keyword inheritance treated in this simple, class-driven
+way.  By default, only @code{Init} and @code{(Get|Set)Property} are.
+The completion buffer will label keywords based on their originating
+class.
 
 @defopt idlwave-support-inheritance (@code{t})
 Non-@code{nil} means consider inheritance during completion, online help etc.
 @end defopt
 
-@defopt idlwave-keyword-class-inheritance
+@defopt idlwave-keyword-class-inheritance 
 A list of regular expressions to match methods for which simple
 class-driven keyword inheritance will be used for Completion.
 @end defopt
@@ -1621,17 +1673,18 @@ class-driven keyword inheritance will be used for Completion.
 In many programs, especially those involving widgets, large structures
 (e.g. the @samp{state} structure) are used to communicate among
 routines.  It is very convenient to be able to complete structure tags,
-in the same way as for instance variables of the @samp{self} object
-(@pxref{Object Method Completion and Class Ambiguity}).  Add-in code for
-structure tag completion is available in the form of a loadable
+in the same way as for instance variables (tags) of the @samp{self}
+object (@pxref{Object Method Completion and Class Ambiguity}).  Add-in
+code for structure tag completion is available in the form of a loadable
 completion module: @file{idlw-complete-structtag.el}.  Tag completion in
 structures is highly ambiguous (much more so than @samp{self}
-completion), so @code{idlw-complete-structtag} makes an unusual and
+completion), so @code{idlw-complete-structtag} makes an unusual and very
 specific assumption: the exact same variable name is used to refer to
-the structure in all parts of the program.  So, if you consistently
+the structure in all parts of the program.  This is entirely unenforced
+by the IDL language, but is a typical convention.  If you consistently
 refer to the same structure with the same variable name
 (e.g. @samp{state}), structure tags which are read from its definition
-can be used for completion.
+in the same file can be used for completion.
 
 Structure tag completion is not enabled by default.  To enable it,
 simply add the following to your @file{.emacs}:
@@ -1641,6 +1694,9 @@ simply add the following to your @file{.emacs}:
              (lambda () (require 'idlw-complete-structtag)))
 @end lisp
 
+Once enabled, you'll also be able to access online help on the structure
+tags, using the usual methods (@pxref{Online Help}).
+
 @node Routine Source, Resolving Routines, Completion, The IDLWAVE Major Mode
 @section Routine Source
 @cindex Routine source file
@@ -1648,21 +1704,21 @@ simply add the following to your @file{.emacs}:
 @cindex Source file, of a routine
 @kindex C-c C-v
 In addition to clicking on a @i{Source:} line in the routine info
-window, there is another way to find the source file of a routine.  The
-command @kbd{C-c C-v} (@code{idlwave-find-module}) asks for a module
-name, offering the same default as @code{idlwave-routine-info} would
-have used, taken from nearby buffer contents.  In the minibuffer,
-specify a complete routine name (including any class part).  IDLWAVE
-will display the source file in another window, positioned at the
-routine in question.
+window, there is another way to quickly visit the source file of a
+routine.  The command @kbd{C-c C-v} (@code{idlwave-find-module}) asks
+for a module name, offering the same default as
+@code{idlwave-routine-info} would have used, taken from nearby buffer
+contents.  In the minibuffer, specify a complete routine name (including
+any class part).  IDLWAVE will display the source file in another
+window, positioned at the routine in question.
 
 @cindex Buffers, killing
 @cindex Killing autoloaded buffers
 Since getting the source of a routine into a buffer is so easy with
 IDLWAVE, too many buffers visiting different IDL source files are
 sometimes created.  The special command @kbd{C-c C-k}
-(@code{idlwave-kill-autoloaded-buffers}) can be used to remove these
-buffers.
+(@code{idlwave-kill-autoloaded-buffers}) can be used to easily remove
+these buffers.
 
 @node Resolving Routines, Code Templates, Routine Source, The IDLWAVE Major Mode
 @section Resolving Routines
@@ -1864,29 +1920,30 @@ convenience function @code{idlwave-define-abbrev}:
 (add-hook 'idlwave-mode-hook
           (lambda ()
             (idlwave-define-abbrev "wb" "widget_base()"
-                                  (idlwave-keyword-abbrev 1))
-           (idlwave-define-abbrev "ine" "IF N_Elements() EQ 0 THEN"
-                                  (idlwave-keyword-abbrev 11))))
+                     (idlwave-keyword-abbrev 1))
+            (idlwave-define-abbrev "ine" "IF N_Elements() EQ 0 THEN"
+                     (idlwave-keyword-abbrev 11))))
 @end lisp
 
 Notice how the abbreviation (here @emph{wb}) and its expansion
-(@emph{widget_base()}) are given as argument, and the single argument to
+(@emph{widget_base()}) are given as arguments, and the single argument to
 @code{idlwave-keyword-abbrev} (here @emph{1}) specifies how far back to
 move the point upon expansion (in this example, to put it between the
 parentheses).
 
 The abbreviations are expanded in upper or lower case, depending upon
-the variables @code{idlwave-abbrev-change-case} and (for reserved word
-templates) @code{idlwave-reserved-word-upcase} (@pxref{Case Changes}).
+the variables @code{idlwave-abbrev-change-case} andfor reserved word
+templates, @code{idlwave-reserved-word-upcase} (@pxref{Case Changes}).
 
 @defopt idlwave-abbrev-start-char (@code{"\"})
-A single character string used to start abbreviations in abbrev
-mode.
+A single character string used to start abbreviations in abbrev mode.
+Beware of common characters which might naturally occur in sequence with
+abbreviation strings.
 @end defopt
 
 @defopt idlwave-abbrev-move (@code{t})
 Non-@code{nil} means the abbrev hook can move point, e.g. to end up
-between the parenthesis of a function call.
+between the parentheses of a function call.
 @end defopt
 
 @node Actions, Doc Header, Abbreviations, The IDLWAVE Major Mode
@@ -1894,13 +1951,13 @@ between the parenthesis of a function call.
 @cindex Actions
 @cindex Coding standards, enforcing
 
-@emph{Actions} are special commands which are executed automatically
-while you write code in order to check the structure of the program or
-to enforce coding standards.  Most actions which have been implemented
-in IDLWAVE are turned off by default, assuming that the average user
-wants her code the way she writes it.  But if you are a lazy typist and
-want your code to adhere to certain standards, actions can be
-helpful.
+@emph{Actions} are special formatting commands which are executed
+automatically while you write code in order to check the structure of
+the program or to enforce coding standards.  Most actions which have
+been implemented in IDLWAVE are turned off by default, assuming that the
+average user wants her code the way she writes it.  But if you are a
+lazy typist and want your code to adhere to certain standards, actions
+can be helpful.
 
 Actions can be applied in three ways:
 
@@ -1931,7 +1988,7 @@ Non-@code{nil} means performs actions when indenting.
 @end defopt
 
 @menu
-* Block Boundary Check::        Is the END correct
+* Block Boundary Check::        Is the END statement correct?
 * Padding Operators::           Enforcing space around `=' etc
 * Case Changes::                Enforcing upper case keywords
 @end menu
@@ -2183,12 +2240,13 @@ Unfortunately IDL for Windows and MacOS do not have command-prompt
 versions and thus do not allow the interaction with
 Emacs@footnote{Please inform the maintainer if you come up with a way to
 make the IDLWAVE shell work on these systems.} --- so the IDLWAVE shell
-currently only works under GNU and Unix.
+currently only works under Unix.
 
 @menu
 * Starting the Shell::          How to launch IDL as a subprocess
 * Using the Shell::             Interactively working with the Shell
-* Debugging IDL Programs::      Compilation/Debugging
+* Commands Sent to the Shell::  
+* Debugging IDL Programs::      
 * Examining Variables::         
 * Custom Expression Examination::  
 @end menu
@@ -2285,7 +2343,7 @@ The prefix for temporary IDL files used when compiling regions.
 Hook for customizing @code{idlwave-shell-mode}.
 @end defopt
 
-@node Using the Shell, Debugging IDL Programs, Starting the Shell, The IDLWAVE Shell
+@node Using the Shell, Commands Sent to the Shell, Starting the Shell, The IDLWAVE Shell
 @section Using the Shell
 @cindex Comint
 @cindex Shell, basic commands
@@ -2301,18 +2359,14 @@ between emacs and IDL sessions.  Here is a list of commonly used
 commands:
 
 @multitable @columnfractions .12 .88
-@item @key{UP}
+@item @key{UP}, @key{M-p}
 @tab Cycle backwards in input history
-@item @key{DOWN}
+@item @key{DOWN}, @key{M-n}
 @tab Cycle forwards in input history
-@item @kbd{M-p}
-@tab Cycle backwards in input history @emph{matching input}
-@item @kbd{M-n}
-@tab Cycle forwards in input history @emph{matching input}
 @item @kbd{M-r}
 @tab Previous input matching a regexp
 @item @kbd{M-s}
-@tab Next input that matches a regexp
+@tab Next input matching a regexp
 @item @kbd{return}
 @tab Send input or copy line to current prompt
 @item @kbd{C-c C-a}
@@ -2336,10 +2390,11 @@ commands:
 @end multitable
 
 In addition to these standard @file{comint} commands,
-@code{idlwave-shell-mode} provides many of the commands which simplify
-writing IDL code, including abbreviations, online help, and completion.
-See @ref{Routine Info} and @ref{Online Help} and @ref{Completion} for more
-information on these commands.
+@code{idlwave-shell-mode} provides many of the same commands which
+simplify writing IDL code available in IDLWAVE buffers.  This includes
+abbreviations, online help, and completion.  See @ref{Routine Info} and
+@ref{Online Help} and @ref{Completion} for more information on these
+commands.
 
 @cindex Completion, in the shell
 @cindex Routine info, in the shell
@@ -2412,26 +2467,87 @@ The three regular expressions which match the magic spells for input
 modes.
 @end defopt
 
-@node Debugging IDL Programs, Examining Variables, Using the Shell, The IDLWAVE Shell
+@node Commands Sent to the Shell, Debugging IDL Programs, Using the Shell, The IDLWAVE Shell
+@section Commands Sent to the Shell
+@cindex Commands in shell, showing
+@cindex Showing commands in shell
+
+The IDLWAVE buffers and shell interact very closely.  In addition to the
+normal commands you enter at the @code{IDL>} prompt, many other special
+commands are sent to the shell, sometimes as a direct result of invoking
+a key command, menu item, or toolbar button, but also automatically, as
+part of the normal flow of information updates between the buffer and
+shell.
+
+The commands sent include @code{breakpoint}, @code{.step} and other
+debug commands (@pxref{Debugging IDL Programs}), @code{.run} and other
+compilation statements (@pxref{Compiling Programs}), examination
+commands like @code{print} and @code{help} (@pxref{Examining
+Variables}), and other special purpose commands designed to keep
+information on the running shell current.
+
+By default, much of this background shell input and output is hidden
+from the user, but this is configurable.  The custom variable
+@code{idlwave-abbrev-show-commands} allows you to configure which
+commands sent to the shell are shown there.  For a related customization
+for separating the output of @emph{examine} commands @xref{Examining
+Variables}.
+
+@defopt idlwave-shell-show-commands (@code{'(run misc breakpoint)})
+A list of command types to echo in the shell when sent.  Possible values
+are @code{run} for @code{.run}, @code{.compile} and other run commands,
+@code{misc} for lesser used commands like @code{window}, @code{retall},
+etc., @code{breakpoint} for breakpoint setting and clearing commands,
+and @code{debug} for other debug, stepping, and continue commands.  In
+addition, if the variable is set to the single symbol @code{'everything},
+all the copious shell input is displayed (which is probably only useful
+for debugging purposes).
+@end defopt
+
+@node Debugging IDL Programs, Examining Variables, Commands Sent to the Shell, The IDLWAVE Shell
 @section Debugging IDL Programs
 @cindex Debugging
 @cindex Keybindings for debugging
 @cindex Toolbar
 
-@kindex C-c C-d
 Programs can be compiled, run, and debugged directly from the source
-buffer in Emacs.  The IDLWAVE shell installs key bindings both in the
-shell buffer and in all IDL code buffers of the current Emacs session.
-On Emacs versions which support this, it also installs a debugging
-toolbar.  The display of the toolbar can be toggled with @kbd{C-c C-d
-C-t} (@code{idlwave-shell-toggle-toolbar}).
+buffer in Emacs.  IDLWAVE makes compiling and debugging IDL programs
+far less cumbersome by providing a full-featured,
+key/menu/toolbar-driven interface to commands like @code{breakpoint},
+@code{.step}, @code{.run}, etc.
+
+The IDLWAVE shell installs key bindings both in the shell buffer and in
+all IDL code buffers of the current Emacs session, so debug commands
+work in both places (in the shell, commands operate on the last file
+compiled).  On Emacs versions which support this, a debugging toolbar is
+also installed.  The display of the toolbar can be toggled with @kbd{C-c
+C-d C-t} (@code{idlwave-shell-toggle-toolbar}).
+
+@defopt idlwave-shell-use-toolbar (@code{t})
+Non-@code{nil} means use the debugging toolbar in all IDL related
+buffers.
+@end defopt
+
+@menu
+* Debug Key Bindings::          
+* Compiling Programs::          
+* Breakpoints and Stepping::    
+* Walking the Calling Stack::   
+@end menu
+
+@node Debug Key Bindings, Compiling Programs, Debugging IDL Programs, Debugging IDL Programs
+@subsection Debug Key Bindings
+@kindex C-c C-d
+@cindex Key bindings
 
 The debugging key bindings are by default on the prefix key @kbd{C-c
 C-d}, so for example setting a breakpoint is done with @kbd{C-c C-d
-C-b}, compiling a source file with @kbd{C-c C-d C-c}.  If you find this
-too much work, you can add bindings for one or more modifier keys which
-is not used by other commands.  For example, if you write in
-@file{.emacs}:
+C-b}, and compiling a source file with @kbd{C-c C-d C-c}.  If you find
+this too much work, you can easily configure IDLWAVE to use one or more
+modifier keys not in use by other commands, in lieu of the prefix
+@kbd{C-c C-d} (though these bindings will typically also be available
+--- see @code{idlwave-shell-activate-prefix-keybindings}).  For example,
+if you write in @file{.emacs}:
 
 @lisp
 (setq idlwave-shell-debug-modifiers '(control shift))
@@ -2458,22 +2574,12 @@ key, like @kbd{C-c C-d C-b}.
 
 @defopt idlwave-shell-debug-modifiers (@code{nil})
 List of modifier keys to use for additional binding of debugging
-commands in the shell and source buffers.
-@end defopt
-
-@defopt idlwave-shell-use-toolbar (@code{t})
-Non-@code{nil} means use the debugging toolbar in all IDL related
-buffers.
+commands in the shell and source buffers.  Can be one or more of
+@code{control}, @code{meta}, @code{super}, @code{hyper}, @code{alt}, and
+@code{shift}.
 @end defopt
 
-
-@menu
-* Compiling Programs::          Compiling buffers under the shell
-* Breakpoints and Stepping::    Deciding where to stop and look
-* Walking the Calling Stack::   From where was this routine called?
-@end menu
-
-@node Compiling Programs, Breakpoints and Stepping, Debugging IDL Programs, Debugging IDL Programs
+@node Compiling Programs, Breakpoints and Stepping, Debug Key Bindings, Debugging IDL Programs
 @subsection Compiling Programs
 @cindex Compiling programs
 @cindex Programs, compiling
@@ -2524,22 +2630,30 @@ configured in @code{idlwave-shell-mark-stop-line}.
 You can set breakpoints and step through a program with IDLWAVE.
 Setting a breakpoint in the current line of the source buffer is done
 with @kbd{C-c C-d C-b} (@code{idlwave-shell-break-here}).  With a prefix
-arg of 1 (i.e. @kbd{C-1 C-c C-d C-b}, the breakpoint gets a @code{/ONCE}
-keyword, meaning that it will be deleted after first use.  With a
-numeric prefix greater than one, the breakpoint will only be active the
-@code{nth} time it is hit.  To clear the breakpoint in the current line,
+arg of 1 (i.e. @kbd{C-1 C-c C-d C-b}), the breakpoint gets a
+@code{/ONCE} keyword, meaning that it will be deleted after first use.
+With a numeric prefix greater than one (e.g. @kbd{C-4 C-c C-d C-b}), the
+breakpoint will only be active the @code{nth} time it is hit.  With a
+single non-numeric prefix (i.e. @kbd{C-u C-c C-d C-b}), prompt for a
+condition --- an IDL expression to be evaulated and trigger the
+breakpoint only if true.  To clear the breakpoint in the current line,
 use @kbd{C-c C-d C-d} (@code{idlwave-clear-current-bp}).  When executed
 from the shell window, the breakpoint where IDL is currently stopped
 will be deleted.  To clear all breakpoints, use @kbd{C-c C-d C-a}
 (@code{idlwave-clear-all-bp}).  Breakpoint lines are highlighted in the
-source code.
+source code.  Note that IDL places breakpoints as close as possible on
+or after the line you specify.  IDLWAVE queries the shell for the actual
+breakpoint location which was set, so the exact line you specify may not
+be marked.
 
 Once the program has stopped somewhere, you can step through it.  The
 most important stepping commands are @kbd{C-c C-d C-s} to execute one
 line of IDL code ("step into"); @kbd{C-c C-d C-n} to step a single line,
 treating procedure and function calls as a single step ("step over");
 @kbd{C-c C-d C-h} to continue execution to the line at the cursor and
-@kbd{C-c C-d C-r} to continue execution.  Here is a summary of the
+@kbd{C-c C-d C-r} to continue execution.  @xref{Commands Sent to the
+Shell}, for information on displaying or hiding the breakpoint and
+stepping commands the shell receives.  Here is a summary of the
 breakpoint and stepping commands:
 
 @multitable @columnfractions .23 .77
@@ -2603,6 +2717,9 @@ automatically return to the current level. @xref{Examining Variables},
 for information how to examine the value of variables and expressions on
 higher calling stack levels.
 
+@ifhtml
+<A NAME="EXAMINE"></A>
+@end ifhtml
 @node Examining Variables, Custom Expression Examination, Debugging IDL Programs, The IDLWAVE Shell
 @section Examining Variables
 @cindex @code{PRINT} expressions
@@ -2904,6 +3021,8 @@ Laurent Mugnier <mugnier@@onera.fr>
 @item
 Lubos Pochman <lubos@@rsinc.com>
 @item
+Bob Portmann <portmann@@al.noaa.gov>
+@item
 Patrick M. Ryan <pat@@jaameri.gsfc.nasa.gov>
 @item
 Marty Ryba <ryba@@ll.mit.edu>
@@ -2950,14 +3069,14 @@ several places:
 @emph{Builtin routines} are defined inside IDL itself.  The source
 code of such routines is not available.
 @item
-Routines which are @emph{part of the current program}, defined in a
-file which is explicitly compiled by the user.  This file may or may not
-be located on the IDL search path.
+Routines which are @emph{part of the current program}, are defined in a
+file explicitly compiled by the user.  This file may or may not be
+located on the IDL search path.
 @item 
 @emph{Library routines} are defined in files located on IDL's search
-path, and will need not be manually compiled.  When a library routine is
-called for the first time, IDL will find the source file and compile it
-dynamically.  A special sub-category of library routines are the
+path, and will not need to be manually compiled.  When a library routine
+is called for the first time, IDL will find the source file and compile
+it dynamically.  A special sub-category of library routines are the
 @emph{system routines} distributed with IDL, and usually available in
 the @file{lib} subdirectory of the IDL distribution.
 @item
@@ -3089,7 +3208,7 @@ from the same directories, call the command
 selected directories, write an updated version of the libinfo file and
 rebuild IDLWAVE's internal lists.  If you give three prefix arguments
 @w{@kbd{C-u C-u C-u C-c C-i}}, updating will be done with a background
-job@footnote{GNU and Unix systems only, I think.}.  You can continue to work,
+job@footnote{Unix systems only, I think.}.  You can continue to work,
 and the library catalog will be re-read when it is ready.
 
 A note of caution:  Depending on your local installation, the IDL
@@ -3103,11 +3222,11 @@ File for routine information of the IDL library.
 @end defopt
 
 @defopt idlwave-library-path
-IDL library path for Windows and MacOS.  Not needed under GNU and Unix.
+IDL library path for Windows and MacOS.  Not needed under Unix.
 @end defopt
 
 @defopt idlwave-system-directory
-The IDL system directory for Windows and MacOS.  Not needed under GNU and Unix.
+The IDL system directory for Windows and MacOS.  Not needed under Unix.
 @end defopt
 
 @defopt idlwave-special-lib-alist
@@ -3351,6 +3470,9 @@ user is King!
                                         "help,___,/STRUCTURE"))))
 @end example
 
+@ifhtml
+<A NAME="WIN_MAC"></A>
+@end ifhtml
 @node Windows and MacOS, Index, Configuration Examples, Top
 @appendix Windows and MacOS
 @cindex Windows
@@ -3361,17 +3483,17 @@ of Emacs, much of IDLWAVE does also work under different operating
 systems like Windows (with NTEmacs or NTXEmacs) or MacOS.
 
 The only problem really is that RSI does not provide a command-line
-version of IDL for Windows or MacOS which IDLWAVE can interact
-with@footnote{Call your RSI representative and complain --- it should be
-trivial for them to provide one.  And if enough people ask for it, maybe
-they will.  The upcoming IDL for Mac OSX is slated to have a
-command-line version.}.  Therefore the IDLWAVE Shell does not work and
-you have to rely on IDLDE to run and debug your programs.  However,
-editing IDL source files with Emacs/IDLWAVE works with all bells and
-whistles, including routine info, completion and fast online help.  Only
-a small amount of additional information must be specified in your
-.emacs file: you must specify path names which on a GNU or UNIX system
-are automatically gathered by talking to the IDL program.
+version of IDL for Windows or MacOS with which IDLWAVE can
+interact@footnote{Call your RSI representative and complain --- it
+should be trivial for them to provide one.  And if enough people ask
+for it, maybe they will.  The upcoming IDL for Mac OSX is slated to
+have a command-line version.}.  Therefore the IDLWAVE Shell does not
+work and you have to rely on IDLDE to run and debug your programs.
+However, editing IDL source files with Emacs/IDLWAVE works with all
+bells and whistles, including routine info, completion and fast online
+help.  Only a small amount of additional information must be specified
+in your .emacs file: the path names which, on a UNIX system, are
+automatically gathered by talking to the IDL program.
 
 Here is an example of the additional configuration needed for a Windows
 system.  I am assuming that IDLWAVE has been installed in