* lisp/emacs-lisp/package.el: Include obsolete packages from archives.
[bpt/emacs.git] / lisp / progmodes / idlw-shell.el
index b2cd24f..5aad4aa 100644 (file)
@@ -1,12 +1,11 @@
 ;; idlw-shell.el --- run IDL as an inferior process of Emacs.
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
 ;;          Carsten Dominik <dominik@astro.uva.nl>
 ;;          Chris Chase <chase@att.com>
 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
-;; Version: 6.1.22
 ;; Keywords: processes
 ;; Package: idlwave
 
@@ -48,7 +47,7 @@
 ;;
 ;; Follow the instructions in the INSTALL file of the distribution.
 ;; In short, put this file on your load path and add the following
-;; lines to your .emacs file:
+;; lines to your init file:
 ;;
 ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
 ;;
   :group 'idlwave)
 
 (defcustom idlwave-shell-prompt-pattern "^\r? ?IDL> "
-  "*Regexp to match IDL prompt at beginning of a line.
+  "Regexp to match IDL prompt at beginning of a line.
 For example, \"^\r?IDL> \" or \"^\r?WAVE> \".
 The \"^\r?\" is needed, to indicate the beginning of the line, with
 optional return character (which IDL seems to output randomly).
 This variable is used to initialize `comint-prompt-regexp' in the
-process buffer.
-
-This is a fine thing to set in your `.emacs' file."
+process buffer."
   :group 'idlwave-shell-general-setup
   :type 'regexp)
 
 (defcustom idlwave-shell-process-name "idl"
-  "*Name to be associated with the IDL process.  The buffer for the
+  "Name to be associated with the IDL process.  The buffer for the
 process output is made by surrounding this name with `*'s."
   :group 'idlwave-shell-general-setup
   :type 'string)
@@ -126,12 +123,12 @@ process output is made by surrounding this name with `*'s."
 ;; (defcustom idlwave-shell-automatic-start...)  See idlwave.el
 
 (defcustom idlwave-shell-use-dedicated-window nil
-  "*Non-nil means, never replace the shell frame with another buffer."
+  "Non-nil means, never replace the shell frame with another buffer."
   :group 'idlwave-shell-general-setup
   :type 'boolean)
 
 (defcustom idlwave-shell-use-dedicated-frame nil
-  "*Non-nil means, IDLWAVE should use a special frame to display shell buffer."
+  "Non-nil means, IDLWAVE should use a special frame to display shell buffer."
   :group 'idlwave-shell-general-setup
   :type 'boolean)
 
@@ -145,12 +142,12 @@ The default makes the frame splittable, so that completion works correctly."
          (cons symbol sexp)))
 
 (defcustom idlwave-shell-raise-frame t
-  "*Non-nil means, `idlwave-shell' raises the frame showing the shell window."
+  "Non-nil means, `idlwave-shell' raises the frame showing the shell window."
   :group 'idlwave-shell-general-setup
   :type 'boolean)
 
 (defcustom idlwave-shell-arrows-do-history t
-  "*Non-nil means UP and DOWN arrows move through command history.
+  "Non-nil means UP and DOWN arrows move through command history.
 This variable can have 3 values:
 nil        Arrows just move the cursor
 t          Arrows force the cursor back to the current command line and
@@ -166,7 +163,7 @@ t          Arrows force the cursor back to the current command line and
 ;; FIXME: add comint-input-ring-size?
 
 (defcustom idlwave-shell-use-toolbar t
-  "*Non-nil means, use the debugging toolbar in all IDL related buffers.
+  "Non-nil means, use the debugging toolbar in all IDL related buffers.
 Starting the shell will then add the toolbar to all idlwave-mode buffers.
 Exiting the shell will removed everywhere.
 Available on XEmacs and on Emacs 21.x or later.
@@ -176,21 +173,15 @@ At any time you can toggle the display of the toolbar with
   :type 'boolean)
 
 (defcustom idlwave-shell-temp-pro-prefix "/tmp/idltemp"
-  "*The prefix for temporary IDL files used when compiling regions.
+  "The prefix for temporary IDL files used when compiling regions.
 It should be an absolute pathname.
 The full temporary file name is obtained by using `make-temp-file'
 so that the name will be unique among multiple Emacs processes."
   :group 'idlwave-shell-general-setup
   :type 'string)
 
-(defvar idlwave-shell-fix-inserted-breaks nil
-  "*OBSOLETE VARIABLE, is no longer used.
-
-The documentation of this variable used to be:
-If non-nil then run `idlwave-shell-remove-breaks' to clean up IDL messages.")
-
 (defcustom idlwave-shell-prefix-key "\C-c\C-d"
-  "*The prefix key for the debugging map `idlwave-shell-mode-prefix-map'.
+  "The prefix key for the debugging map `idlwave-shell-mode-prefix-map'.
 This variable must already be set when idlwave-shell.el is loaded.
 Setting it in the mode-hook is too late."
   :group 'idlwave-shell-general-setup
@@ -223,11 +214,8 @@ window, but is useful for stepping, etc."
 
 ;; (defcustom idlwave-shell-debug-modifiers... See idlwave.el
 
-(defvar idlwave-shell-activate-alt-keybindings nil
-  "Obsolete variable.  See `idlwave-shell-debug-modifiers'.")
-
 (defcustom idlwave-shell-use-truename nil
-  "*Non-nil means, use use `file-truename' when looking for buffers.
+  "Non-nil means, use `file-truename' when looking for buffers.
 If this variable is non-nil, Emacs will use the function `file-truename' to
 resolve symbolic links in the file paths printed by e.g., STOP commands.
 This means, unvisited files will be loaded under their truename.
@@ -247,7 +235,7 @@ because these are used as separators by IDL."
   :type 'string)
 
 (defcustom idlwave-shell-mode-hook '()
-  "*Hook for customizing `idlwave-shell-mode'."
+  "Hook for customizing `idlwave-shell-mode'."
   :group 'idlwave-shell-general-setup
   :type 'hook)
 
@@ -292,7 +280,7 @@ is non-nil."
 
 (defcustom idlwave-shell-show-commands
   '(run misc breakpoint)
-  "*A list of command types to show output from in the shell.
+  "A list of command types to show output from in the shell.
 Possibilities are 'run, 'debug, 'breakpoint, and 'misc.  Unselected
 types are not displayed in the shell.  The type 'everything causes all
 the copious shell traffic to be displayed."
@@ -335,11 +323,8 @@ expression being examined."
           (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 means, put output of examine commands in their own buffer."
+  "Non-nil means, put output of examine commands in their own buffer."
   :group 'idlwave-shell-command-setup
   :type 'boolean)
 
@@ -359,12 +344,12 @@ newly created."
          (cons variable sexp)))
 
 (defcustom idlwave-shell-query-for-class t
-  "*Non-nil means query the shell for object class on object completions."
+  "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.
+  "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
@@ -432,7 +417,7 @@ end"
          (regexp :tag "Line-mode regexp")))
 
 (defcustom idlwave-shell-breakpoint-popup-menu t
-  "*If non-nil, provide a menu on mouse-3 on breakpoint lines, and
+  "If non-nil, provide a menu on mouse-3 on breakpoint lines, and
 popup help text on the line."
   :group 'idlwave-shell-command-setup
   :type 'boolean)
@@ -449,7 +434,7 @@ popup help text on the line."
   :group 'idlwave)
 
 (defcustom idlwave-shell-mark-stop-line t
-  "*Non-nil means, mark the source code line where IDL is currently stopped.
+  "Non-nil means, mark the source code line where IDL is currently stopped.
 Value decides about the method which is used to mark the line.  Valid values
 are:
 
@@ -471,7 +456,7 @@ hides any code, so setting this to 'arrow on Emacs 21 sounds like a good idea."
          (const :tag "Face or arrow." t)))
 
 (defcustom idlwave-shell-overlay-arrow ">"
-  "*The overlay arrow to display at source lines where execution halts.
+  "The overlay arrow to display at source lines where execution halts.
 We use a single character by default, since the main block of IDL procedures
 often has no indentation.  Where possible, IDLWAVE will use overlays to
 display the stop-lines.  The arrow is only used on character-based terminals.
@@ -480,33 +465,33 @@ See also `idlwave-shell-use-overlay-arrow'."
   :type 'string)
 
 (defcustom idlwave-shell-stop-line-face 'highlight
-  "*The face for `idlwave-shell-stop-line-overlay'.
+  "The face for `idlwave-shell-stop-line-overlay'.
 Allows you to choose the font, color and other properties for
 line where IDL is stopped.  See also `idlwave-shell-mark-stop-line'."
   :group 'idlwave-shell-highlighting-and-faces
   :type 'symbol)
 
 (defcustom idlwave-shell-electric-stop-color "Violet"
-  "*The color for the default face or overlay arrow when stopped."
+  "The color for the default face or overlay arrow when stopped."
   :group 'idlwave-shell-highlighting-and-faces
   :type 'string)
 
 (defcustom idlwave-shell-electric-stop-line-face
   (prog1
-      (copy-face 'modeline 'idlwave-shell-electric-stop-line)
+      (copy-face 'mode-line 'idlwave-shell-electric-stop-line)
     (set-face-background 'idlwave-shell-electric-stop-line
                         idlwave-shell-electric-stop-color)
     (condition-case nil
        (set-face-foreground 'idlwave-shell-electric-stop-line nil)
       (error nil)))
-  "*The face for `idlwave-shell-stop-line-overlay' when in electric debug mode.
+  "The face for `idlwave-shell-stop-line-overlay' when in electric debug mode.
 Allows you to choose the font, color and other properties for the line
 where IDL is stopped, when in Electric Debug Mode."
   :group 'idlwave-shell-highlighting-and-faces
   :type 'symbol)
 
 (defcustom idlwave-shell-mark-breakpoints t
-  "*Non-nil means, mark breakpoints in the source files.
+  "Non-nil means, mark breakpoints in the source files.
 Valid values are:
 nil        Do not mark breakpoints.
 'face      Highlight line with `idlwave-shell-breakpoint-face'.
@@ -520,11 +505,8 @@ t          Glyph when possible, otherwise face (same effect as 'glyph)."
          (const :tag "Display glyph (red dot)" glyph)
          (const :tag "Glyph or face." t)))
 
-(defvar idlwave-shell-use-breakpoint-glyph t
-  "Obsolete variable.  See `idlwave-shell-mark-breakpoints'.")
-
 (defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp
-  "*The face for breakpoint lines in the source code.
+  "The face for breakpoint lines in the source code.
 Allows you to choose the font, color and other properties for
 lines which have a breakpoint.  See also `idlwave-shell-mark-breakpoints'."
   :group 'idlwave-shell-highlighting-and-faces
@@ -542,7 +524,7 @@ lines which have a breakpoint.  See also `idlwave-shell-mark-breakpoints'."
 
 (defcustom idlwave-shell-disabled-breakpoint-face
   'idlwave-shell-disabled-bp
-  "*The face for disabled breakpoint lines in the source code.
+  "The face for disabled breakpoint lines in the source code.
 Allows you to choose the font, color and other properties for
 lines which have a breakpoint.  See also `idlwave-shell-mark-breakpoints'."
   :group 'idlwave-shell-highlighting-and-faces
@@ -560,14 +542,14 @@ lines which have a breakpoint.  See also `idlwave-shell-mark-breakpoints'."
 
 
 (defcustom idlwave-shell-expression-face 'secondary-selection
-  "*The face for `idlwave-shell-expression-overlay'.
+  "The face for `idlwave-shell-expression-overlay'.
 Allows you to choose the font, color and other properties for
 the expression printed by IDL."
   :group 'idlwave-shell-highlighting-and-faces
   :type 'symbol)
 
 (defcustom idlwave-shell-output-face 'secondary-selection
-  "*The face for `idlwave-shell-output-overlay'.
+  "The face for `idlwave-shell-output-overlay'.
 Allows you to choose the font, color and other properties for
 the expression output by IDL."
   :group 'idlwave-shell-highlighting-and-faces
@@ -784,7 +766,7 @@ with `*'s."
     "^% Skipped to:"
     "^% Stop encountered:"
     )
-  "*A list of regular expressions matching IDL messages.
+  "A list of regular expressions matching IDL messages.
 These are the messages containing file and line information where
 IDL is currently stopped.")
 
@@ -795,19 +777,19 @@ IDL is currently stopped.")
 
 (defconst idlwave-shell-trace-message-re
   "^% At "    ;; First line of a trace message
-  "*A regular expression matching IDL trace messages.  These are the
+  "A regular expression matching IDL trace messages.  These are the
 messages containing file and line information of a current
 traceback.")
 
 (defconst idlwave-shell-step-messages
   '("^% Stepped to:"
     )
-  "*A list of regular expressions matching stepped execution messages.
+  "A list of regular expressions matching stepped execution messages.
 These are IDL messages containing file and line information where
 IDL has currently stepped.")
 
 (defvar idlwave-shell-break-message "^% Breakpoint at:"
-  "*Regular expression matching an IDL breakpoint message line.")
+  "Regular expression matching an IDL breakpoint message line.")
 
 (defconst idlwave-shell-electric-debug-help
   "   ==> IDLWAVE Electric Debug Mode Help <==
@@ -925,7 +907,7 @@ IDL has currently stepped.")
    \\[idlwave-shell-print] or \\[idlwave-shell-mouse-print] with the
    mouse, help, \\[idlwave-shell-help-expression] or
    \\[idlwave-shell-mouse-help] with the mouse, or with a
-   configureable set of custom examine commands using
+   configurable set of custom examine commands using
    \\[idlwave-shell-examine-select].  The mouse examine commands can
    also work by click and drag, to select an expression for
    examination.
@@ -939,7 +921,7 @@ IDL has currently stepped.")
    -------------------------------
    Info documentation for this package is available.  Use \\[idlwave-info]
    to display (complain to your sysadmin if that does not work).
-   For Postscript and HTML versions of the documentation, check IDLWAVE's
+   For PostScript and HTML versions of the documentation, check IDLWAVE's
    homepage at URL `http://idlwave.org'.
    IDLWAVE has customize support - see the group `idlwave'.
 
@@ -959,7 +941,7 @@ IDL has currently stepped.")
   ;; Can not use history expansion because "!" is used for system variables.
   (setq comint-input-autoexpand nil)
   ;; (setq comint-input-ring-size 64)
-  
+
   (set (make-local-variable 'completion-ignore-case) t)
   (set (make-local-variable 'comint-completion-addsuffix) '("/" . ""))
   (setq comint-input-ignoredups t)
@@ -1672,7 +1654,7 @@ number.")
    "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*"      ; continuation lines file name (6)
    "\\)"                                 ; end line number group (5)
    )
-  "*A regular expression to parse out the file name and line number.
+  "A regular expression to parse out the file name and line number.
 The 1st group should match the subroutine name.
 The 3rd group is the line number.
 The 5th group is the file name.
@@ -1844,7 +1826,7 @@ file name."
     (cond
      ((file-regular-p file2) file2)
      ((file-regular-p file1) file1)
-     ;; If we cannot veryfy the existence of the file, we return the shorter
+     ;; If we cannot verify the existence of the file, we return the shorter
      ;; name.  The idea behind this is that this may be a relative file name
      ;; and our idea about the current working directory may be wrong.
      ;; If it is a relative file name, it hopefully is short.
@@ -2187,7 +2169,7 @@ 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-filename-completion)))
+    (comint-dynamic-complete-filename)))
 
 (defun idlwave-shell-executive-command ()
   "Return the name of the current executive command, if any."
@@ -2903,7 +2885,7 @@ from `idlwave-shell-examine-alist' via mini-buffer shortcut key."
         ;; Move to beginning of current or previous expression
         (if (looking-at "\\<\\|(")
             ;; At beginning of expression, don't move backwards unless
-            ;; this is at the end of an indentifier.
+            ;; this is at the end of an identifier.
             (if (looking-at "\\>")
                 (backward-sexp))
           (backward-sexp))
@@ -3707,7 +3689,7 @@ Existing overlays are recycled, in order to minimize consumption."
 (defun idlwave-shell-make-new-bp-overlay (&optional type disabled)
   "Make a new overlay for highlighting breakpoints.
 
-This stuff is strongly dependant upon the version of Emacs.  If TYPE
+This stuff is strongly dependent upon the version of Emacs.  If TYPE
 is passed, make an overlay of that type ('bp or 'bp-cond, currently
 only for glyphs)."
   (let ((ov (make-overlay 1 1))
@@ -4198,12 +4180,8 @@ Otherwise, just expand the file name."
          ([(        ?[)]   ?[   idlwave-shell-goto-previous-bp t t)
          ([(        ?])]   ?]   idlwave-shell-goto-next-bp t t)
          ([(control ?f)]   ?f   idlwave-shell-window)))
-       (mod (cond ((and idlwave-shell-debug-modifiers
-                       (listp idlwave-shell-debug-modifiers)
-                       (not (equal '() idlwave-shell-debug-modifiers)))
-                  idlwave-shell-debug-modifiers)
-                 (idlwave-shell-activate-alt-keybindings
-                  '(alt))))
+       (mod (and (listp idlwave-shell-debug-modifiers)
+                idlwave-shell-debug-modifiers))
        (shift (memq 'shift mod))
        (mod-noshift (delete 'shift (copy-sequence mod)))
        s k1 c2 k2 cmd electric only-buffer cannotshift)
@@ -4277,16 +4255,14 @@ Otherwise, just expand the file name."
 (defvar idlwave-shell-electric-debug-buffers nil)
 
 (define-minor-mode idlwave-shell-electric-debug-mode
-  "Toggle Electric Debug mode.
-With no argument, this command toggles the mode.
-Non-null prefix argument turns on the mode.
-Null prefix argument turns off the mode.
-
-When Electric Debug mode is enabled, the many debugging commands are
-available as single key sequences."
-nil
-" *Debugging*"
-idlwave-shell-electric-debug-mode-map)
+  "Toggle Idlwave Shell Electric Debug mode.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise.  If called from Lisp, enable the mode
+if ARG is omitted or nil.
+
+When Idlwave Shell Electric Debug mode is enabled, the Idlwave
+Shell debugging commands are available as single key sequences."
+  nil " *Debugging*" idlwave-shell-electric-debug-mode-map)
 
 (add-hook
  'idlwave-shell-electric-debug-mode-on-hook