Skip to content
Browse files

String changes from upstream Emacs.

Corrections to docstrings (spelling errors,missings quotes, 
first line not full sentence, missing periods, etc.)
Standardize comment alignment.
Removal of trailing whitespace.
  • Loading branch information...
1 parent 32d4a86 commit 30f495ceb48306782fcd61f41ecd2a15e9688376 @jdtsmith committed Jan 29, 2010
Showing with 668 additions and 662 deletions.
  1. +1 −1 idlw-complete-structtag.el
  2. +13 −14 idlw-help.el
  3. +412 −410 idlw-shell.el
  4. +242 −237 idlwave.el
View
2 idlw-complete-structtag.el
@@ -80,7 +80,7 @@
;; Notes
;; -----
;; - The structure definition assignment "state = {...}" must use the
-;; same variable name as the the completion location "state.*".
+;; same variable name as the completion location "state.*".
;; - The structure definition must be in the same file.
;; - The structure definition is searched backwards and then forward
;; from the current position, until a definition with tags is found.
View
27 idlw-help.el
@@ -36,7 +36,6 @@
;; information, at:
;;
;; http://idlwave.org
-;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -58,7 +57,7 @@
:group 'idlwave-online-help
:type 'boolean)
-(defvar idlwave-html-link-sep
+(defvar idlwave-html-link-sep
(if idlwave-html-help-pre-v6 "#" "#wp"))
(defcustom idlwave-html-system-help-location "help/"
@@ -70,7 +69,7 @@ help/online_help."
:group 'idlwave-online-help
:type 'directory)
-(defcustom idlwave-html-help-location
+(defcustom idlwave-html-help-location
(if (memq system-type '(ms-dos windows-nt))
nil
"/usr/local/etc/")
@@ -80,7 +79,7 @@ help/online_help."
:type 'directory)
(defvar idlwave-help-use-hh nil
- "Obsolete variable.")
+ "Obsolete variable.")
(defcustom idlwave-help-use-assistant t
"Whether to use the IDL Assistant as the help browser (<IDL v6.4)."
@@ -100,7 +99,7 @@ Defaults to `browse-url-browser-function', which see."
(defvar browse-url-generic-args)
-(defcustom idlwave-help-browser-generic-args
+(defcustom idlwave-help-browser-generic-args
(if (boundp 'browse-url-generic-args)
browse-url-generic-args "")
"Program args to use if using browse-url-generic-program."
@@ -207,7 +206,7 @@ support."
(defvar idlwave-help-activate-links-aggressively nil
"Obsolete variable.")
-
+
(defvar idlwave-completion-help-info)
(defvar idlwave-help-frame nil
@@ -770,7 +769,7 @@ see if a link is set for it. Try extra help functions if necessary."
(unless (or idlwave-help-use-eclipse-help
(and (stringp help-loc)
(file-directory-p help-loc)))
- (error "Invalid help request."))
+ (error "Invalid help request"))
(if (not (or idlwave-help-use-eclipse-help
idlwave-help-use-assistant))
@@ -1224,7 +1223,7 @@ Useful when source code is displayed as help. See the option
"Return the help directory where HTML files are, or nil if that is unknown."
;; Note that starting with IDL 7, the HTML files are not included directly,
;; so this becomes vestigial.
- (let ((syshelp-dir (expand-file-name
+ (let ((syshelp-dir (expand-file-name
(if (file-directory-p idlwave-html-system-help-location)
idlwave-html-system-help-location
(concat (file-name-as-directory
@@ -1237,12 +1236,12 @@ Useful when source code is displayed as help. See the option
(getenv "IDLWAVE_HELP_LOCATION"))))
(if (and syshelp-dir (file-directory-p syshelp-dir))
syshelp-dir
- (if help-dir
+ (if help-dir
(progn
(setq help-dir (expand-file-name "idl_html_help" help-dir))
(if (file-directory-p help-dir) help-dir))))))
-
-(defvar idlwave-help-assistant-available nil)
+
+(defvar idlwave-help-assistant-available nil)
(defvar idlwave-help-use-eclipse-help nil)
(defun idlwave-help-check-locations ()
;; Check help locations and assistant.
@@ -1266,7 +1265,7 @@ Useful when source code is displayed as help. See the option
(message "Cannot locate IDL Assistant, enabling default browser.")
(setq idlwave-help-use-assistant nil)
(unless idlwave-help-browse-url-available
- (error "browse-url is not available; install it or IDL Assistant to use HTML help."))))
+ (error "browse-url is not available; install it or IDL Assistant to use HTML help"))))
;; No assistant, check for and record eclipse-based help
;; (use new location of idl_catalog as indicator).
(setq idlwave-help-use-eclipse-help
@@ -1359,7 +1358,7 @@ IDL assistant.")
(unless (accept-process-output idlwave-help-assistant-process 15)
(error "Failed binding IDL_ASSISTANT socket"))
(if (not port)
- (error "Unable to open IDL_ASSISTANT.")
+ (error "Unable to open IDL_ASSISTANT")
(set-process-filter idlwave-help-assistant-process nil)
(setq idlwave-help-assistant-socket
(open-network-stream "IDL_ASSISTANT_SOCK"
@@ -1384,7 +1383,7 @@ IDL assistant.")
(if (string-match "\.html" link)
(setq topic (substring link 0 (match-beginning 0))
anchor (substring link (match-end 0)))
- (error "Malformed help link."))
+ (error "Malformed help link"))
(setq file (expand-file-name (concat topic ".html") help-loc))
(if (file-exists-p file)
View
822 idlw-shell.el
<
@@ -48,7 +48,7 @@
;;
;; INSTALLATION:
;; =============
-;;
+;;
;; 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:
@@ -61,9 +61,9 @@
;;
;; The newest version of this file can be found on the maintainers
;; web site.
-;;
+;;
;; http://idlwave.org
-;;
+;;
;; DOCUMENTATION
;; =============
;;
@@ -80,7 +80,7 @@
;; it is a bug in XEmacs.
;; The Debug menu in source buffers *does* display the bindings correctly.
;;
-;;
+;;
;; CUSTOMIZATION VARIABLES
;; =======================
;;
@@ -121,11 +121,11 @@
:group 'idlwave)
(defcustom idlwave-shell-prompt-pattern "^\r? ?IDL> "
- "*Regexp to match IDL prompt at beginning of a line.
-For example, \"^\r?IDL> \" or \"^\r?WAVE> \".
+ "*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
+This variable is used to initialize `comint-prompt-regexp' in the
process buffer.
This is a fine thing to set in your `.emacs' file."
@@ -143,7 +143,7 @@ process output is made by surrounding this name with `*'s."
(defcustom idlwave-shell-use-dedicated-window nil
"*Non-nil means, never replace the shell frame with another buffer."
:group 'idlwave-shell-general-setup
- :type 'boolean)
+ :type 'boolean)
(defcustom idlwave-shell-use-dedicated-frame nil
"*Non-nil means, IDLWAVE should use a special frame to display shell buffer."
@@ -228,7 +228,7 @@ So by default setting a breakpoint will be on C-c C-d C-b."
:type 'boolean)
(defcustom idlwave-shell-automatic-electric-debug 'breakpoint
- "Enter the electric-debug minor mode automatically.
+ "Enter the electric-debug minor mode automatically.
This occurs at a breakpoint or any other halt. The mode is exited
upon return to the main level. Can be set to 'breakpoint to enter
electric debug mode only when breakpoints are tripped."
@@ -265,13 +265,13 @@ to set this option to nil."
(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 `\"'
+Used for file name completion. Must not contain `'', `,' and `\"'
because these are used as separators by IDL."
:group 'idlwave-shell-general-setup
:type 'string)
(defcustom idlwave-shell-mode-hook '()
- "*Hook for customising `idlwave-shell-mode'."
+ "*Hook for customizing `idlwave-shell-mode'."
:group 'idlwave-shell-general-setup
:type 'hook)
@@ -313,7 +313,7 @@ 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.
@@ -324,7 +324,7 @@ the copious shell traffic to be displayed."
:type '(choice
(const everything)
(set :tag "Checklist" :greedy t
- (const :tag "All .run and .compile commands" run)
+ (const :tag "All .run and .compile commands" run)
(const :tag "All breakpoint commands" breakpoint)
(const :tag "All debug and stepping commands" debug)
(const :tag "Close, window, retall, etc. commands" misc))))
@@ -334,9 +334,9 @@ the copious shell traffic to be displayed."
:group 'idlwave-shell-command-setup
:type 'integer)
-(defcustom idlwave-shell-examine-alist
- `(("Print" . ,(concat "idlwave_print_safe,___,"
- (number-to-string
+(defcustom idlwave-shell-examine-alist
+ `(("Print" . ,(concat "idlwave_print_safe,___,"
+ (number-to-string
idlwave-shell-max-print-length)))
("Help" . "help,___")
("Structure Help" . "help,___,/STRUCTURE")
@@ -348,25 +348,25 @@ the copious shell traffic to be displayed."
("Arg Present" . "print,arg_present(___)")
("Widget Valid" . "print,widget_info(___,/VALID)")
("Widget Geometry" . "help,widget_info(___,/GEOMETRY)"))
- "Alist of special examine commands for popup selection.
+ "Alist of special examine commands for popup selection.
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-command-setup
:type '(repeat
- (cons
+ (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."
+ "*Non-nil means, put output of examine commands in their own buffer."
: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)
@@ -430,7 +430,7 @@ strings. Here is some example code which makes use of the default spells.
answer = GET_KBRD(1)
Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION',
-you could actually check if you are running under Emacs before printing
+you could actually check if you are running under Emacs before printing
the magic strings. Here is a procedure which uses this.
Usage:
@@ -447,7 +447,7 @@ pro idlwave_char_input,on=on,off=off
if keyword_set(on) then print,'<chars>' $
else if keyword_set(off) then print,'</chars>' $
else print,'<onechar>'
- endif
+ endif
end"
:group 'idlwave-shell-command-setup
:type '(list
@@ -468,7 +468,7 @@ popup help text on the line."
;; Breakpoint Overlays etc
(defgroup idlwave-shell-highlighting-and-faces nil
- "Highlighting and Faces used by the IDLWAVE Shell mode."
+ "Highlighting and faces used by the IDLWAVE Shell mode."
:prefix "idlwave-shell"
:group 'idlwave)
@@ -515,10 +515,10 @@ line where IDL is stopped. See also `idlwave-shell-mark-stop-line'."
:group 'idlwave-shell-highlighting-and-faces
:type 'string)
-(defcustom idlwave-shell-electric-stop-line-face
+(defcustom idlwave-shell-electric-stop-line-face
(prog1
(copy-face 'modeline 'idlwave-shell-electric-stop-line)
- (set-face-background '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)
@@ -545,7 +545,7 @@ t Glyph when possible, otherwise face (same effect as 'glyph)."
(const :tag "Glyph or face." t)))
(defvar idlwave-shell-use-breakpoint-glyph t
- "Obsolete variable. See `idlwave-shell-mark-breakpoints.")
+ "Obsolete variable. See `idlwave-shell-mark-breakpoints'.")
(defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp
"*The face for breakpoint lines in the source code.
@@ -564,7 +564,7 @@ lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
"Face for highlighting lines with breakpoints."
:group 'idlwave-shell-highlighting-and-faces))
-(defcustom idlwave-shell-disabled-breakpoint-face
+(defcustom idlwave-shell-disabled-breakpoint-face
'idlwave-shell-disabled-bp
"*The face for disabled breakpoint lines in the source code.
Allows you to choose the font, color and other properties for
@@ -617,18 +617,18 @@ before use by the shell.")
TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
`idlwave-shell-temp-rinfo-save-file' is set (respectively)."
- (cond
+ (cond
((eq type 'rinfo)
- (or idlwave-shell-temp-rinfo-save-file
- (setq idlwave-shell-temp-rinfo-save-file
+ (or idlwave-shell-temp-rinfo-save-file
+ (setq idlwave-shell-temp-rinfo-save-file
(idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
((eq type 'pro)
(or idlwave-shell-temp-pro-file
- (setq idlwave-shell-temp-pro-file
+ (setq idlwave-shell-temp-pro-file
(idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
- (t (error "Wrong argument (idlwave-shell-temp-file): %s"
+ (t (error "Wrong argument (idlwave-shell-temp-file): %s"
(symbol-name type)))))
-
+
(defun idlwave-shell-make-temp-file (prefix)
"Create a temporary file."
@@ -656,15 +656,15 @@ TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
- "Command used by `idlwave-shell-resync-dirs' to query IDL for
+ "Command used by `idlwave-shell-resync-dirs' to query IDL for
the directory stack.")
(defvar idlwave-shell-path-query "print,'PATH:<'+transpose(expand_path(!PATH,/ARRAY))+'>' & print,'SYSDIR:<'+!dir+'>'"
"The command which gets !PATH and !DIR info from the shell.")
(defvar idlwave-shell-mode-line-info nil
- "Additional info displayed in the mode line")
+ "Additional info displayed in the mode line.")
(defvar idlwave-shell-default-directory nil
"The default directory in the idlwave-shell buffer, of outside use.")
@@ -715,15 +715,15 @@ the directory stack.")
window-system) ; Window systems always
(progn
(setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
- (overlay-put idlwave-shell-stop-line-overlay
+ (overlay-put idlwave-shell-stop-line-overlay
'face idlwave-shell-stop-line-face))))
(t
;; IDLWAVE may decide. Will use a face on window systems, arrow elsewhere
(if window-system
(progn
(setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
- (overlay-put idlwave-shell-stop-line-overlay
+ (overlay-put idlwave-shell-stop-line-overlay
'face idlwave-shell-stop-line-face)))))
;; Now the expression and output overlays
@@ -736,17 +736,17 @@ the directory stack.")
(overlay-put idlwave-shell-output-overlay
'face idlwave-shell-output-face)
-(copy-face idlwave-shell-stop-line-face
+(copy-face idlwave-shell-stop-line-face
'idlwave-shell-pending-stop)
-(copy-face idlwave-shell-electric-stop-line-face
+(copy-face idlwave-shell-electric-stop-line-face
'idlwave-shell-pending-electric-stop)
(set-face-background 'idlwave-shell-pending-stop "gray70")
(set-face-background 'idlwave-shell-pending-electric-stop "gray70")
(defvar idlwave-shell-bp-query "help,/breakpoints"
- "Command to obtain list of breakpoints")
+ "Command to obtain list of breakpoints.")
(defvar idlwave-shell-command-output nil
"String for accumulating current command output.")
@@ -757,11 +757,10 @@ The current command is finished when the IDL prompt is displayed.
This is evaluated if it is a list or called with funcall.")
(defvar idlwave-shell-sentinel-hook nil
- "Hook run when the idl process exits.")
+ "Hook run when the IDL process exits.")
(defvar idlwave-shell-hide-output nil
- "If non-nil the process output is not inserted into the output
-buffer.")
+ "If non-nil the process output is not inserted into the output buffer.")
(defvar idlwave-shell-show-if-error nil
"If non-nil the process output is inserted into the output buffer if
@@ -778,15 +777,15 @@ it contains an error message, even if hide-output is non-nil.")
"List of commands to be sent to IDL.
Each element of the list is list of \(CMD PCMD HIDE\), where CMD is a
string to be sent to IDL and PCMD is a post-command to be placed on
-`idlwave-shell-post-command-hook'. If HIDE is non-nil, hide the output
+`idlwave-shell-post-command-hook'. If HIDE is non-nil, hide the output
from command CMD. PCMD and HIDE are optional.")
(defvar idlwave-shell-current-command nil
"Current command being executed.")
(defun idlwave-shell-buffer ()
"Name of buffer associated with IDL process.
-The name of the buffer is made by surrounding `idlwave-shell-process-name
+The name of the buffer is made by surrounding `idlwave-shell-process-name'
with `*'s."
(concat "*" idlwave-shell-process-name "*"))
@@ -795,7 +794,7 @@ with `*'s."
;;; The following are the types of messages we attempt to catch to
;;; resync our idea of where IDL execution currently is.
-;;;
+;;;
(defvar idlwave-shell-halt-frame nil
"The frame associated with halt/breakpoint messages.")
@@ -819,7 +818,7 @@ IDL is currently stopped.")
(defconst idlwave-shell-halt-messages-re
(mapconcat 'identity idlwave-shell-halt-messages "\\|")
- "The regular expression computed from idlwave-shell-halt-messages")
+ "The regular expression computed from `idlwave-shell-halt-messages'.")
(defconst idlwave-shell-trace-message-re
"^% At " ;; First line of a trace message
@@ -839,7 +838,7 @@ IDL has currently stepped.")
(defconst idlwave-shell-electric-debug-help
" ==> IDLWAVE Electric Debug Mode Help <==
-
+
Break Point Setting and Clearing:
b Set breakpoint ([C-u b] for conditional, [C-n b] nth hit, etc.).
d Clear nearby breakpoint.
@@ -865,7 +864,7 @@ IDL has currently stepped.")
Examining Expressions (with prefix for examining the region):
p Print expression near point or in region ([C-u p]).
? Help on expression near point or in region ([C-u ?]).
- x Examine expression near point or in region ([C-u x]) with
+ x Examine expression near point or in region ([C-u x]) with
letter completion of the examine type.
e Prompt for an expression to print.
@@ -901,8 +900,8 @@ IDL has currently stepped.")
-----------------
RET after the end of the process' output sends the text from the
end of process to the end of the current line. RET before end of
- process output copies the current line (except for the prompt) to the
- end of the buffer.
+ process output copies the current line (except for the prompt) to
+ the end of the buffer.
Command history, searching of previous commands, command line
editing are available via the comint-mode key bindings, by default
@@ -921,18 +920,18 @@ IDL has currently stepped.")
`\\[idlwave-routine-info]' displays information about an IDL routine near point,
just like in `idlwave-mode'. The module used is the one at point or
the one whose argument list is being edited.
- To update IDLWAVE's knowledge about compiled or edited modules, use
+ To update IDLWAVE's knowledge about compiled or edited modules, use
\\[idlwave-update-routine-info].
\\[idlwave-find-module] find the source of a module.
\\[idlwave-resolve] tells IDL to compile an unresolved module.
\\[idlwave-context-help] shows the online help on the item at
point, if online help has been installed.
-
+
4. Debugging
---------
A complete set of commands for compiling and debugging IDL programs
- is available from the menu. Also keybindings starting with a
+ is available from the menu. Also keybindings starting with a
`C-c C-d' prefix are available for most commands in the *idl* buffer
and also in source buffers. The best place to learn about the
keybindings is again the menu.
@@ -969,7 +968,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
- homepage at `http://idlwave.org'.
+ homepage at URL `http://idlwave.org'.
IDLWAVE has customize support - see the group `idlwave'.
8. Keybindings
@@ -1026,8 +1025,8 @@ IDL has currently stepped.")
(idlwave-shell-display-line nil)
(setq idlwave-shell-calling-stack-index 0)
(setq idlwave-shell-only-prompt-pattern
- (concat "\\`[ \t\n]*"
- (substring idlwave-shell-prompt-pattern 1)
+ (concat "\\`[ \t\n]*"
+ (substring idlwave-shell-prompt-pattern 1)
"[ \t\n]*\\'"))
(when idlwave-shell-query-for-class
@@ -1062,14 +1061,14 @@ IDL has currently stepped.")
(while (setq entry (pop list))
(set (make-local-variable (car entry)) (cdr entry)))))
-
- (unless (memq 'comint-carriage-motion
+
+ (unless (memq 'comint-carriage-motion
(default-value 'comint-output-filter-functions))
;; Strip those pesky ctrl-m's.
(add-hook 'comint-output-filter-functions
(lambda (string)
(when (string-match "\r" string)
- (let ((pmark (process-mark (get-buffer-process
+ (let ((pmark (process-mark (get-buffer-process
(current-buffer)))))
(save-excursion
;; bare CR -> delete preceding line
@@ -1105,7 +1104,7 @@ IDL has currently stepped.")
(idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
;; Turn off IDL's ^d interpreting, and define a system
;; variable which knows the version of IDLWAVE
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
(format "defsysv,'!idlwave_version','%s',1" idlwave-mode-version)
nil 'hide)
;; Read the paths, and save if they changed
@@ -1124,11 +1123,11 @@ IDL has currently stepped.")
path-changed sysdir-changed)
(when sysdir
(setq idlwave-system-directory sysdir)
- (if (setq sysdir-changed
+ (if (setq sysdir-changed
(not (string= idlwave-system-directory old-sys-dir)))
(put 'idlwave-system-directory 'from-shell t)))
;; Preserve any existing flags
- (setq idlwave-path-alist
+ (setq idlwave-path-alist
(mapcar (lambda (x)
(let ((old-entry (assoc x old-path-alist)))
(if old-entry
@@ -1137,7 +1136,7 @@ IDL has currently stepped.")
dirs))
(if (setq path-changed (not (equal idlwave-path-alist old-path-alist)))
(put 'idlwave-path-alist 'from-shell t))
- (if idlwave-path-alist
+ (if idlwave-path-alist
(if (and (not no-write)
idlwave-auto-write-paths
(or sysdir-changed path-changed)
@@ -1150,9 +1149,9 @@ IDL has currently stepped.")
(fset 'idl-shell 'idlwave-shell))
(defvar idlwave-shell-idl-wframe nil
- "Frame for displaying the idl shell window.")
+ "Frame for displaying the IDL shell window.")
(defvar idlwave-shell-display-wframe nil
- "Frame for displaying the idl source files.")
+ "Frame for displaying the IDL source files.")
(defvar idlwave-shell-calling-stack-index 0)
(defvar idlwave-shell-calling-stack-routine nil)
@@ -1174,8 +1173,8 @@ IDL has currently stepped.")
(frame (selected-frame)))
(catch 'exit
(while flist
- (if (not (eq (car flist)
- idlwave-shell-idl-wframe))
+ (if (not (eq (car flist)
+ idlwave-shell-idl-wframe))
(throw 'exit (car flist))
(setq flist (cdr flist))))))
(make-frame))
@@ -1193,9 +1192,9 @@ IDL has currently stepped.")
;; We do not have a source frame, so we use this one.
(setq idlwave-shell-display-wframe (selected-frame)))
;; Return a new frame
- (setq idlwave-shell-idl-wframe
+ (setq idlwave-shell-idl-wframe
(make-frame idlwave-shell-frame-parameters)))))
-
+
;;;###autoload
(defun idlwave-shell (&optional arg quick)
"Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'.
@@ -1222,14 +1221,14 @@ See also the variable `idlwave-shell-prompt-pattern'.
(delete-other-windows))
(and idlwave-shell-use-dedicated-frame
(setq idlwave-shell-idl-wframe (selected-frame)))
- (add-hook 'idlwave-shell-sentinel-hook
+ (add-hook 'idlwave-shell-sentinel-hook
'save-buffers-kill-emacs t))
;; A non-nil arg means, we want a dedicated frame. This will last
;; for the current editing session.
(if arg (setq idlwave-shell-use-dedicated-frame t))
(if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil))
-
+
;; Check if the process still exists. If not, create it.
(unless (comint-check-proc (idlwave-shell-buffer))
(let* ((prg (or idlwave-shell-explicit-file-name "idl"))
@@ -1259,9 +1258,9 @@ See also the variable `idlwave-shell-prompt-pattern'.
(if (eq (selected-frame) (window-frame window))
(select-window window))))
;; Save the paths at the end, if they are from the Shell and new.
- (add-hook 'idlwave-shell-sentinel-hook
+ (add-hook 'idlwave-shell-sentinel-hook
(lambda ()
- (if (and
+ (if (and
idlwave-auto-write-paths
idlwave-path-alist
(not idlwave-library-path)
@@ -1292,13 +1291,13 @@ Return either nil or 'hide."
(setq idlwave-shell-show-commands (list type))))
-(defun idlwave-shell-send-command (&optional cmd pcmd hide preempt
+(defun idlwave-shell-send-command (&optional cmd pcmd hide preempt
show-if-error)
"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.
+\(CMD PCMD HIDE\) are placed at the end of `idlwave-shell-pending-commands'.
+If IDL is ready the first command in `idlwave-shell-pending-commands',
+CMD, 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.
@@ -1312,19 +1311,19 @@ stepping through code with output.
If optional fourth argument PREEMPT is non-nil CMD is put at front of
`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.
+\(useful if you need an answer now\). IDL is considered ready if the
+prompt is present and if `idlwave-shell-ready' is non-nil.
If SHOW-IF-ERROR is non-nil, show the output if it contains an error
message, independent of what HIDE is set to."
; (setq hide nil) ; FIXME: turn this on for debugging only
-; (if (null cmd)
+; (if (null cmd)
; (progn
-; (message "SENDING Pending commands: %s"
+; (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)
+ (if (and (symbolp idlwave-shell-show-commands)
(eq idlwave-shell-show-commands 'everything))
(setq hide nil))
(let ((save-buffer (current-buffer))
@@ -1352,7 +1351,7 @@ message, independent of what HIDE is set to."
(append (list (list cmd pcmd hide show-if-error))
idlwave-shell-pending-commands)
;; Put at end.
- (append idlwave-shell-pending-commands
+ (append idlwave-shell-pending-commands
(list (list cmd pcmd hide show-if-error))))))
;; Check if IDL ready
(let ((save-point (point-marker)))
@@ -1404,7 +1403,7 @@ message, independent of what HIDE is set to."
(if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
(not (setq proc (get-buffer-process buf))))
(funcall errf "Shell is not running"))
- (if (equal c ?\C-g)
+ (if (equal c ?\C-g)
(funcall errf "Abort")
(comint-send-string proc (char-to-string c)))))
@@ -1445,7 +1444,7 @@ when the IDL prompt gets displayed again after the current IDL command."
(if idlwave-shell-ready
(funcall errf "No IDL program seems to be waiting for input"))
- ;; OK, start the loop
+ ;; OK, start the loop
(message "Character mode on: Sending single chars (`C-g' to exit)")
(message
(catch 'exit
@@ -1561,14 +1560,14 @@ error messages, etc."
(setq output (substring output (string-match "\n" output)))
(while (string-match "\\(\n\\|\\`\\)%.*\\(\n .*\\)*" output)
(setq output (replace-match "" nil t output)))
- (unless
+ (unless
(string-match idlwave-shell-only-prompt-pattern output)
output))
(defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*"
"Buffer containing hidden output from IDL commands.")
(defvar idlwave-shell-current-state nil)
-
+
(defun idlwave-shell-filter (proc string)
"Watch for IDL prompt and filter incoming text.
When the IDL prompt is received executes `idlwave-shell-post-command-hook'
@@ -1608,11 +1607,11 @@ and then calls `idlwave-shell-send-command' for any pending commands."
(concat idlwave-shell-accumulation string)))
-;;; Test/Debug code
-;; (with-current-buffer
-;; (get-buffer-create "*idlwave-shell-output*")
-;; (goto-char (point-max))
-;; (insert "\nReceived STRING\n===>\n" string "\n<====\n"))
+ ;; Test/Debug code
+ ;;(with-current-buffer
+ ;; (get-buffer-create "*idlwave-shell-output*")
+ ;; (goto-char (point-max))
+ ;; (insert "\nReceived STRING\n===>\n" string "\n<====\n"))
;; Check for prompt in current accumulating output
(when (setq idlwave-shell-ready
@@ -1657,16 +1656,16 @@ and then calls `idlwave-shell-send-command' for any pending commands."
(if (and idlwave-shell-show-if-error
(eq idlwave-shell-current-state 'error))
(idlwave-shell-comint-filter proc full-output)
- ;; If it's only *mostly* hidden, filter % lines,
+ ;; If it's only *mostly* hidden, filter % lines,
;; and show anything that remains
(if (eq idlwave-shell-hide-output 'mostly)
(let ((filtered
- (idlwave-shell-filter-hidden-output
+ (idlwave-shell-filter-hidden-output
full-output)))
- (if filtered
- (idlwave-shell-comint-filter
+ (if filtered
+ (idlwave-shell-comint-filter
proc filtered))))))
-
+
;; Call the post-command hook
(if (listp idlwave-shell-post-command-hook)
(progn
@@ -1684,7 +1683,7 @@ and then calls `idlwave-shell-send-command' for any pending commands."
idlwave-shell-post-command-hook nil
idlwave-shell-hide-output nil
idlwave-shell-show-if-error nil))
- ;; Done with post command. Do pending command if
+ ;; Done with post command. Do pending command if
;; any.
(idlwave-shell-send-command)))
(store-match-data data)))))
@@ -1703,7 +1702,7 @@ and then calls `idlwave-shell-send-command' for any pending commands."
(condition-case nil
(comint-write-input-ring)
(error nil)))))
-
+
(when (and (> (length (frame-list)) 1)
(frame-live-p idlwave-shell-idl-wframe))
(delete-frame idlwave-shell-idl-wframe)
@@ -1729,7 +1728,7 @@ and then calls `idlwave-shell-send-command' for any pending commands."
(defvar idlwave-shell-syntax-error
"^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
"A regular expression to match an IDL syntax error.
-The 1st pair matches the file name, the second pair matches the line
+The first pair matches the file name, the second pair matches the line
number.")
(defvar idlwave-shell-other-error
@@ -1763,7 +1762,7 @@ number.")
"\\)" ; end line number group (5)
)
"*A regular expression to parse out the file name and line number.
-The 1st group should match the subroutine name.
+The 1st group should match the subroutine name.
The 3rd group is the line number.
The 5th group is the file name.
All parts may contain linebreaks surrounded by spaces. This is important
@@ -1772,21 +1771,22 @@ in IDL5 which inserts random linebreaks in long module and file names.")
(defvar idlwave-shell-electric-debug-mode) ; defined by easy-mmode
(defun idlwave-shell-scan-for-state ()
- "Scan for state info. Looks for messages in output from last IDL
-command indicating where IDL has stopped. The types of messages we are
-interested in are execution halted, stepped, breakpoint, interrupted
-at and trace messages. For breakpoint messages process any attached
-count or command parameters. Update the stop line if a message is
-found. The variable `idlwave-shell-current-state' is set to 'error,
-'halt, or 'breakpoint, which describes the status, or nil for none of
+ "Scan for state info.
+Looks for messages in output from last IDL command indicating where
+IDL has stopped. The types of messages we are interested in are
+execution halted, stepped, breakpoint, interrupted at and trace
+messages. For breakpoint messages process any attached count or
+command parameters. Update the stop line if a message is found.
+The variable `idlwave-shell-current-state' is set to 'error, 'halt,
+or 'breakpoint, which describes the status, or nil for none of
the above."
(let (trace)
(cond
;; Make sure we have output
((not idlwave-shell-command-output))
-
+
;; First Priority: Syntax and other errors
- ((or
+ ((or
(string-match idlwave-shell-syntax-error
idlwave-shell-command-output)
(string-match idlwave-shell-other-error
@@ -1799,19 +1799,19 @@ the above."
(setq idlwave-shell-error-last (point)))
(setq idlwave-shell-current-state 'error)
(idlwave-shell-goto-next-error))
-
+
;; Second Priority: Halting errors
((string-match idlwave-shell-halting-error
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
+ (idlwave-shell-parse-line
+ (substring idlwave-shell-command-output
(match-beginning 2)))
idlwave-shell-current-state 'error)
(idlwave-shell-display-line (idlwave-shell-pc-frame)))
-
+
;; Third Priority: Various types of innocuous HALT and
;; TRACEBACK messages.
((or (setq trace (string-match idlwave-shell-trace-message-re
@@ -1821,27 +1821,27 @@ the above."
;; Grab the file and line state info.
(setq idlwave-shell-calling-stack-index 0)
(setq idlwave-shell-halt-frame
- (idlwave-shell-parse-line
+ (idlwave-shell-parse-line
(substring idlwave-shell-command-output (match-end 0))))
(setq idlwave-shell-current-state 'halt)
;; Don't debug trace messages
- (idlwave-shell-display-line
+ (idlwave-shell-display-line
(idlwave-shell-pc-frame) nil
(if trace 'disable
(if idlwave-shell-electric-debug-mode 'force))))
-
- ;; Fourth Priority: Breakpoints
+
+ ;; Fourth 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
+ (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
+ (let ((bp (assoc
(list
(nth 0 idlwave-shell-halt-frame)
(nth 1 idlwave-shell-halt-frame))
@@ -1854,9 +1854,9 @@ the above."
;; A breakpoint that we did not know about - perhaps it was
;; set by the user... Let's update our list.
(idlwave-shell-bp-query)))
- (setq idlwave-shell-current-state 'breakpoint)
+ (setq idlwave-shell-current-state 'breakpoint)
(idlwave-shell-display-line (idlwave-shell-pc-frame)))
-
+
;; Last Priority: Can't Step errors
((string-match idlwave-shell-cant-continue-error
idlwave-shell-command-output)
@@ -1874,7 +1874,7 @@ the above."
;IDL5. These line breaks can be right in the middle of procedure
;or file names.
;It is very difficult to come up with a robust solution. This one seems
-;to be pretty good though.
+;to be pretty good though.
;
;Here is in what ways it improves over the previous solution:
;
@@ -1899,7 +1899,7 @@ the above."
(setq procedure (match-string 1 string)
number (match-string 3 string)
file (match-string 5 string))
-
+
;; Repair the strings
(setq procedure (idlwave-shell-repair-string procedure))
(setq number (idlwave-shell-repair-string number))
@@ -1996,7 +1996,7 @@ IDL can convert a single space to a newline, so we must check all options."
The size is given by `idlwave-shell-graphics-window-size'."
(interactive "P")
(let ((n (if n (prefix-numeric-value n) 0)))
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
(apply 'format "window,%d,xs=%d,ys=%d"
n idlwave-shell-graphics-window-size)
nil (idlwave-shell-hide-p 'misc) nil t)))
@@ -2016,20 +2016,20 @@ directory."
Also get rid of widget events in the queue."
(interactive "P")
(save-selected-window
- ;;if (widget_info(/MANAGED))[0] gt 0 then for i=0,n_elements(widget_info(/MANAGED))-1 do widget_control,(widget_info(/MANAGED))[i],/clear_events &
- (idlwave-shell-send-command "retall" nil
- (if (idlwave-shell-hide-p 'misc) 'mostly)
+ ;;if (widget_info(/MANAGED))[0] gt 0 then for i=0,n_elements(widget_info(/MANAGED))-1 do widget_control,(widget_info(/MANAGED))[i],/clear_events &
+ (idlwave-shell-send-command "retall" nil
+ (if (idlwave-shell-hide-p 'misc) 'mostly)
nil t)
(idlwave-shell-display-line nil)))
(defun idlwave-shell-closeall (&optional arg)
"Close all open files."
(interactive "P")
- (idlwave-shell-send-command "close,/all" nil
+ (idlwave-shell-send-command "close,/all" nil
(idlwave-shell-hide-p 'misc) nil t))
(defun idlwave-shell-quit (&optional arg)
- "Exit the idl process after confirmation.
+ "Exit the IDL process after confirmation.
With prefix ARG, exit without confirmation."
(interactive "P")
(if (not (idlwave-shell-is-running))
@@ -2041,14 +2041,14 @@ With prefix ARG, exit without confirmation."
(defun idlwave-shell-reset (&optional hidden)
"Reset IDL. Return to main level and destroy the leftover variables.
-This issues the following commands:
+This issues the following commands:
RETALL
WIDGET_CONTROL,/RESET
CLOSE, /ALL
HEAP_GC, /VERBOSE"
;; OBJ_DESTROY, OBJ_VALID() FIXME: should this be added?
(interactive "P")
- (when (or idlwave-shell-reset-no-prompt
+ (when (or idlwave-shell-reset-no-prompt
(yes-or-no-p "Really Reset IDL and discard current session? "))
(message "Resetting IDL")
(setq idlwave-shell-calling-stack-index 0)
@@ -2094,14 +2094,14 @@ HEAP_GC, /VERBOSE"
;; Set dummy values and kill the text
(setq sep "@" sep-re "@ *" text "")
(if idlwave-idlwave_routine_info-compiled
- (message
- "Routine Info warning: No match for BEGIN line in \n>>>\n%s\n<<<\n"
+ (message
+ "Routine Info warning: No match for BEGIN line in \n>>>\n%s\n<<<\n"
idlwave-shell-command-output)))
(if (string-match "^>>>END OF IDLWAVE ROUTINE INFO.*" text)
(setq text (substring text 0 (match-beginning 0)))
(if idlwave-idlwave_routine_info-compiled
- (message
- "Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n"
+ (message
+ "Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n"
idlwave-shell-command-output)))
;; Match the output lines
(while (string-match "^IDLWAVE-\\(PRO\\|FUN\\): \\(.*\\)" text start)
@@ -2116,59 +2116,59 @@ HEAP_GC, /VERBOSE"
key (nth 4 specs)
keys (if (and (stringp key)
(not (string-match "\\` *\\'" key)))
- (mapcar 'list
+ (mapcar 'list
(delete "" (idlwave-split-string key " +")))))
(setq name (idlwave-sintern-routine-or-method name class t)
class (idlwave-sintern-class class t)
file (if (equal file "") nil file)
- keys (mapcar (lambda (x)
+ keys (mapcar (lambda (x)
(list (idlwave-sintern-keyword (car x) t))) keys))
-
+
;; In the following ignore routines already defined in buffers,
;; assuming that if the buffer stuff differs, it is a "new"
;; version, not yet compiled, and should take precedence.
;; We could do the same for the library to avoid duplicates -
;; but I think frequently a user might have several versions of
- ;; the same function in different programs, and in this case the
+ ;; the same function in different programs, and in this case the
;; compiled one will be the best guess of all versions.
;; Therefore, we leave duplicates of library routines in.
(cond ((string= name "$MAIN$")) ; ignore this one
((and (string= type "PRO")
;; FIXME: is it OK to make the buffer routines dominate?
(or t (null file)
- (not (idlwave-rinfo-assq name 'pro class
+ (not (idlwave-rinfo-assq name 'pro class
idlwave-buffer-routines)))
;; FIXME: is it OK to make the library routines dominate?
- ;;(not (idlwave-rinfo-assq name 'pro class
+ ;;(not (idlwave-rinfo-assq name 'pro class
;; idlwave-library-routines))
)
- (setq entry (list name 'pro class
- (cons 'compiled
+ (setq entry (list name 'pro class
+ (cons 'compiled
(if file
(list
(file-name-nondirectory file)
- (idlwave-sintern-dir
+ (idlwave-sintern-dir
(file-name-directory file)))))
cs (cons nil keys)))
- (if file
+ (if file
(push entry idlwave-compiled-routines)
(push entry idlwave-unresolved-routines)))
-
+
((and (string= type "FUN")
;; FIXME: is it OK to make the buffer routines dominate?
(or t (not file)
- (not (idlwave-rinfo-assq name 'fun class
+ (not (idlwave-rinfo-assq name 'fun class
idlwave-buffer-routines)))
;; FIXME: is it OK to make the library routines dominate?
- ;; (not (idlwave-rinfo-assq name 'fun class
+ ;; (not (idlwave-rinfo-assq name 'fun class
;; idlwave-library-routines))
)
- (setq entry (list name 'fun class
+ (setq entry (list name 'fun class
(cons 'compiled
(if file
(list
(file-name-nondirectory file)
- (idlwave-sintern-dir
+ (idlwave-sintern-dir
(file-name-directory file)))))
cs (cons nil keys)))
(if file
@@ -2198,10 +2198,10 @@ Change the default directory for the process buffer to concur."
expression)
(save-excursion
(goto-char apos)
- (setq expression (buffer-substring
+ (setq expression (buffer-substring
(catch 'exit
(while t
- (if (not (re-search-backward
+ (if (not (re-search-backward
"[^][.A-Za-z0-9_() ]" bos t))
(throw 'exit bos)) ;ran into bos
(if (not (idlwave-is-pointer-dereference bol))
@@ -2210,7 +2210,7 @@ Change the default directory for the process buffer to concur."
(when (not (string= expression ""))
(setq idlwave-shell-get-object-class nil)
(idlwave-shell-send-command
- (concat "if obj_valid(" expression ") then print,obj_class("
+ (concat "if obj_valid(" expression ") then print,obj_class("
expression ")")
'idlwave-shell-parse-object-class
'hide 'wait)
@@ -2241,7 +2241,7 @@ keywords."
(interactive "P")
(let (exec-cmd)
(cond
- ((and
+ ((and
(setq exec-cmd (idlwave-shell-executive-command))
(cdr exec-cmd)
(member (upcase (cdr exec-cmd))
@@ -2251,7 +2251,7 @@ keywords."
(idlwave-shell-complete-filename))
((car-safe exec-cmd)
- (setq idlwave-completion-help-info
+ (setq idlwave-completion-help-info
'(idlwave-shell-complete-execcomm-help))
(idlwave-complete-in-buffer 'execcomm 'execcomm
idlwave-executive-commands-alist nil
@@ -2270,7 +2270,7 @@ keywords."
(let ((case-fold-search t))
(not (looking-at ".*obj_new")))))
(idlwave-shell-complete-filename))
-
+
(t
;; Default completion of modules and keywords
(idlwave-complete arg)))))
@@ -2292,7 +2292,7 @@ keywords."
We assume that we are after a file name when completing one of the
args of an executive .run, .rnew or .compile."
;; CWD might have changed, resync, to set default directory
- (idlwave-shell-resync-dirs)
+ (idlwave-shell-resync-dirs)
(let ((comint-file-name-chars idlwave-shell-file-name-chars))
(comint-dynamic-complete-as-filename)))
@@ -2314,7 +2314,7 @@ args of an executive .run, .rnew or .compile."
(memq (preceding-char) '(?\' ?\")))))
(defun idlwave-shell-batch-command ()
- "Returns t if we're in a batch command statement like @foo"
+ "Return 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
@@ -2323,16 +2323,16 @@ args of an executive .run, .rnew or .compile."
(and (eq (preceding-char) ?@) (not (idlwave-in-quote))))))
(defun idlwave-shell-shell-command ()
- "Returns t if we're in a shell command statement like $ls"
+ "Return t if we're in a shell command statement like $ls"
(save-excursion
(idlwave-beginning-of-statement)
(looking-at "\\$")))
;; Debugging Commands ------------------------------------------------------
(defun idlwave-shell-redisplay (&optional hide)
- "Tries to resync the display with where execution has stopped.
-Issues a \"help,/trace\" command followed by a call to
+ "Try to resync the display with where execution has stopped.
+Issues a \"help,/trace\" command followed by a call to
`idlwave-shell-display-line'. Also updates the breakpoint
overlays."
(interactive)
@@ -2344,7 +2344,7 @@ overlays."
(idlwave-shell-bp-query))
(defun idlwave-shell-display-level-in-calling-stack (&optional hide)
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
"help,/trace"
`(progn
;; scanning for the state will reset the stack level - restore it
@@ -2375,14 +2375,14 @@ overlays."
(setq idlwave-shell-calling-stack-index nmin
message (format "%d is the current calling stack level - can't go further down"
(- nmin)))))
- (setq idlwave-shell-calling-stack-routine
+ (setq idlwave-shell-calling-stack-routine
(nth 2 (nth idlwave-shell-calling-stack-index stack)))
;; force edebug for this frame if we're in that mode already
- (idlwave-shell-display-line
+ (idlwave-shell-display-line
(nth idlwave-shell-calling-stack-index stack) nil
(if idlwave-shell-electric-debug-mode 'force))
- (message "%s" (or message
+ (message "%s" (or message
(format "In routine %s (stack level %d)"
idlwave-shell-calling-stack-routine
(- idlwave-shell-calling-stack-index))))))
@@ -2400,20 +2400,21 @@ overlays."
(defun idlwave-shell-goto-frame (&optional frame)
"Set buffer to FRAME with point at the frame line.
-If the optional argument FRAME is nil then idlwave-shell-pc-frame is
-used. Does nothing if the resulting frame is nil."
+If the optional argument FRAME is nil then `idlwave-shell-pc-frame'
+is used. Does nothing if the resulting frame is nil."
(if frame ()
(setq frame (idlwave-shell-pc-frame)))
(cond
(frame
(set-buffer (idlwave-find-file-noselect (car frame) 'shell))
(widen)
- (goto-line (nth 1 frame)))))
+ (goto-char (point-min))
+ (forward-line (1- (nth 1 frame))))))
(defun idlwave-shell-pc-frame ()
- "Returns the frame for IDL execution."
+ "Return the frame for IDL execution."
(and idlwave-shell-halt-frame
- (list (nth 0 idlwave-shell-halt-frame)
+ (list (nth 0 idlwave-shell-halt-frame)
(nth 1 idlwave-shell-halt-frame)
(nth 2 idlwave-shell-halt-frame))))
@@ -2431,17 +2432,17 @@ used. Does nothing if the resulting frame is nil."
(defvar idlwave-shell-suppress-electric-debug nil)
(defun idlwave-shell-display-line (frame &optional col debug)
- "display frame file in other window with overlay arrow.
+ "Display frame file in other window with overlay arrow.
-frame is a list of file name, line number, and subroutine name. if
-frame is nil then remove overlay. if col is set, move point to that
-column in the line. if debug is non-nil, enable the electric debug
-mode. if it is 'disable, do not enable no matter what the setting of
-'idlwave-shell-automatic-electric-debug'. if it is 'force, enable no
+FRAME is a list of file name, line number, and subroutine name. If
+FRAME is nil then remove overlay. If COL is set, move point to that
+column in the line. If DEBUG is non-nil, enable the electric debug
+mode. If it is 'disable, do not enable no matter what the setting of
+`idlwave-shell-automatic-electric-debug'. If it is 'force, enable no
matter what the settings of that variable."
(if (not frame)
;; remove stop-line overlay from old position
- (progn
+ (progn
(setq overlay-arrow-string nil)
(setq idlwave-shell-mode-line-info nil)
(setq idlwave-shell-is-stopped nil)
@@ -2452,14 +2453,14 @@ matter what the settings of that variable."
(if (not (idlwave-shell-valid-frame frame))
;; fixme: errors are dangerous in shell filters. but i think i
;; have never encountered this one.
- (error (concat "invalid frame - unable to access file: " (car frame)))
-;;;
-;;; buffer : the buffer to display a line in.
-;;; select-shell: current buffer is the shell.
-;;;
+ (error "invalid frame - unable to access file: %s" (car frame))
+ ;;
+ ;; buffer : the buffer to display a line in.
+ ;; select-shell: current buffer is the shell.
+ ;;
(setq idlwave-shell-mode-line-info
(if (nth 2 frame)
- (format "[%d:%s]"
+ (format "[%d:%s]"
(- idlwave-shell-calling-stack-index)
(nth 2 frame))))
(let* ((buffer (idlwave-find-file-noselect (car frame) 'shell))
@@ -2476,21 +2477,20 @@ matter what the settings of that variable."
nil (idlwave-shell-source-frame)))
;; enter the buffer and mark the line
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(save-restriction
(widen)
- (goto-line (nth 1 frame))
- (forward-line 0)
+ (goto-char (point-min))
+ (forward-line (1- (nth 1 frame)))
(setq pos (point))
(setq idlwave-shell-is-stopped t)
-
+
(if idlwave-shell-stop-line-overlay
(progn
- ;; restore face and move overlay
+ ;; restore face and move overlay
(overlay-put idlwave-shell-stop-line-overlay 'face
(if idlwave-shell-electric-debug-mode
- idlwave-shell-electric-stop-line-face
+ idlwave-shell-electric-stop-line-face
idlwave-shell-stop-line-face))
(move-overlay idlwave-shell-stop-line-overlay
(point) (save-excursion (end-of-line) (point))
@@ -2511,71 +2511,72 @@ matter what the settings of that variable."
;; if we have the column of the error, move the cursor there.
(if col (move-to-column col))
(setq pos (point))
-
+
;; enter electric debug mode, if not prohibited and not in
;; it already
(when (and (not idlwave-shell-electric-debug-mode)
(or (eq debug 'force)
- (and
+ (and
(not (eq debug 'disable)) ;; explicitly disabled
- (or
+ (or
(eq idlwave-shell-automatic-electric-debug t)
- (and
- (eq idlwave-shell-automatic-electric-debug
+ (and
+ (eq idlwave-shell-automatic-electric-debug
'breakpoint)
(not (eq idlwave-shell-current-state 'error))))
(not idlwave-shell-suppress-electric-debug))))
(idlwave-shell-electric-debug-mode t))
(setq electric idlwave-shell-electric-debug-mode))
-
+
;; Make sure pos is really displayed in the window.
(set-window-point window pos)
-
- ;; If we came from the shell, go back there. Otherwise select
+
+ ;; If we came from the shell, go back there. Otherwise select
;; the window where the error/halt is displayed.
(if (or (and idlwave-shell-electric-zap-to-file electric)
- (and (equal (buffer-name) (idlwave-shell-buffer))
+ (and (equal (buffer-name) (idlwave-shell-buffer))
(not select-shell)))
(select-window window))))))
(defun idlwave-shell-step (arg)
- "Step one source line. If given prefix argument ARG, step ARG source lines."
+ "Step one source line.
+If given prefix argument ARG, step ARG source lines."
(interactive "p")
(or (not arg) (< arg 1)
(setq arg 1))
(idlwave-shell-stop-line-pending)
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
(concat ".s " (if (integerp arg) (int-to-string arg) arg))
nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
(defun idlwave-shell-stepover (arg)
"Stepover one source line.
-If given prefix argument ARG, step ARG source lines.
+If given prefix argument ARG, step ARG source lines.
Uses IDL's stepover executive command which does not enter called functions."
(interactive "p")
(or (not arg) (< arg 1)
(setq arg 1))
(idlwave-shell-stop-line-pending)
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
(concat ".so " (if (integerp arg) (int-to-string arg) arg))
nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
-(defun idlwave-shell-break-here (&optional count cmd condition disabled
+(defun idlwave-shell-break-here (&optional count cmd condition disabled
no-show)
- "Set breakpoint at current line.
+ "Set breakpoint at current line.
-If Count is nil then an ordinary breakpoint is set. We treat a count
+If COUNT is nil then an ordinary breakpoint is set. We treat a COUNT
of 1 as a temporary breakpoint using the ONCE keyword. Counts greater
than 1 use the IDL AFTER=count keyword to break only after reaching
-the statement count times.
+the statement COUNT times.
Optional argument CMD is a list or function to evaluate upon reaching
the breakpoint. CONDITION is a break condition, and DISABLED, if
-non-nil disables the breakpoint"
+non-nil disables the breakpoint."
(interactive "P")
(when (listp count)
- (if (equal (car count) 4)
+ (if (equal (car count) 4)
(setq condition (read-string "Break Condition: ")))
(setq count nil))
(idlwave-shell-set-bp
@@ -2598,15 +2599,15 @@ the problem with not being able to set the breakpoint."
;; Offer to recompile
(if (progn
(beep)
- (y-or-n-p
+ (y-or-n-p
(concat "Okay to recompile file "
(idlwave-shell-bp-get bp 'file) "?")))
;; Recompile
(progn
;; Clean up before retrying
(idlwave-shell-command-failure)
(idlwave-shell-send-command
- (concat ".run \"" (idlwave-shell-bp-get bp 'file) "\"") nil
+ (concat ".run \"" (idlwave-shell-bp-get bp 'file) "\"") nil
(if (idlwave-shell-hide-p 'run) 'mostly) nil t)
;; Try setting breakpoint again
(idlwave-shell-set-bp bp))
@@ -2619,7 +2620,7 @@ the problem with not being able to set the breakpoint."
(message "Syntax error in condition.")
(idlwave-shell-command-failure)
nil)
-
+
(t 'okay))))
(defun idlwave-shell-command-failure ()
@@ -2635,9 +2636,9 @@ breakpoint can not be set."
"Continue executing."
(interactive)
(idlwave-shell-stop-line-pending)
- (idlwave-shell-send-command ".c" (unless no-show
+ (idlwave-shell-send-command ".c" (unless no-show
'(idlwave-shell-redisplay 'hide))
- (if (idlwave-shell-hide-p 'debug) 'mostly)
+ (if (idlwave-shell-hide-p 'debug) 'mostly)
nil t))
(defun idlwave-shell-go ()
@@ -2659,7 +2660,7 @@ breakpoint can not be set."
(defun idlwave-shell-skip ()
"Run .SKIP (skip one line, then step)."
(interactive)
- (idlwave-shell-stop-line-pending)
+ (idlwave-shell-stop-line-pending)
(idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide)
(if (idlwave-shell-hide-p 'debug) 'mostly)
nil t))
@@ -2707,8 +2708,8 @@ Returns nil if unable to obtain a module name."
(defun idlwave-shell-clear-current-bp ()
"Remove breakpoint at current line.
-This command can be called from the shell buffer if IDL is currently stopped
-at a breakpoint."
+This command can be called from the shell buffer if IDL is currently
+stopped at a breakpoint."
(interactive)
(let ((bp (idlwave-shell-find-current-bp)))
(if bp (idlwave-shell-clear-bp bp))))
@@ -2727,7 +2728,7 @@ list after toggling."
((eq force 'enable) (setq disabled t)))
(when bp
(setf (nth 3 (cdr (cdr bp))) (not disabled))
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
(concat "breakpoint,"
(if disabled "/enable," "/disable,")
(int-to-string (idlwave-shell-bp-get bp)))
@@ -2741,13 +2742,13 @@ If ENABLE is non-nil, enable them instead."
(while bpl
(setq disabled (idlwave-shell-bp-get (car bpl) 'disabled))
(when (idlwave-xor (not disabled) (eq enable 'enable))
- (idlwave-shell-toggle-enable-current-bp
+ (idlwave-shell-toggle-enable-current-bp
(car bpl) (if (eq enable 'enable) 'enable 'disable) no-update)
(push (car bpl) modified))
(setq bpl (cdr bpl)))
(unless no-update (idlwave-shell-bp-query))
modified))
-
+
(defun idlwave-shell-to-here ()
"Set a breakpoint with count 1 then continue."
(interactive)
@@ -2775,23 +2776,23 @@ in the current routine."
(name (car module))
(class (nth 2 module)))
(if module
- (progn
+ (progn
(setq module (idlwave-make-full-name class name))
(idlwave-shell-module-source-query module type)
(idlwave-shell-set-bp-in-module name type class))
(error "No identifier at point"))))
(defun idlwave-shell-set-bp-in-module (name type class)
- "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist'
-contains an entry for that module."
+ "Set breakpoint in module.
+Assumes that `idlwave-shell-sources-alist' contains an entry for that module."
(let* ((module (idlwave-make-full-name class name))
- (source-file
+ (source-file
(car-safe (cdr-safe
(or
(assoc (upcase module)
idlwave-shell-sources-alist)
- (nth 3 (idlwave-best-rinfo-assoc name type class
+ (nth 3 (idlwave-best-rinfo-assoc name type class
(idlwave-routines)))))))
buf)
(if (or (not source-file)
@@ -2808,7 +2809,7 @@ contains an entry for that module."
(save-excursion
(goto-char (point-min))
(let ((case-fold-search t))
- (if (re-search-forward
+ (if (re-search-forward
(concat "^[ \t]*\\(pro\\|function\\)[ \t]+"
(downcase module)
"[ \t\n,]") nil t)
@@ -2850,7 +2851,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 ".o" nil
+ (idlwave-shell-send-command ".o" nil
(if (idlwave-shell-hide-p 'debug) 'mostly)
nil t))
@@ -2898,8 +2899,8 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
(let* ((drag-track (fboundp 'mouse-drag-track))
(transient-mark-mode t)
(zmacs-regions t)
- (tracker (if (featurep 'xemacs)
- (if (fboundp
+ (tracker (if (featurep 'xemacs)
+ (if (fboundp
'default-mouse-track-event-is-with-button)
'idlwave-xemacs-hack-mouse-track
'mouse-track)
@@ -2911,35 +2912,35 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
(idlwave-shell-print (if (idlwave-region-active-p) '(4) nil)
,help ,ev))))
-;;; Begin terrible hack section -- XEmacs tests for button2 explicitly
-;;; on drag events, calling drag-n-drop code if detected. Ughhh...
+;; Begin terrible hack section -- XEmacs tests for button2 explicitly
+;; on drag events, calling drag-n-drop code if detected. Ughhh...
(defun idlwave-default-mouse-track-event-is-with-button (event n)
t)
(defun idlwave-xemacs-hack-mouse-track (event)
(if (featurep 'xemacs)
- (let ((oldfunc (symbol-function
+ (let ((oldfunc (symbol-function
'default-mouse-track-event-is-with-button)))
(unwind-protect
(progn
- (fset 'default-mouse-track-event-is-with-button
+ (fset 'default-mouse-track-event-is-with-button
'idlwave-default-mouse-track-event-is-with-button)
(mouse-track event))
(fset 'default-mouse-track-event-is-with-button oldfunc)))))
;;; End terrible hack section
(defun idlwave-shell-mouse-print (event)
- "Print value of variable at the mouse position, with `help'"
+ "Print value of variable at the mouse position, with `print'."
(interactive "e")
(funcall (idlwave-shell-mouse-examine nil) event))
(defun idlwave-shell-mouse-help (event)
- "Print value of variable at the mouse position, with `print'."
+ "Print value of variable at the mouse position, with `help'."
(interactive "e")
(funcall (idlwave-shell-mouse-examine 'help) event))
(defun idlwave-shell-examine-select (event)
- "Pop-up a list to select from for examining the expression"
+ "Pop-up a list to select from for examining the expression."
(interactive "e")
(funcall (idlwave-shell-mouse-examine nil event) event))
@@ -2954,7 +2955,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
(defvar idlwave-shell-examine-completion-list nil)
(defun idlwave-shell-print (arg &optional help ev complete-help-type)
- "Print current expression.
+ "Print current expression.
With HELP non-nil, show help on expression. If HELP is a string,
the expression will be put in place of ___, e.g.:
@@ -2970,7 +2971,7 @@ An expression is an identifier plus 1 pair of matched parentheses
directly following the identifier - an array or function call.
Alternatively, an expression is the contents of any matched
parentheses when the open parenthesis is not directly preceded by an
-identifier. If point is at the beginning or within an expression
+identifier. If point is at the beginning or within an expression
return the inner-most containing expression, otherwise, return the
preceding expression.
@@ -2980,9 +2981,9 @@ use the current region as the expression.
With double prefix arg ARG prompt for an expression.
If EV is a valid event passed, pop-up a list from
-idlw-shell-examine-alist from which to select the help command text.
-If instead COMPLETE-HELP-TYPE is non-nil, choose from
-idlw-shell-examine-alist via mini-buffer shortcut key."
+`idlwave-shell-examine-alist' from which to select the help
+command text. If instead COMPLETE-HELP-TYPE is non-nil, choose
+from `idlwave-shell-examine-alist' via mini-buffer shortcut key."
(interactive "P")
;; For speed: assume the helper routine hasn't been lost, e.g. with
@@ -2992,11 +2993,11 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
(save-excursion
(let* ((process (get-buffer-process (current-buffer)))
(process-mark (if process (process-mark process)))
- (stack-label
+ (stack-label
(if (and (integerp idlwave-shell-calling-stack-index)
(> idlwave-shell-calling-stack-index 0))
- (format " [-%d:%s]"
- idlwave-shell-calling-stack-index
+ (format " [-%d:%s]"
+ idlwave-shell-calling-stack-index
idlwave-shell-calling-stack-routine)))
expr beg end cmd)
(cond
@@ -3026,7 +3027,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
;; an array
(forward-sexp))
(setq end (point)))))
-
+
;; Get expression, but first move the begin mark if a
;; process-mark is inside the region, to keep the overlay from
;; wandering in the Shell.
@@ -3037,13 +3038,13 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
;; Show the overlay(s) and attach any necessary hooks and filters
(when (and beg end idlwave-shell-expression-overlay)
- (move-overlay idlwave-shell-expression-overlay beg end
+ (move-overlay idlwave-shell-expression-overlay beg end
(current-buffer))
- (add-hook 'pre-command-hook
+ (add-hook 'pre-command-hook
'idlwave-shell-delete-expression-overlay))
(add-hook 'pre-command-hook
'idlwave-shell-delete-output-overlay)
-
+
;; Remove empty or comment-only lines
(while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr)
(setq expr (replace-match "\n" t t expr)))
@@ -3053,41 +3054,41 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
;; Remove final newline
(if (string-match "\n[ \t\r]*\\'" expr)
(setq expr (replace-match "" t t expr)))
-
+
(catch 'exit
;; Pop-up or complete on the examine selection list, if appropriate
(if (or
complete-help-type
(and ev idlwave-shell-examine-alist)
(consp help))
- (let ((help-cons
+ (let ((help-cons
(if (consp help) help
- (assoc
+ (assoc
;; A cons from either a pop-up or mini-buffer completion
(if complete-help-type
(idlwave-one-key-select 'idlwave-shell-examine-alist
"Examine with: " 1.5)
;; (idlwave-completing-read
-;; "Examine with: "
+;; "Examine with: "
;; idlwave-shell-examine-alist nil nil nil
;; 'idlwave-shell-examine-completion-list
;; "Print")
- (idlwave-popup-select
- ev
- (mapcar 'car idlwave-shell-examine-alist)
+ (idlwave-popup-select
+ ev
+ (mapcar 'car idlwave-shell-examine-alist)
"Examine with"))
idlwave-shell-examine-alist))))
(setq help (cdr help-cons))
(if (null help) (throw 'exit nil))
(if idlwave-shell-separate-examine-output
- (setq idlwave-shell-examine-label
- (concat
+ (setq idlwave-shell-examine-label
+ (concat
(format "==>%s<==\n%s:" expr (car help-cons))
stack-label "\n"))))
;; The regular help label (no popups, cons cells, etc.)
(setq idlwave-shell-examine-label
(concat
- (format "==>%s<==\n%s:" expr
+ (format "==>%s<==\n%s:" expr
(cond ((null help) "print")
((stringp help) help)
(t (symbol-name help))))
@@ -3100,8 +3101,8 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
idlwave-shell-calling-stack-index)))
(setq cmd (idlwave-shell-help-statement help expr))
;;(idlwave-shell-recenter-shell-window)
- (idlwave-shell-send-command
- cmd
+ (idlwave-shell-send-command
+ cmd
'idlwave-shell-check-compiled-and-display
(if idlwave-shell-separate-examine-output 'hide))))))
@@ -3177,21 +3178,21 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
(setq buffer-read-only t)
(move-overlay idlwave-shell-output-overlay cur-beg cur-end
(current-buffer))
-
+
;; Look for the examine buffer in all windows. If one is
;; found in a frame all by itself, use that, otherwise, switch
;; to or create an examine window in this frame, and resize if
;; it's a newly created window
(let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible)))
- (setq win (idlwave-display-buffer
- "*Examine*"
+ (setq win (idlwave-display-buffer
+ "*Examine*"
nil
(let ((list winlist) thiswin)
(catch 'exit
(save-selected-window
(while (setq thiswin (pop list))
(select-window thiswin)
- (if (one-window-p)
+ (if (one-window-p)
(throw 'exit (window-frame thiswin)))))))))
(set-window-start win (point-min)) ; Ensure the point is visible.
(save-selected-window
@@ -3212,7 +3213,7 @@ idlw-shell-examine-alist via mini-buffer shortcut key."
;; And add the new value.
(if (setq elt (assoc win idlwave-shell-examine-window-alist))
(setcdr elt (window-height))
- (add-to-list 'idlwave-shell-examine-window-alist
+ (add-to-list 'idlwave-shell-examine-window-alist
(cons win (window-height)))))))))
;; Recenter for maximum output, after widened
(save-selected-window
@@ -3258,14 +3259,14 @@ versions of IDL."
;; break. We will look for identifiers and exclude cases where we
;; know it is not a variable. To distinguish array references from
;; function calls, we require that arrays use [] instead of ()
-
+
(while (string-match
"\\(\\`\\|[^a-zA-Z0-9$_][ \t]*\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([ \t]*[^a-zA-Z0-9$_]\\|\\'\\)" expr start)
(setq var (match-string 2 expr)
start (match-end 2)
pre (substring expr 0 (match-beginning 2))
post (substring expr (match-end 2)))
- (cond
+ (cond
((or
;; Exclude identifiers which are not variables
(string-match ",[ \t$\n]*/\\'" pre) ;; a `/' KEYWORD
@@ -3277,13 +3278,13 @@ versions of IDL."
;; Skip over strings
((and (string-match "\\([\"\']\\)[^\1]*$" pre)
- (string-match (concat "^[^" (match-string 1 pre) "]*"
+ (string-match (concat "^[^" (match-string 1 pre) "]*"
(match-string 1 pre)) post))
(setq start (+ start (match-end 0))))
-
+
;; seems to be a variable - delimit its name
- (t
+ (t
(put-text-property start (- start (length var)) 'fetch t expr))))
(setq start 0)
@@ -3296,7 +3297,7 @@ versions of IDL."
(unless fetch-end (setq fetch-end (length expr)))
(remove-text-properties fetch-start fetch-end '(fetch) expr)
(setq expr (concat (substring expr 0 fetch-start)
- (format "(routine_names('%s',fetch=%d))"
+ (format "(routine_names('%s',fetch=%d))"
(substring expr fetch-start fetch-end)
fetch)
(substring expr fetch-end)))
@@ -3314,16 +3315,16 @@ to insert expression in place of the marker ___, e.g.: print,
size(___,/DIMENSIONS)"
(cond
((null help)
- (concat "idlwave_print_safe, " expr ","
+ (concat "idlwave_print_safe, " expr ","
(number-to-string idlwave-shell-max-print-length)))
- ((stringp help)
+ ((stringp help)
(if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help)
(concat (substring help 0 (match-beginning 2))
expr
(substring help (match-end 2)))))
- (t
+ (t
(concat "help, " expr))))
-
+
(defun idlwave-shell-examine-highlight ()
"Highlight the most recent IDL output."
@@ -3356,7 +3357,7 @@ size(___,/DIMENSIONS)"
(delete-overlay idlwave-shell-output-overlay))
(error nil))
(remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay)))
-
+
(defun idlwave-shell-delete-expression-overlay ()
(unless (or (eq this-command 'idlwave-shell-mouse-nop)
(eq this-command 'handle-switch-frame))
@@ -3391,7 +3392,7 @@ command - command to execute when breakpoint is reached, either a
condition - any condition to apply to the breakpoint.
-disabled - whether the bp is disabled")
+disabled - whether the bp is disabled.")
(defun idlwave-shell-run-region (beg end &optional n)
"Compile and run the region using the IDL process.
@@ -3419,13 +3420,13 @@ 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-send-command (concat ".run \""
idlwave-shell-temp-pro-file "\"")
- nil
+ nil
(if (idlwave-shell-hide-p 'run) 'mostly)
nil t)
(if n
- (idlwave-display-buffer (idlwave-shell-buffer)
+ (idlwave-display-buffer (idlwave-shell-buffer)
nil (idlwave-shell-shell-frame)
idlwave-shell-buffer-height-frac))))
@@ -3437,7 +3438,7 @@ Does not work for a region with multiline blocks - use
(interactive "r\nP")
(idlwave-shell-send-command (buffer-substring beg end))
(if n
- (idlwave-display-buffer (idlwave-shell-buffer)
+ (idlwave-display-buffer (idlwave-shell-buffer)
nil (idlwave-shell-shell-frame)
idlwave-shell-buffer-height-frac)))
@@ -3506,12 +3507,12 @@ Queries IDL using the string in `idlwave-shell-bp-query'."
'hide))
(defun idlwave-shell-bp-get (bp &optional item)
- "Get a value for a breakpoint. BP has the form of elements in
-idlwave-shell-bp-alist. Optional second arg ITEM is the
-particular value to retrieve. ITEM can be 'file, 'line, 'index,
-'module, 'count, 'cmd, 'condition, 'disabled, 'type, or
-'data. 'data returns a list of 'count, 'cmd and 'condition.
-Defaults to 'index."
+ "Get a value for a breakpoint.
+BP has the form of elements in `idlwave-shell-bp-alist'.
+Optional second arg ITEM is the particular value to retrieve.
+ITEM can be 'file, 'line, 'index, 'module, 'count, 'cmd,
+'condition, 'disabled, 'type, or 'data. 'data returns a list
+of 'count, 'cmd and 'condition. Defaults to 'index."
(cond
;; Frame
((eq item 'line) (nth 1 (car bp)))
@@ -3523,7 +3524,7 @@ Defaults to 'index."
((eq item 'condition) (nth 2 (cdr (cdr bp))))
((eq item 'disabled) (nth 3 (cdr (cdr bp))))
;; IDL breakpoint info
- ((eq item 'module)
+ ((eq item 'module)
(let ((module (nth 1 (car (cdr bp)))))
(if (listp module) (car module) module)))
((eq item 'type)
@@ -3546,8 +3547,8 @@ breakpoint overlays."
;; 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
- (concat
+ (bp-re55
+ (concat
"^\\s-*\\([0-9]+\\)" ; 1 index
"\\s-+\\([0-9]+\\)" ; 2 line number
"\\s-+\\(Uncompiled\\|" ; 3-6 either uncompiled or routine name
@@ -3562,11 +3563,11 @@ breakpoint overlays."
bp-re indmap)
(setq idlwave-shell-bp-alist (list nil))
;; Search for either header type, and set the correct regexp
- (when (or
+ (when (or
(if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t)
- (setq bp-re bp-re54 ; versions <= 5.4
+ (setq bp-re bp-re54 ; versions <= 5.4
indmap '(1 2 3 4))) ;index module line file
- (if (re-search-forward
+ (if (re-search-forward
"^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t)
(setq bp-re bp-re55 ; versions >= 5.5
indmap '(1 6 2 16)))) ; index module line file
@@ -3607,8 +3608,8 @@ breakpoint overlays."
"Update BP data in breakpoint list.
If BP frame is in `idlwave-shell-bp-alist' updates the breakpoint data."
(let ((match (assoc (car bp) idlwave-shell-bp-alist)))
- (if match
- (if command-only
+ (if match
+ (if command-only
(setf (nth 1 (cdr (cdr match))) (nth 1 (cdr (cdr match))))
(setcdr (cdr match) (cdr (cdr bp)))))))
@@ -3617,10 +3618,11 @@ If BP frame is in `idlwave-shell-bp-alist' updates the breakpoint data."
(setcdr (cdr bp) data))
(defun idlwave-shell-bp (frame &optional data module)
- "Create a breakpoint structure containing FRAME and DATA. Second
-and third args, DATA and MODULE, are optional. Returns a breakpoint
-of the format used in `idlwave-shell-bp-alist'. Can be used in commands
-attempting match a breakpoint in `idlwave-shell-bp-alist'."
+ "Create a breakpoint structure containing FRAME and DATA.
+Second and third args, DATA and MODULE, are optional. Returns
+a breakpoint of the format used in `idlwave-shell-bp-alist'.
+Can be used in commands attempting match a breakpoint in
+`idlwave-shell-bp-alist'."
(cons frame ;; (file line)
(cons (list nil module) ;; (index_id (module type) | module)
data))) ;; (count command condition disabled)
@@ -3631,11 +3633,11 @@ attempting match a breakpoint in `idlwave-shell-bp-alist'."
(defun idlwave-shell-sources-bp (bp)
"Check `idlwave-shell-sources-alist' for source of breakpoint using BP.
If an equivalency is found, return the IDL internal source name.
-Otherwise return the filename in bp."
+Otherwise return the filename in BP."
(let*
((bp-file (idlwave-shell-bp-get bp 'file))
(bp-module (idlwave-shell-bp-get bp 'module))
- (internal-file-list
+ (internal-file-list
(if bp-module
(cdr (assoc bp-module idlwave-shell-sources-alist)))))
(if (and internal-file-list
@@ -3644,14 +3646,14 @@ Otherwise return the filename in bp."
bp-file)))
(defun idlwave-shell-set-bp (bp &optional no-show)
- "Try to set a breakpoint BP.
+ "Try to set a breakpoint 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
specified. If NO-SHOW is non-nil, don't do any updating."
;; Get and save the old breakpoints
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
idlwave-shell-bp-query
`(progn
(idlwave-shell-filter-bp (quote ,no-show))
@@ -3679,7 +3681,7 @@ specified. If NO-SHOW is non-nil, don't do any updating."
",/DISABLE")))
(line (idlwave-shell-bp-get bp 'line)))
(idlwave-shell-send-command
- (concat "breakpoint,'"
+ (concat "breakpoint,'"
(idlwave-shell-sources-bp bp) "',"
(if (integerp line) (setq line (int-to-string line)))
key)
@@ -3693,7 +3695,7 @@ specified. If NO-SHOW is non-nil, don't do any updating."
(defun idlwave-shell-set-bp-adjust (bp &optional no-show)
"Find the breakpoint in IDL's internal list of breakpoints."
- (idlwave-shell-send-command
+ (idlwave-shell-send-command
idlwave-shell-bp-query
`(progn
(idlwave-shell-filter-bp 'no-show)
@@ -3749,11 +3751,11 @@ considered the new breakpoint if the file name of frame matches."
(message "Failed to identify breakpoint in IDL"))))
(defvar idlwave-shell-bp-overlays nil
- "Alist of overlays marking breakpoints")
+ "Alist of overlays marking breakpoints.")
(defvar idlwave-shell-bp-glyph)
(defvar idlwave-shell-debug-line-map (make-sparse-keymap))
-(define-key idlwave-shell-debug-line-map
+(define-key idlwave-shell-debug-line-map
(if (featurep 'xemacs) [button3] [mouse-3])
'idlwave-shell-mouse-active-bp)
@@ -3768,14 +3770,14 @@ Existing overlays are recycled, in order to minimize consumption."