annotate lisp/progmodes/idlw-shell.el @ 57672:d8b07169ce26

(Info-find-emacs-command-nodes): Adapt to Texinfo-4.7 style indexes.
author Luc Teirlinck <teirllm@auburn.edu>
date Sun, 24 Oct 2004 18:36:28 +0000
parents 0c0b514a4952
children 7cda0787d8cd 50b9a96c837c 4c90ffeb71c5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1 ;; idlw-shell.el --- run IDL as an inferior process of Emacs.
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2 ;; Copyright (c) 1999, 2000, 2001,2002 Free Software Foundation
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4 ;; Author: Carsten Dominik <dominik@astro.uva.nl>
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
5 ;; Chris Chase <chase@att.com>
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
6 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
7 ;; Version: 4.15
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
8 ;; Keywords: processes
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
9
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
11
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
15 ;; any later version.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
16
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
21
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
26
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
28 ;;
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
29 ;; This mode is for IDL version 5 or later. It should work on
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
30 ;; Emacs>20.3 or XEmacs>20.4.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
31 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
32 ;; Runs IDL as an inferior process of Emacs, much like the emacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
33 ;; `shell' or `telnet' commands. Provides command history and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
34 ;; searching. Provides debugging commands available in buffers
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
35 ;; visiting IDL procedure files, e.g., breakpoint setting, stepping,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
36 ;; execution until a certain line, printing expressions under point,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
37 ;; visual line pointer for current execution line, etc.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
38 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
39 ;; Documentation should be available online with `M-x idlwave-info'.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
40 ;;
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
41 ;; New versions of IDLWAVE, documentation, and more information
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
42 ;; available from:
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
43 ;; http://idlwave.org
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
44 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
45 ;; INSTALLATION:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
46 ;; =============
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
47 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
48 ;; Follow the instructions in the INSTALL file of the distribution.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
49 ;; In short, put this file on your load path and add the following
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
50 ;; lines to your .emacs file:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
51 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
52 ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
53 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
54 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
55 ;; SOURCE
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
56 ;; ======
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
57 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
58 ;; The newest version of this file can be found on the maintainers
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
59 ;; web site.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
60 ;;
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
61 ;; http://idlwave.org
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
62 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
63 ;; DOCUMENTATION
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
64 ;; =============
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
65 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
66 ;; IDLWAVE is documented online in info format.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
67 ;; A printable version of the documentation is available from the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
68 ;; maintainers webpage (see under SOURCE)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
69 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
70 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
71 ;; KNOWN PROBLEMS
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
72 ;; ==============
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
73 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
74 ;; Under XEmacs the Debug menu in the shell does not display the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
75 ;; keybindings in the prefix map. There bindings are available anyway - so
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
76 ;; it is a bug in XEmacs.
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
77 ;; The Debug menu in source buffers *does* display the bindings correctly.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
78 ;;
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
79 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
80 ;; CUSTOMIZATION VARIABLES
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
81 ;; =======================
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
82 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
83 ;; IDLWAVE has customize support - so if you want to learn about
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
84 ;; the variables which control the behavior of the mode, use
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
85 ;; `M-x idlwave-customize'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
86 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
87 ;;--------------------------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
88 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
89
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
90 ;;; Code:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
91
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
92 (require 'comint)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
93 (require 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
94
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
95 (eval-when-compile (require 'cl))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
96
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
97 (defvar idlwave-shell-have-new-custom nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
98 (eval-and-compile
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
99 ;; Kludge to allow `defcustom' for Emacs 19.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
100 (condition-case () (require 'custom) (error nil))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
101 (if (and (featurep 'custom)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
102 (fboundp 'custom-declare-variable)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
103 (fboundp 'defface))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
104 ;; We've got what we needed
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
105 (setq idlwave-shell-have-new-custom t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
106 ;; We have the old or no custom-library, hack around it!
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
107 (defmacro defgroup (&rest args) nil)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
108 (defmacro defcustom (var value doc &rest args)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
109 `(defvar ,var ,value ,doc))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
110
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
111 ;;; Customizations: idlwave-shell group
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
112
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
113 ;; General/Misc. customizations
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
114 (defgroup idlwave-shell-general-setup nil
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
115 "General setup of the Shell interaction for IDLWAVE/Shell."
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
116 :prefix "idlwave-shell"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
117 :group 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
118
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
119 (defcustom idlwave-shell-prompt-pattern "^ ?IDL> "
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
120 "*Regexp to match IDL prompt at beginning of a line.
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
121 For example, \"^IDL> \" or \"^WAVE> \".
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
122 The \"^\" means beginning of line.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
123 This variable is used to initialise `comint-prompt-regexp' in the
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
124 process buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
125
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
126 This is a fine thing to set in your `.emacs' file."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
127 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
128 :type 'regexp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
129
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
130 (defcustom idlwave-shell-process-name "idl"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
131 "*Name to be associated with the IDL process. The buffer for the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
132 process output is made by surrounding this name with `*'s."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
133 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
134 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
135
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
136 ;; (defcustom idlwave-shell-automatic-start...) See idlwave.el
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
137
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
138 (defcustom idlwave-shell-use-dedicated-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
139 "*Non-nil means, IDLWAVE should use a special frame to display shell buffer."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
140 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
141 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
142
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
143 (defcustom idlwave-shell-frame-parameters
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
144 '((height . 30) (unsplittable . nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
145 "The frame parameters for a dedicated idlwave-shell frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
146 See also `idlwave-shell-use-dedicated-frame'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
147 The default makes the frame splittable, so that completion works correctly."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
148 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
149 :type '(repeat
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
150 (cons symbol sexp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
151
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
152 (defcustom idlwave-shell-raise-frame t
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
153 "*Non-nil means, `idlwave-shell' raises the frame showing the shell window."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
154 :group 'idlwave-shell-general-setup
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
155 :type 'boolean)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
156
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
157 (defcustom idlwave-shell-arrows-do-history t
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
158 "*Non-nil means UP and DOWN arrows move through command history.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
159 This variable can have 3 values:
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
160 nil Arrows just move the cursor
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
161 t Arrows force the cursor back to the current command line and
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
162 walk the history
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
163 'cmdline When the cursor is in the current command line, arrows walk the
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
164 history. Everywhere else in the buffer, arrows move the cursor."
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
165 :group 'idlwave-shell-general-setup
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
166 :type '(choice
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
167 (const :tag "never" nil)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
168 (const :tag "everywhere" t)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
169 (const :tag "in command line only" cmdline)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
170
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
171 ;; FIXME: add comint-input-ring-size?
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
172
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
173 (defcustom idlwave-shell-use-toolbar t
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
174 "*Non-nil means, use the debugging toolbar in all IDL related buffers.
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
175 Starting the shell will then add the toolbar to all idlwave-mode buffers.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
176 Exiting the shell will removed everywhere.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
177 Available on XEmacs and on Emacs 21.x or later.
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
178 At any time you can toggle the display of the toolbar with
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
179 `C-c C-d C-t' (`idlwave-shell-toggle-toolbar')."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
180 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
181 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
182
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
183 (defcustom idlwave-shell-temp-pro-prefix "/tmp/idltemp"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
184 "*The prefix for temporary IDL files used when compiling regions.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
185 It should be an absolute pathname.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
186 The full temporary file name is obtained by using `make-temp-file'
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
187 so that the name will be unique among multiple Emacs processes."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
188 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
189 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
190
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
191 (defvar idlwave-shell-fix-inserted-breaks nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
192 "*OBSOLETE VARIABLE, is no longer used.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
193
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
194 The documentation of this variable used to be:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
195 If non-nil then run `idlwave-shell-remove-breaks' to clean up IDL messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
196
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
197 (defcustom idlwave-shell-prefix-key "\C-c\C-d"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
198 "*The prefix key for the debugging map `idlwave-shell-mode-prefix-map'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
199 This variable must already be set when idlwave-shell.el is loaded.
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
200 Setting it in the mode-hook is too late."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
201 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
202 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
203
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
204 (defcustom idlwave-shell-activate-prefix-keybindings t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
205 "Non-nil means, the debug commands will be bound to the prefix key.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
206 The prefix key itself is given in the option `idlwave-shell-prefix-key'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
207 So by default setting a breakpoint will be on C-c C-d C-b."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
208 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
209 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
210
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
211 ;; (defcustom idlwave-shell-debug-modifiers... See idlwave.el
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
212
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
213 (defvar idlwave-shell-activate-alt-keybindings nil
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
214 "Obsolete variable. See `idlwave-shell-debug-modifiers'.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
215
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
216 (defcustom idlwave-shell-use-truename nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
217 "*Non-nil means, use use `file-truename' when looking for buffers.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
218 If this variable is non-nil, Emacs will use the function `file-truename' to
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
219 resolve symbolic links in the file paths printed by e.g., STOP commands.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
220 This means, unvisited files will be loaded under their truename.
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
221 However, when a file is already visited under a different name, IDLWAVE will
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
222 reuse that buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
223 This option was once introduced in order to avoid multiple buffers visiting
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
224 the same file. However, IDLWAVE no longer makes this mistake, so it is safe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
225 to set this option to nil."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
226 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
227 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
228
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
229 (defcustom idlwave-shell-file-name-chars "~/A-Za-z0-9+:_.$#%={}\\-"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
230 "The characters allowed in file names, as a string.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
231 Used for file name completion. Must not contain `'', `,' and `\"'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
232 because these are used as separators by IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
233 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
234 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
235
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
236 (defcustom idlwave-shell-mode-hook '()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
237 "*Hook for customising `idlwave-shell-mode'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
238 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
239 :type 'hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
240
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
241 (defcustom idlwave-shell-graphics-window-size '(500 400)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
242 "Size of IDL graphics windows popped up by special IDLWAVE command.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
243 The command is `C-c C-d C-f' and accepts as a prefix the window nr.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
244 A command like `WINDOW,N,xsize=XX,ysize=YY' is sent to IDL."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
245 :group 'idlwave-shell-general-setup
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
246 :type '(list
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
247 (integer :tag "x size")
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
248 (integer :tag "y size")))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
249
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
250 ;; Commands Sent to Shell... etc.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
251 (defgroup idlwave-shell-command-setup nil
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
252 "Setup for command parameters of the Shell interaction for IDLWAVE."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
253 :prefix "idlwave-shell"
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
254 :group 'idlwave)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
255
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
256 (defcustom idlwave-shell-initial-commands "!more=0"
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
257 "Initial commands, separated by newlines, to send to IDL.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
258 This string is sent to the IDL process by `idlwave-shell-mode' which is
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
259 invoked by `idlwave-shell'."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
260 :group 'idlwave-shell-command-setup
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
261 :type 'string)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
262
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
263 (defcustom idlwave-shell-save-command-history t
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
264 "Non-nil means preserve command history between sessions.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
265 The file `idlwave-shell-command-history-file' is used to save and restore
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
266 the history."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
267 :group 'idlwave-shell-command-setup
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
268 :type 'boolean)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
269
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
270 (defcustom idlwave-shell-command-history-file "~/.idlwhist"
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
271 "The file in which the command history of the idlwave shell is saved.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
272 In order to change the size of the history, see the variable
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
273 `comint-input-ring-size'.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
274 The history is only saved if the variable `idlwave-shell-save-command-history'
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
275 is non-nil."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
276 :group 'idlwave-shell-command-setup
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
277 :type 'file)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
278
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
279 (defcustom idlwave-shell-show-commands
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
280 '(run misc breakpoint)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
281 "*A list of command types to show output from in the shell.
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
282 Possibilities are 'run, 'debug, 'breakpoint, and 'misc . Unlisted
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
283 types are not displayed in the shell. The single type 'everything
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
284 causes all the copious shell traffic to be displayed."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
285 :group 'idlwave-shell-command-setup
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
286 :type '(choice
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
287 (const everything)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
288 (set :tag "Checklist" :greedy t
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
289 (const :tag "All .run and .compile commands" run)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
290 (const :tag "All breakpoint commands" breakpoint)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
291 (const :tag "All debug and stepping commands" debug)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
292 (const :tag "Return, close, etc. commands" misc))))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
293
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
294 (defcustom idlwave-shell-examine-alist
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
295 '(("Print" . "print,___")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
296 ("Help" . "help,___")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
297 ("Structure Help" . "help,___,/STRUCTURE")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
298 ("Dimensions" . "print,size(___,/DIMENSIONS)")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
299 ("Type" . "print,size(___,/TNAME)")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
300 ("N_Elements" . "print,n_elements(___)")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
301 ("All Size Info" . "help,(__IWsz__=size(___,/STRUCTURE)),/STRUCTURE & print,__IWsz__.DIMENSIONS")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
302 ("Ptr Valid" . "print,ptr_valid(___)")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
303 ("Widget Valid" . "print,widget_info(___,/VALID)")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
304 ("Widget Geometry" . "help,widget_info(___,/GEOMETRY)"))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
305 "Alist of special examine commands for popup selection.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
306 The keys are used in the selection popup created by
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
307 `idlwave-shell-examine-select', and the corresponding value is sent as
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
308 a command to the shell, with special sequence `___' replaced by the
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
309 expression being examined."
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
310 :group 'idlwave-shell-command-setup
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
311 :type '(repeat
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
312 (cons
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
313 (string :tag "Label ")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
314 (string :tag "Command"))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
315
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
316 (defvar idlwave-shell-print-expression-function nil
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
317 "*OBSOLETE VARIABLE, is no longer used.")
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
318
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
319 (defcustom idlwave-shell-separate-examine-output t
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
320 "*Non-nil mean, put output of examine commands in their own buffer."
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
321 :group 'idlwave-shell-command-setup
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
322 :type 'boolean)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
323
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
324 (defcustom idlwave-shell-comint-settings
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
325 '((comint-scroll-to-bottom-on-input . t)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
326 (comint-scroll-to-bottom-on-output . t)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
327 (comint-scroll-show-maximum-output . nil))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
328
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
329 "Alist of special settings for the comint variables in the IDLWAVE Shell.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
330 Each entry is a cons cell with the name of a variable and a value.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
331 The function `idlwave-shell-mode' will make local variables out of each entry.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
332 Changes to this variable will only be active when the shell buffer is
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
333 newly created."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
334 :group 'idlwave-shell-command-setup
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
335 :type '(repeat
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
336 (cons variable sexp)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
337
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
338 (defcustom idlwave-shell-query-for-class t
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
339 "*Non-nil means query the shell for object class on object completions."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
340 :group 'idlwave-shell-command-setup
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
341 :type 'boolean)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
342
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
343 (defcustom idlwave-shell-use-input-mode-magic nil
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
344 "*Non-nil means, IDLWAVE should check for input mode spells in output.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
345 The spells are strings printed by your IDL program and matched
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
346 by the regular expressions in `idlwave-shell-input-mode-spells'.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
347 When these expressions match, IDLWAVE switches to character input mode and
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
348 back, respectively. See `idlwave-shell-input-mode-spells' for details."
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
349 :group 'idlwave-shell-command-setup
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
350 :type 'boolean)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
351
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
352 (defcustom idlwave-shell-input-mode-spells
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
353 '("^<onechar>$" "^<chars>$" "^</chars>$")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
354 "The three regular expressions which match the magic spells for input modes.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
355
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
356 When the first regexp matches in the output streem of IDL, IDLWAVE
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
357 prompts for a single character and sends it immediately to IDL, similar
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
358 to the command \\[idlwave-shell-send-char].
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
359
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
360 When the second regexp matches, IDLWAVE switches to a blocking
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
361 single-character input mode. This is the same mode which can be entered
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
362 manually with \\[idlwave-shell-char-mode-loop].
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
363 This input mode exits when the third regexp matches in the output,
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
364 or when the IDL prompt is encountered.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
365
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
366 The variable `idlwave-shell-use-input-mode-magic' must be non-nil to enable
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
367 scanning for these expressions. If the IDL program produces lots of
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
368 output, shell operation may be slowed down.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
369
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
370 This mechanism is useful for correct interaction with the IDL function
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
371 GET_KBRD, because in normal operation IDLWAVE only sends \\n terminated
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
372 strings. Here is some example code which makes use of the default spells.
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
373
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
374 print,'<chars>' ; Make IDLWAVE switch to character mode
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
375 REPEAT BEGIN
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
376 A = GET_KBRD(1)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
377 PRINT, BYTE(A)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
378 ENDREP UNTIL A EQ 'q'
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
379 print,'</chars>' ; Make IDLWAVE switch back to line mode
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
380
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
381 print,'Quit the program, y or n?'
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
382 print,'<onechar>' ; Ask IDLWAVE to send one character
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
383 answer = GET_KBRD(1)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
384
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
385 Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION',
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
386 you could actually check if you are running under Emacs before printing
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
387 the magic strings. Here is a procedure which uses this.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
388
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
389 Usage:
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
390 ======
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
391 idlwave_char_input ; Make IDLWAVE send one character
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
392 idlwave_char_input,/on ; Start the loop to send characters
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
393 idlwave_char_input,/off ; End the loop to send chracters
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
394
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
395
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
396 pro idlwave_char_input,on=on,off=off
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
397 ;; Test if we are running under Emacs
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
398 defsysv,'!idlwave_version',exists=running_emacs
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
399 if running_emacs then begin
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
400 if keyword_set(on) then print,'<chars>' $
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
401 else if keyword_set(off) then print,'</chars>' $
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
402 else print,'<onechar>'
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
403 endif
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
404 end"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
405 :group 'idlwave-shell-command-setup
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
406 :type '(list
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
407 (regexp :tag "One-char regexp")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
408 (regexp :tag "Char-mode regexp")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
409 (regexp :tag "Line-mode regexp")))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
410
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
411
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
412 ;; Breakpoint Overlays etc
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
413 (defgroup idlwave-shell-highlighting-and-faces nil
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
414 "Highlighting and Faces used by the IDLWAVE Shell mode."
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
415 :prefix "idlwave-shell"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
416 :group 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
417
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
418 (defcustom idlwave-shell-mark-stop-line t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
419 "*Non-nil means, mark the source code line where IDL is currently stopped.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
420 Value decides about the method which is used to mark the line. Legal values
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
421 are:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
422
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
423 nil Do not mark the line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
424 'arrow Use the overlay arrow
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
425 'face Use `idlwave-shell-stop-line-face' to highlight the line.
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
426 t Use what IDLWAVE thinks is best. Will be a face where possible,
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
427 otherwise the overlay arrow.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
428 The overlay-arrow has the disadvantage to hide the first chars of a line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
429 Since many people do not have the main block of IDL programs indented,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
430 a face highlighting may be better.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
431 In Emacs 21, the overlay arrow is displayed in a special area and never
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
432 hides any code, so setting this to 'arrow on Emacs 21 sounds like a good idea."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
433 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
434 :type '(choice
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
435 (const :tag "No marking" nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
436 (const :tag "Use overlay arrow" arrow)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
437 (const :tag "Highlight with face" face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
438 (const :tag "Face or arrow." t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
439
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
440 (defcustom idlwave-shell-overlay-arrow ">"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
441 "*The overlay arrow to display at source lines where execution halts.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
442 We use a single character by default, since the main block of IDL procedures
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
443 often has no indentation. Where possible, IDLWAVE will use overlays to
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
444 display the stop-lines. The arrow is only used on character-based terminals.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
445 See also `idlwave-shell-use-overlay-arrow'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
446 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
447 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
448
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
449 (defcustom idlwave-shell-stop-line-face 'highlight
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
450 "*The face for `idlwave-shell-stop-line-overlay'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
451 Allows you to choose the font, color and other properties for
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
452 line where IDL is stopped. See also `idlwave-shell-mark-stop-line'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
453 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
454 :type 'symbol)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
455
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
456 (defcustom idlwave-shell-mark-breakpoints t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
457 "*Non-nil means, mark breakpoints in the source files.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
458 Legal values are:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
459 nil Do not mark breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
460 'face Highlight line with `idlwave-shell-breakpoint-face'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
461 'glyph Red dot at the beginning of line. If the display does not
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
462 support glyphs, will use 'face instead.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
463 t Glyph when possible, otherwise face (same effect as 'glyph)."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
464 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
465 :type '(choice
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
466 (const :tag "No marking" nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
467 (const :tag "Highlight with face" face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
468 (const :tag "Display glyph (red dot)" glyph)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
469 (const :tag "Glyph or face." t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
470
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
471 (defvar idlwave-shell-use-breakpoint-glyph t
47262
1c1d47728dc8 (idlwave-shell-use-breakpoint-glyph): Fix spacing.
Juanma Barranquero <lekktu@gmail.com>
parents: 46529
diff changeset
472 "Obsolete variable. See `idlwave-shell-mark-breakpoints.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
473
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
474 (defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp-face
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
475 "*The face for breakpoint lines in the source code.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
476 Allows you to choose the font, color and other properties for
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
477 lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
478 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
479 :type 'symbol)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
480
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
481 (if idlwave-shell-have-new-custom
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
482 ;; We have the new customize - use it to define a customizable face
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
483 (defface idlwave-shell-bp-face
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
484 '((((class color)) (:foreground "Black" :background "Pink"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
485 (t (:underline t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
486 "Face for highlighting lines-with-breakpoints."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
487 :group 'idlwave-shell-highlighting-and-faces)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
488 ;; Just copy the underline face to be on the safe side.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
489 (copy-face 'underline 'idlwave-shell-bp-face))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
490
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
491 (defcustom idlwave-shell-expression-face 'secondary-selection
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
492 "*The face for `idlwave-shell-expression-overlay'.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
493 Allows you to choose the font, color and other properties for
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
494 the expression printed by IDL."
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
495 :group 'idlwave-shell-highlighting-and-faces
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
496 :type 'symbol)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
497
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
498 (defcustom idlwave-shell-output-face 'secondary-selection
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
499 "*The face for `idlwave-shell-output-overlay'.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
500 Allows you to choose the font, color and other properties for
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
501 the expression output by IDL."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
502 :group 'idlwave-shell-highlighting-and-faces
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
503 :type 'symbol)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
504
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
505 ;;; End user customization variables
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
506
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
507 ;;; External variables
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
508 (defvar comint-last-input-start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
509 (defvar comint-last-input-end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
510
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
511 (defun idlwave-shell-temp-file (type)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
512 "Return a temp file, creating it if necessary.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
513
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
514 TYPE is either 'pro or 'rinfo, and idlwave-shell-temp-pro-file or
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
515 idlwave-shell-temp-rinfo-save-file is set (respectively)."
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
516 (cond
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
517 ((eq type 'rinfo)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
518 (or idlwave-shell-temp-rinfo-save-file
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
519 (setq idlwave-shell-temp-rinfo-save-file
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
520 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
521 ((eq type 'pro)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
522 (or idlwave-shell-temp-pro-file
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
523 (setq idlwave-shell-temp-pro-file
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
524 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
525 (t (error "Wrong argument (idlwave-shell-temp-file): %s"
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
526 (symbol-name type)))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
527
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
528
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
529 (defun idlwave-shell-make-temp-file (prefix)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
530 "Create a temporary file."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
531 ; Hard coded make-temp-file for Emacs<21
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
532 (if (fboundp 'make-temp-file)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
533 (make-temp-file prefix)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
534 (let (file
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
535 (temp-file-dir (if (boundp 'temporary-file-directory)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
536 temporary-file-directory
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
537 "/tmp")))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
538 (while (condition-case ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
539 (progn
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
540 (setq file
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
541 (make-temp-name
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
542 (expand-file-name prefix temp-file-dir)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
543 (if (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
544 (write-region "" nil file nil 'silent nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
545 (write-region "" nil file nil 'silent nil 'excl))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
546 nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
547 (file-already-exists t))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
548 ;; the file was somehow created by someone else between
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
549 ;; `make-temp-name' and `write-region', let's try again.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
550 nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
551 file)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
552
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
553 ;; Other variables
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
554 (defvar idlwave-shell-temp-pro-file
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
555 nil
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
556 "Absolute pathname for temporary IDL file for compiling regions")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
557
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
558 (defvar idlwave-shell-temp-rinfo-save-file
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
559 nil
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
560 "Absolute pathname for temporary IDL file save file for routine_info.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
561 This is used to speed up the reloading of the routine info procedure
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
562 before use by the shell.")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
563
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
564 (defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
565 "Command used by `idlwave-shell-resync-dirs' to query IDL for
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
566 the directory stack.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
567
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
568 (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+'>'"
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
569 "The command which gets !PATH and !DIR infor from the shell.")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
570
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
571 (defvar idlwave-shell-mode-line-info nil
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
572 "Additional info displayed in the mode line")
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
573
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
574 (defvar idlwave-shell-default-directory nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
575 "The default directory in the idlwave-shell buffer, of outside use.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
576
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
577 (defvar idlwave-shell-last-save-and-action-file nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
578 "The last file which was compiled with `idlwave-shell-save-and-...'.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
579
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
580 ;; Highlighting uses overlays. When necessary, require the emulation.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
581 (if (not (fboundp 'make-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
582 (condition-case nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
583 (require 'overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
584 (error nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
585
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
586 (defvar idlwave-shell-stop-line-overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
587 "The overlay for where IDL is currently stopped.")
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
588 (defvar idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
589 (defvar idlwave-shell-expression-overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
590 "The overlay for where IDL is currently stopped.")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
591 (defvar idlwave-shell-output-overlay nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
592 "The overlay for the last IDL output.")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
593
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
594 ;; If these were already overlays, delete them. This probably means that we
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
595 ;; are reloading this file.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
596 (if (overlayp idlwave-shell-stop-line-overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
597 (delete-overlay idlwave-shell-stop-line-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
598 (if (overlayp idlwave-shell-expression-overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
599 (delete-overlay idlwave-shell-expression-overlay))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
600 (if (overlayp idlwave-shell-output-overlay)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
601 (delete-overlay idlwave-shell-output-overlay))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
602
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
603 ;; Set to nil initially
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
604 (setq idlwave-shell-stop-line-overlay nil
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
605 idlwave-shell-expression-overlay nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
606 idlwave-shell-output-overlay nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
607
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
608 ;; Define the shell stop overlay. When left nil, the arrow will be used.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
609 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
610 ((or (null idlwave-shell-mark-stop-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
611 (eq idlwave-shell-mark-stop-line 'arrow))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
612 ;; Leave the overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
613 nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
614
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
615 ((eq idlwave-shell-mark-stop-line 'face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
616 ;; Try to use a face. If not possible, arrow will be used anyway
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
617 ;; So who can display faces?
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
618 (when (or (featurep 'xemacs) ; XEmacs can do also ttys
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
619 (fboundp 'tty-defined-colors) ; Emacs 21 as well
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
620 window-system) ; Window systems always
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
621 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
622 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
623 (overlay-put idlwave-shell-stop-line-overlay
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
624 'face idlwave-shell-stop-line-face))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
625
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
626 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
627 ;; IDLWAVE may decide. Will use a face on window systems, arrow elsewhere
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
628 (if window-system
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
629 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
630 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
631 (overlay-put idlwave-shell-stop-line-overlay
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
632 'face idlwave-shell-stop-line-face)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
633
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
634 ;; Now the expression and output overlays
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
635 (setq idlwave-shell-expression-overlay (make-overlay 1 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
636 (overlay-put idlwave-shell-expression-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
637 'face idlwave-shell-expression-face)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
638 (setq idlwave-shell-output-overlay (make-overlay 1 1))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
639 (overlay-put idlwave-shell-output-overlay
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
640 'face idlwave-shell-output-face)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
641
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
642 (defvar idlwave-shell-bp-query "help,/breakpoints"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
643 "Command to obtain list of breakpoints")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
644
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
645 (defvar idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
646 "String for accumulating current command output.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
647
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
648 (defvar idlwave-shell-post-command-hook nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
649 "Lisp list expression or function to run when an IDL command is finished.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
650 The current command is finished when the IDL prompt is displayed.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
651 This is evaluated if it is a list or called with funcall.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
652
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
653 (defvar idlwave-shell-sentinel-hook nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
654 "Hook run when the idl process exits.")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
655
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
656 (defvar idlwave-shell-hide-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
657 "If non-nil the process output is not inserted into the output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
658 buffer.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
659
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
660 (defvar idlwave-shell-accumulation nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
661 "Accumulate last line of output.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
662
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
663 (defvar idlwave-shell-command-line-to-execute nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
664 (defvar idlwave-shell-cleanup-hook nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
665 "List of functions to do cleanup when the shell exits.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
666
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
667 (defvar idlwave-shell-pending-commands nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
668 "List of commands to be sent to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
669 Each element of the list is list of \(CMD PCMD HIDE\), where CMD is a
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
670 string to be sent to IDL and PCMD is a post-command to be placed on
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
671 `idlwave-shell-post-command-hook'. If HIDE is non-nil, hide the output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
672 from command CMD. PCMD and HIDE are optional.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
673
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
674 (defun idlwave-shell-buffer ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
675 "Name of buffer associated with IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
676 The name of the buffer is made by surrounding `idlwave-shell-process-name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
677 with `*'s."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
678 (concat "*" idlwave-shell-process-name "*"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
679
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
680 (defvar idlwave-shell-ready nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
681 "If non-nil can send next command to IDL process.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
682
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
683 (defvar idlwave-shell-wait-for-output nil
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
684 "Whether to wait for output to accumulate.")
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
685
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
686 ;;; The following are the types of messages we attempt to catch to
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
687 ;;; resync our idea of where IDL execution currently is.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
688 ;;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
689
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
690 (defvar idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
691 "The frame associated with halt/breakpoint messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
692
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
693 (defvar idlwave-shell-step-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
694 "The frame associated with step messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
695
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
696 (defvar idlwave-shell-trace-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
697 "The frame associated with trace messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
698
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
699 (defconst idlwave-shell-halt-messages
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
700 '("^% Execution halted at"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
701 "^% Interrupted at:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
702 "^% Stepped to:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
703 "^% At "
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
704 "^% Stop encountered:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
705 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
706 "*A list of regular expressions matching IDL messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
707 These are the messages containing file and line information where
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
708 IDL is currently stopped.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
709
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
710 (defconst idlwave-shell-halt-messages-re
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
711 (mapconcat 'identity idlwave-shell-halt-messages "\\|")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
712 "The regular expression computed from idlwave-shell-halt-messages")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
713
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
714 (defconst idlwave-shell-trace-messages
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
715 '("^% At " ;; First line of a trace message
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
716 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
717 "*A list of regular expressions matching IDL trace messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
718 These are the messages containing file and line information where
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
719 IDL will begin looking for the next statement to execute.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
720
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
721 (defconst idlwave-shell-step-messages
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
722 '("^% Stepped to:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
723 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
724 "*A list of regular expressions matching stepped execution messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
725 These are IDL messages containing file and line information where
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
726 IDL has currently stepped.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
727
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
728 (defvar idlwave-shell-break-message "^% Breakpoint at:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
729 "*Regular expression matching an IDL breakpoint message line.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
730
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
731
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
732 (defvar idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
733 ;(defvar idlwave-shell-post-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
734 (defvar idlwave-shell-sources-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
735 (defvar idlwave-shell-menu-def)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
736 (defvar idlwave-shell-mode-menu)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
737 (defvar idlwave-shell-initial-commands)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
738 (defvar idlwave-shell-syntax-error)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
739 (defvar idlwave-shell-other-error)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
740 (defvar idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
741 (defvar idlwave-shell-error-last)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
742 (defvar idlwave-shell-bp-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
743 (defvar idlwave-shell-sources-query)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
744 (defvar idlwave-shell-mode-map)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
745 (defvar idlwave-shell-calling-stack-index)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
746
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
747 (defun idlwave-shell-mode ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
748 "Major mode for interacting with an inferior IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
749
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
750 1. Shell Interaction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
751 -----------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
752 RET after the end of the process' output sends the text from the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
753 end of process to the end of the current line. RET before end of
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
754 process output copies the current line (except for the prompt) to the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
755 end of the buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
756
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
757 Command history, searching of previous commands, command line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
758 editing are available via the comint-mode key bindings, by default
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
759 mostly on the key `C-c'. Command history is also available with
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
760 the arrow keys UP and DOWN.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
761
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
762 2. Completion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
763 ----------
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
764 TAB and M-TAB do completion of IDL routines, classes and keywords -
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
765 similar to M-TAB in `idlwave-mode'. In executive commands and
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
766 strings, it completes file names. Abbreviations are also expanded
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
767 like in `idlwave-mode'.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
768
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
769 3. Routine Info
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
770 ------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
771 `\\[idlwave-routine-info]' displays information about an IDL routine near point,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
772 just like in `idlwave-mode'. The module used is the one at point or
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
773 the one whose argument list is being edited.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
774 To update IDLWAVE's knowledge about compiled or edited modules, use
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
775 \\[idlwave-update-routine-info].
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
776 \\[idlwave-find-module] find the source of a module.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
777 \\[idlwave-resolve] tells IDL to compile an unresolved module.
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
778 \\[idlwave-context-help] shows the online help on the item at
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
779 point, if online help has been installed.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
780
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
781
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
782 4. Debugging
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
783 ---------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
784 A complete set of commands for compiling and debugging IDL programs
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
785 is available from the menu. Also keybindings starting with a
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
786 `C-c C-d' prefix are available for most commands in the *idl* buffer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
787 and also in source buffers. The best place to learn about the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
788 keybindings is again the menu.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
789
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
790 On Emacs versions where this is possible, a debugging toolbar is
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
791 installed.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
792
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
793 When IDL is halted in the middle of a procedure, the corresponding
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
794 line of that procedure file is displayed with an overlay in another
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
795 window. Breakpoints are also highlighted in the source.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
796
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
797 \\[idlwave-shell-resync-dirs] queries IDL in order to change Emacs current directory
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
798 to correspond to the IDL process current directory.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
799
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
800 5. Hooks
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
801 -----
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
802 Turning on `idlwave-shell-mode' runs `comint-mode-hook' and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
803 `idlwave-shell-mode-hook' (in that order).
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
804
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
805 6. Documentation and Customization
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
806 -------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
807 Info documentation for this package is available. Use \\[idlwave-info]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
808 to display (complain to your sysadmin if that does not work).
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
809 For Postscript and HTML versions of the documentation, check IDLWAVE's
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
810 homepage at `http://idlwave.org'.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
811 IDLWAVE has customize support - see the group `idlwave'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
812
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
813 7. Keybindings
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
814 -----------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
815 \\{idlwave-shell-mode-map}"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
816
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
817 (interactive)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
818 ;; We don't do `kill-all-local-variables' here, because this is done by
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
819 ;; comint - idlwave-shell-mode only add on top of that.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
820 (setq comint-prompt-regexp idlwave-shell-prompt-pattern)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
821 (setq comint-process-echoes t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
822 ;; Can not use history expansion because "!" is used for system variables.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
823 (setq comint-input-autoexpand nil)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
824 ; (setq comint-input-ring-size 64)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
825 (make-local-variable 'comint-completion-addsuffix)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
826 (set (make-local-variable 'completion-ignore-case) t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
827 (setq comint-completion-addsuffix '("/" . ""))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
828 (setq comint-input-ignoredups t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
829 (setq major-mode 'idlwave-shell-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
830 (setq mode-name "IDL-Shell")
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
831 (setq idlwave-shell-mode-line-info nil)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
832 (setq mode-line-format
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
833 '(""
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
834 mode-line-modified
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
835 mode-line-buffer-identification
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
836 " "
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
837 global-mode-string
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
838 " %[("
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
839 mode-name
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
840 mode-line-process
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
841 minor-mode-alist
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
842 "%n"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
843 ")%]-"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
844 idlwave-shell-mode-line-info
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
845 "---"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
846 (line-number-mode "L%l--")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
847 (column-number-mode "C%c--")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
848 (-3 . "%p")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
849 "-%-"))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
850 ;; (make-local-variable 'idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
851 (setq idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
852 idlwave-shell-trace-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
853 idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
854 idlwave-shell-step-frame nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
855 (idlwave-shell-display-line nil)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
856 (setq idlwave-shell-calling-stack-index 0)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
857
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
858 (when idlwave-shell-query-for-class
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
859 (add-to-list (make-local-variable 'idlwave-determine-class-special)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
860 'idlwave-shell-get-object-class)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
861 (setq idlwave-store-inquired-class t))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
862
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
863 ;; Make sure comint-last-input-end does not go to beginning of
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
864 ;; buffer (in case there were other processes already in this buffer).
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
865 (set-marker comint-last-input-end (point))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
866 (setq idlwave-idlwave_routine_info-compiled nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
867 (setq idlwave-shell-ready nil)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
868 (setq idlwave-shell-wait-for-output nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
869 (setq idlwave-shell-bp-alist nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
870 (idlwave-shell-update-bp-overlays) ; Throw away old overlays
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
871 (setq idlwave-shell-sources-alist nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
872 (setq idlwave-shell-default-directory default-directory)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
873 (setq idlwave-shell-hide-output nil)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
874
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
875 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
876 (make-local-hook 'kill-buffer-hook)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
877 (add-hook 'kill-buffer-hook 'idlwave-shell-kill-shell-buffer-confirm
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
878 nil 'local)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
879 (add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
880 (add-hook 'kill-emacs-hook 'idlwave-shell-delete-temp-files)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
881 (use-local-map idlwave-shell-mode-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
882 (easy-menu-add idlwave-shell-mode-menu idlwave-shell-mode-map)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
883
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
884 ;; Set the optional comint variables
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
885 (when idlwave-shell-comint-settings
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
886 (let ((list idlwave-shell-comint-settings) entry)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
887 (while (setq entry (pop list))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
888 (set (make-local-variable (car entry)) (cdr entry)))))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
889
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
890 ;; IDLWAVE syntax, and turn on abbreviations
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
891 (setq local-abbrev-table idlwave-mode-abbrev-table)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
892 (set-syntax-table idlwave-mode-syntax-table)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
893 (set (make-local-variable 'comment-start) ";")
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
894 (setq abbrev-mode t)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
895
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
896 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
897 (make-local-hook 'post-command-hook)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
898 (add-hook 'post-command-hook 'idlwave-command-hook nil t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
899
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
900 ;; Read the command history?
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
901 (when (and idlwave-shell-save-command-history
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
902 (stringp idlwave-shell-command-history-file))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
903 (set (make-local-variable 'comint-input-ring-file-name)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
904 idlwave-shell-command-history-file)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
905 (if (file-regular-p idlwave-shell-command-history-file)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
906 (comint-read-input-ring)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
907
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
908 ;; Run the hooks.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
909 (run-hooks 'idlwave-shell-mode-hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
910 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
911 ;; Define a system variable which knows the version of IDLWAVE
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
912 (idlwave-shell-send-command
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
913 (format "defsysv,'!idlwave_version','%s',1" idlwave-mode-version)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
914 nil 'hide)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
915 (if (and (not idlwave-path-alist)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
916 (not idlwave-sys-dir))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
917 (idlwave-shell-send-command idlwave-shell-path-query
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
918 'idlwave-shell-get-path-info
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
919 'hide)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
920
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
921 (defun idlwave-shell-get-path-info ()
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
922 (let* ((rpl (idlwave-shell-path-filter))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
923 (sysdir (car rpl))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
924 (dirs (cdr rpl)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
925 (setq idlwave-sys-dir sysdir)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
926 (setq idlwave-path-alist (mapcar (lambda(x) (cons x nil))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
927 dirs))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
928
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
929 (if (not (fboundp 'idl-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
930 (fset 'idl-shell 'idlwave-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
931
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
932 (defvar idlwave-shell-idl-wframe nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
933 "Frame for displaying the idl shell window.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
934 (defvar idlwave-shell-display-wframe nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
935 "Frame for displaying the idl source files.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
936
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
937 (defvar idlwave-shell-calling-stack-index 0)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
938 (defvar idlwave-shell-calling-stack-routine nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
939
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
940 (defun idlwave-shell-source-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
941 "Return the frame to be used for source display."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
942 (if idlwave-shell-use-dedicated-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
943 ;; We want separate frames for source and shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
944 (if (frame-live-p idlwave-shell-display-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
945 ;; The frame exists, so we use it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
946 idlwave-shell-display-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
947 ;; The frame does not exist. We use the current frame.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
948 ;; However, if the current is the shell frame, we make a new frame,
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
949 ;; or recycle the first existing visible frame
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
950 (setq idlwave-shell-display-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
951 (if (eq (selected-frame) idlwave-shell-idl-wframe)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
952 (or
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
953 (let ((flist (visible-frame-list))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
954 (frame (selected-frame)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
955 (catch 'exit
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
956 (while flist
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
957 (if (not (eq (car flist)
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
958 idlwave-shell-idl-wframe))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
959 (throw 'exit (car flist))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
960 (setq flist (cdr flist))))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
961 (make-frame))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
962 (selected-frame))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
963
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
964 (defun idlwave-shell-shell-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
965 "Return the frame to be used for the shell buffer."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
966 (if idlwave-shell-use-dedicated-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
967 ;; We want a dedicated frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
968 (if (frame-live-p idlwave-shell-idl-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
969 ;; It does exist, so we use it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
970 idlwave-shell-idl-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
971 ;; It does not exist. Check if we have a source frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
972 (if (not (frame-live-p idlwave-shell-display-wframe))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
973 ;; We do not have a source frame, so we use this one.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
974 (setq idlwave-shell-display-wframe (selected-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
975 ;; Return a new frame
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
976 (setq idlwave-shell-idl-wframe
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
977 (make-frame idlwave-shell-frame-parameters)))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
978
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
979 ;;;###autoload
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
980 (defun idlwave-shell (&optional arg quick)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
981 "Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
982 If buffer exists but shell process is not running, start new IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
983 If buffer exists and shell process is running, just switch to the buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
984
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
985 When called with a prefix ARG, or when `idlwave-shell-use-dedicated-frame'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
986 is non-nil, the shell buffer and the source buffers will be in
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
987 separate frames.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
988
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
989 The command to run comes from variable `idlwave-shell-explicit-file-name',
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
990 with options taken from `idlwave-shell-command-line-options'.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
991
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
992 The buffer is put in `idlwave-shell-mode', providing commands for sending
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
993 input and controlling the IDL job. See help on `idlwave-shell-mode'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
994 See also the variable `idlwave-shell-prompt-pattern'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
995
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
996 \(Type \\[describe-mode] in the shell buffer for a list of commands.)"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
997 (interactive "P")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
998 (if (eq arg 'quick)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
999 (progn
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1000 (let ((idlwave-shell-use-dedicated-frame nil))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1001 (idlwave-shell nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1002 (delete-other-windows))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1003 (and idlwave-shell-use-dedicated-frame
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1004 (setq idlwave-shell-idl-wframe (selected-frame)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1005 (add-hook 'idlwave-shell-sentinel-hook
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1006 'save-buffers-kill-emacs t))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1007
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1008 ;; A non-nil arg means, we want a dedicated frame. This will last
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1009 ;; for the current editing session.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1010 (if arg (setq idlwave-shell-use-dedicated-frame t))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1011 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1012
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1013 ;; Check if the process still exists. If not, create it.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1014 (unless (comint-check-proc (idlwave-shell-buffer))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1015 (let* ((prg (or idlwave-shell-explicit-file-name "idl"))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1016 (buf (apply 'make-comint
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1017 idlwave-shell-process-name prg nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1018 (if (stringp idlwave-shell-command-line-options)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1019 (idlwave-split-string
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1020 idlwave-shell-command-line-options)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1021 idlwave-shell-command-line-options)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1022 (process (get-buffer-process buf)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1023 (setq idlwave-idlwave_routine_info-compiled nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1024 (set-process-filter process 'idlwave-shell-filter)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1025 (set-process-sentinel process 'idlwave-shell-sentinel)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1026 (set-buffer buf)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1027 (idlwave-shell-mode)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1028 (let ((window (idlwave-display-buffer (idlwave-shell-buffer) nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1029 (idlwave-shell-shell-frame)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1030 (current-window (selected-window)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1031 (select-window window)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1032 (goto-char (point-max))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1033 (select-window current-window)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1034 (if idlwave-shell-ready
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1035 (raise-frame (window-frame window)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1036 (if (eq (selected-frame) (window-frame window))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1037 (select-window window))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1038 )))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1039
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1040 (defun idlwave-shell-recenter-shell-window (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1041 "Run `idlwave-shell', but make sure the current window stays selected."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1042 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1043 (let ((window (selected-window)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1044 (idlwave-shell arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1045 (select-window window)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1046
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1047 (defun idlwave-shell-hide-p (type)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1048 "Whether to hide this type of command.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1049 Return either nil or 'hide."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1050 (if (listp idlwave-shell-show-commands)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1051 (if (not (memq type idlwave-shell-show-commands)) 'hide)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1052
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1053 (defun idlwave-shell-send-command (&optional cmd pcmd hide preempt)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1054 "Send a command to IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1055
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1056 \(CMD PCMD HIDE\) are placed at the end of
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1057 ` idlwave-shell-pending-commands'. If IDL is ready the first command,
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1058 CMD, in `idlwave-shell-pending-commands' is sent to the IDL process.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1059 If optional second argument PCMD is non-nil it will be placed on
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1060 `idlwave-shell-post-command-hook' when CMD is executed. If the
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1061 optional third argument HIDE is non-nil, then hide output from CMD.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1062 If optional fourth argument PREEMPT is non-nil CMD is put at front of
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1063 `idlwave-shell-pending-commands'. If PREEMPT is 'wait, wait for all
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1064 output to complete and the next prompt to arrive before returning
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1065 \(useful if you need an answer now\). IDL is considered ready if the
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1066 prompt is present and if `idlwave-shell-ready' is non-nil."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1067
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1068 ; (setq hide nil) ; FIXME: turn this on for debugging only
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1069 ; (if (null cmd)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1070 ; (progn
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1071 ; (message "SENDING Pending commands: %s"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1072 ; (prin1-to-string idlwave-shell-pending-commands)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1073 ; (message "SENDING %s|||%s" cmd pcmd))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1074 (if (and (symbolp idlwave-shell-show-commands)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1075 (eq idlwave-shell-show-commands 'everything))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1076 (setq hide nil))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1077 (let ((save-buffer (current-buffer))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1078 buf proc)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1079 ;; Get or make the buffer and its process
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1080 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1081 (not (setq proc (get-buffer-process buf))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1082 (if (not idlwave-shell-automatic-start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1083 (error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1084 (substitute-command-keys
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1085 "You need to first start an IDL shell with \\[idlwave-shell]"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1086 (idlwave-shell-recenter-shell-window)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1087 (setq buf (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1088 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1089 (not (setq proc (get-buffer-process buf))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1090 ;; Still nothing
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1091 (error "Problem with autostarting IDL shell"))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1092 (when (or cmd idlwave-shell-pending-commands)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1093 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1094 ;; To make this easy, always push CMD onto pending commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1095 (if cmd
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1096 (setq idlwave-shell-pending-commands
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1097 (if preempt
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1098 ;; Put at front.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1099 (append (list (list cmd pcmd hide))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1100 idlwave-shell-pending-commands)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1101 ;; Put at end.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1102 (append idlwave-shell-pending-commands
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1103 (list (list cmd pcmd hide))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1104 ;; Check if IDL ready
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1105 (let ((save-point (point-marker)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1106 (goto-char (process-mark proc))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1107 (if (and idlwave-shell-ready
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1108 ;; Check for IDL prompt
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1109 (prog2
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1110 (forward-line 0)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1111 ;; (beginning-of-line) ; Changed for Emacs 21
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1112 (looking-at idlwave-shell-prompt-pattern)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1113 (goto-char (process-mark proc))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1114 ;; IDL ready for command, execute it
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1115 (let* ((lcmd (car idlwave-shell-pending-commands))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1116 (cmd (car lcmd))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1117 (pcmd (nth 1 lcmd))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1118 (hide (nth 2 lcmd)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1119 ;; If this is an executive command, reset the stack pointer
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1120 (if (eq (string-to-char cmd) ?.)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1121 (setq idlwave-shell-calling-stack-index 0))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1122 ;; Set post-command
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1123 (setq idlwave-shell-post-command-hook pcmd)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1124 ;; Output hiding
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1125 (setq idlwave-shell-hide-output hide)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1126 ;; Pop command
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1127 (setq idlwave-shell-pending-commands
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1128 (cdr idlwave-shell-pending-commands))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1129 ;; Send command for execution
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1130 (set-marker comint-last-input-start (point))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1131 (set-marker comint-last-input-end (point))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1132 (comint-simple-send proc cmd)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1133 (setq idlwave-shell-ready nil)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1134 (when (equal preempt 'wait) ; Get all the output at once
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1135 (setq idlwave-shell-wait-for-output t)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1136 (accept-process-output proc))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1137 (goto-char save-point))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1138 (set-buffer save-buffer))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1139
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1140 (defun idlwave-shell-send-char (c &optional no-error)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1141 "Send one character to the shell, without a newline."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1142 (interactive "cChar to send to IDL: ")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1143 (let ((errf (if (interactive-p) 'error 'message))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1144 buf proc)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1145 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1146 (not (setq proc (get-buffer-process buf))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1147 (funcall errf "Shell is not running"))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1148 (if (equal c ?\C-g)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1149 (funcall errf "Abort")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1150 (comint-send-string proc (char-to-string c)))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1151
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1152 (defvar idlwave-shell-char-mode-active)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1153 (defun idlwave-shell-input-mode-magic (string)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1154 "Check STRING for magic words and toggle character input mode.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1155 See also the variable `idlwave-shell-input-mode-spells'."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1156 (cond
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1157 ((string-match (car idlwave-shell-input-mode-spells) string)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1158 (call-interactively 'idlwave-shell-send-char))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1159 ((and (boundp 'idlwave-shell-char-mode-active)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1160 (string-match (nth 2 idlwave-shell-input-mode-spells) string))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1161 (setq idlwave-shell-char-mode-active 'exit))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1162 ((string-match (nth 1 idlwave-shell-input-mode-spells) string)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1163 ;; Set a timer which will soon start the character loop
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1164 (if (fboundp 'start-itimer)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1165 (start-itimer "IDLWAVE Char Mode" 'idlwave-shell-char-mode-loop 0.5
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1166 nil nil t 'no-error)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1167 (run-at-time 0.5 nil 'idlwave-shell-char-mode-loop 'no-error)))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1168
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1169 (defvar keyboard-quit)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1170 (defun idlwave-shell-char-mode-loop (&optional no-error)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1171 "Enter a loop which accepts single characters and sends them to IDL.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1172 Characters are sent one by one, without newlines. The loop is blocking
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1173 and intercepts all input events to Emacs. You can use this command
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1174 to interact with the IDL command GET_KBRD.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1175 The loop can be aborted by typing `C-g'. The loop also exits automatically
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1176 when the IDL prompt gets displayed again after the current IDL command."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1177 (interactive)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1178
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1179 ;; First check if there is a shell waiting for input
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1180 (let ((idlwave-shell-char-mode-active t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1181 (errf (if no-error 'message 'error))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1182 buf proc c)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1183 (if (or (not (setq buf (get-buffer (idlwave-shell-buffer))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1184 (not (setq proc (get-buffer-process buf))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1185 (funcall errf "Shell is not running"))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1186 (if idlwave-shell-ready
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1187 (funcall errf "No IDL program seems to be waiting for input"))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1188
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1189 ;; OK, start the loop
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1190 (message "Character mode on: Sending single chars (`C-g' to exit)")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1191 (message
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1192 (catch 'exit
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1193 (while t
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1194 ;; Wait for input
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1195 ;; FIXME: Is it too dangerous to inhibit quit here?
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1196 (let ((inhibit-quit t))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1197 ;; We wait and check frequently if we should abort
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1198 (while (sit-for 0.3)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1199 (and idlwave-shell-ready
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1200 (throw 'exit "Character mode off (prompt displayed)"))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1201 (and (eq idlwave-shell-char-mode-active 'exit)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1202 (throw 'exit "Character mode off (closing spell incantation)")))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1203 ;; Interpret input as a character - ignore non-char input
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1204 (condition-case nil
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1205 (setq c (read-char))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1206 (error (ding) (throw 'exit "Character mode off")))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1207 (cond
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1208 ((null c) ; Non-char event: ignore
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1209 (ding))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1210 ((equal c ?\C-g) ; Abort the loop
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1211 (setq keyboard-quit nil)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1212 (ding)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1213 (throw 'exit "Character mode off (keyboard quit)"))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1214 (t ; Send the character and continue the loop
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1215 (comint-send-string proc (char-to-string c))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1216 (and (eq idlwave-shell-char-mode-active 'exit)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1217 (throw 'exit "Single char loop exited"))))))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1218
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1219 (defun idlwave-shell-move-or-history (up &optional arg)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1220 "When in last line of process buffer, do `comint-previous-input'.
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1221 Otherwise just move the line. Move down unless UP is non-nil."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1222 (let* ((proc-pos (marker-position
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1223 (process-mark (get-buffer-process (current-buffer)))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1224 (arg (or arg 1))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1225 (arg (if up arg (- arg))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1226 (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1227 (if (and idlwave-shell-arrows-do-history
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1228 (>= (1+ (save-excursion (end-of-line) (point))) proc-pos))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1229 (progn
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1230 (goto-char proc-pos)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1231 (and (not (eolp)) (kill-line nil))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1232 (comint-previous-input arg))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1233 (previous-line arg))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1234
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1235 (defun idlwave-shell-up-or-history (&optional arg)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1236 "When in last line of process buffer, move to previous input.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1237 Otherwise just go up one line."
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1238 (interactive "p")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1239 (idlwave-shell-move-or-history t arg))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1240
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1241 (defun idlwave-shell-down-or-history (&optional arg)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1242 "When in last line of process buffer, move to next input.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1243 Otherwise just go down one line."
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1244 (interactive "p")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1245 (idlwave-shell-move-or-history nil arg))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1246
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1247 ;; Newer versions of comint.el changed the name of comint-filter to
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1248 ;; comint-output-filter.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1249 (defun idlwave-shell-comint-filter (process string) nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1250 (if (fboundp 'comint-output-filter)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1251 (fset 'idlwave-shell-comint-filter (symbol-function 'comint-output-filter))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1252 (fset 'idlwave-shell-comint-filter (symbol-function 'comint-filter)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1253
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1254 (defun idlwave-shell-is-running ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1255 "Return t if the shell process is running."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1256 (eq (process-status idlwave-shell-process-name) 'run))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1257
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1258 (defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1259 "Buffer containing hidden output from IDL commands.")
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1260
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1261 (defun idlwave-shell-filter (proc string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1262 "Replace Carriage returns in output. Watch for prompt.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1263 When the IDL prompt is received executes `idlwave-shell-post-command-hook'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1264 and then calls `idlwave-shell-send-command' for any pending commands."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1265 ;; We no longer do the cleanup here - this is done by the process sentinel
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1266 (when (eq (process-status idlwave-shell-process-name) 'run)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1267 ;; OK, process is still running, so we can use it.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1268 (let ((data (match-data)) p)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1269 (unwind-protect
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1270 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1271 ;; May change the original match data.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1272 (while (setq p (string-match "\C-M" string))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1273 (aset string p ?\ ))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1274
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1275 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1276 ;; Keep output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1277
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1278 ; Should not keep output because the concat is costly. If hidden put
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1279 ; the output in a hide-buffer. Then when the output is needed in post
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1280 ; processing can access either the hide buffer or the idlwave-shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1281 ; buffer. Then watching for the prompt is easier. Furthermore, if it
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1282 ; is hidden and there is no post command, could throw away output.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1283 ; (setq idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1284 ; (concat idlwave-shell-command-output string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1285 ;; Insert the string. Do this before getting the
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1286 ;; state.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1287 (while (setq p (string-match "\C-G" string))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1288 (ding)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1289 (aset string p ?\C-j ))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1290 (if idlwave-shell-hide-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1291 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1292 (set-buffer
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1293 (get-buffer-create idlwave-shell-hidden-output-buffer))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1294 (goto-char (point-max))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1295 (insert string))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1296 (idlwave-shell-comint-filter proc string))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1297 ;; Watch for magic - need to accumulate the current line
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1298 ;; since it may not be sent all at once.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1299 (if (string-match "\n" string)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1300 (progn
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1301 (if idlwave-shell-use-input-mode-magic
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1302 (idlwave-shell-input-mode-magic
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1303 (concat idlwave-shell-accumulation string)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1304 (setq idlwave-shell-accumulation
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1305 (substring string
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1306 (progn (string-match "\\(.*\n\\)*" string)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1307 (match-end 0)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1308 (setq idlwave-shell-accumulation
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1309 (concat idlwave-shell-accumulation string)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1310
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1311
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1312 ;;; Test/Debug code
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1313 ; (save-excursion (set-buffer
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1314 ; (get-buffer-create "*idlwave-shell-output*"))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1315 ; (goto-char (point-max))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1316 ; (insert "\nSTRING===>\n" string "\n<====\n"))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1317
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1318 ;; Check for prompt in current accumulating output
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1319 (if (setq idlwave-shell-ready
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1320 (string-match idlwave-shell-prompt-pattern
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1321 idlwave-shell-accumulation))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1322 (progn
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1323 (if idlwave-shell-hide-output
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1324 (save-excursion
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1325 (set-buffer idlwave-shell-hidden-output-buffer)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1326 (goto-char (point-max))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1327 (re-search-backward idlwave-shell-prompt-pattern nil t)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1328 (goto-char (match-end 0))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1329 (setq idlwave-shell-command-output
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1330 (buffer-substring (point-min) (point)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1331
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1332 ;;; Test/Debug
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1333 ; (save-excursion (set-buffer
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1334 ; (get-buffer-create "*idlwave-shell-output*"))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1335 ; (goto-char (point-max))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1336 ; (insert "\nOUPUT===>\n" idlwave-shell-command-output "\n<===\n"))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1337
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1338 (delete-region (point-min) (point)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1339 (setq idlwave-shell-command-output
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1340 (with-current-buffer (process-buffer proc)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1341 (buffer-substring
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1342 (save-excursion
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1343 (goto-char (process-mark proc))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1344 (beginning-of-line nil)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1345 (point))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1346 comint-last-input-end))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1347
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1348 ;; Scan for state and do post command - bracket them
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1349 ;; with idlwave-shell-ready=nil since they
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1350 ;; may call idlwave-shell-send-command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1351 (let ((idlwave-shell-ready nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1352 (idlwave-shell-scan-for-state)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1353 ;; Unset idlwave-shell-ready to prevent sending
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1354 ;; commands to IDL while running hook.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1355 (if (listp idlwave-shell-post-command-hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1356 (eval idlwave-shell-post-command-hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1357 (funcall idlwave-shell-post-command-hook))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1358 ;; Reset to default state for next command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1359 ;; Also we do not want to find this prompt again.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1360 (setq idlwave-shell-accumulation nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1361 idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1362 idlwave-shell-post-command-hook nil
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1363 idlwave-shell-hide-output nil
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1364 idlwave-shell-wait-for-output nil))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1365 ;; Done with post command. Do pending command if
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1366 ;; any.
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1367 (idlwave-shell-send-command))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1368 ;; We didn't get the prompt yet... maybe accept more output
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1369 (when idlwave-shell-wait-for-output
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1370 ;;; Test/Debug code
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1371 ; (save-excursion (set-buffer
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1372 ; (get-buffer-create "*idlwave-shell-output*"))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1373 ; (goto-char (point-max))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1374 ; (insert "\n<=== WAITING ON OUTPUT ==>\n"))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1375 (accept-process-output proc nil 100))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1376 (store-match-data data)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1377
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1378 (defun idlwave-shell-sentinel (process event)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1379 "The sentinel function for the IDLWAVE shell process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1380 (let* ((buf (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1381 (win (get-buffer-window buf)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1382 (when (get-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1383 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1384 (set-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1385 (goto-char (point-max))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1386 (insert (format "\n\n Process %s %s" process event))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1387 (if (and idlwave-shell-save-command-history
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1388 (stringp idlwave-shell-command-history-file))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1389 (condition-case nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1390 (comint-write-input-ring)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1391 (error nil)))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1392
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1393 (when (and (> (length (frame-list)) 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1394 (frame-live-p idlwave-shell-idl-wframe))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1395 (delete-frame idlwave-shell-idl-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1396 (setq idlwave-shell-idl-wframe nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1397 idlwave-shell-display-wframe nil))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1398 (when (and (window-live-p win)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1399 (not (one-window-p 'nomini)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1400 (delete-window win))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1401 (idlwave-shell-cleanup)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1402 ;; Run the hook, if possible in the shell buffer.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1403 (if (get-buffer buf)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1404 (save-excursion
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1405 (set-buffer buf)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1406 (run-hooks 'idlwave-shell-sentinel-hook))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1407 (run-hooks 'idlwave-shell-sentinel-hook))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1408
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1409 (defun idlwave-shell-scan-for-state ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1410 "Scan for state info.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1411 Looks for messages in output from last IDL command indicating where
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1412 IDL has stopped. The types of messages we are interested in are
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1413 execution halted, stepped, breakpoint, interrupted at and trace
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1414 messages. We ignore error messages otherwise.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1415 For breakpoint messages process any attached count or command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1416 parameters.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1417 Update the windows if a message is found."
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1418 (cond
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1419 ;; Make sure we have output
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1420 ((not idlwave-shell-command-output))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1421
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1422 ;; First Priority: Syntax and other errors
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1423 ((or
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1424 (string-match idlwave-shell-syntax-error idlwave-shell-command-output)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1425 (string-match idlwave-shell-other-error idlwave-shell-command-output))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1426 (save-excursion
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1427 (set-buffer
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1428 (get-buffer-create idlwave-shell-error-buffer))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1429 (erase-buffer)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1430 (insert idlwave-shell-command-output)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1431 (goto-char (point-min))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1432 (setq idlwave-shell-error-last (point)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1433 (idlwave-shell-goto-next-error))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1434
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1435 ;; Second Priority: Various types of HALT messages.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1436 ((string-match idlwave-shell-halt-messages-re
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1437 idlwave-shell-command-output)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1438 ;; Grab the file and line state info.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1439 (setq idlwave-shell-calling-stack-index 0)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1440 (setq idlwave-shell-halt-frame
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1441 (idlwave-shell-parse-line
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1442 (substring idlwave-shell-command-output (match-end 0))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1443 (idlwave-shell-display-line (idlwave-shell-pc-frame)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1444
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1445 ;; Last Priority: Breakpoints
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1446 ((string-match idlwave-shell-break-message
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1447 idlwave-shell-command-output)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1448 (setq idlwave-shell-calling-stack-index 0)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1449 (setq idlwave-shell-halt-frame
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1450 (idlwave-shell-parse-line
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1451 (substring idlwave-shell-command-output (match-end 0))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1452 ;; We used to count hits on breakpoints
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1453 ;; this is no longer supported since IDL breakpoints
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1454 ;; have learned counting.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1455 ;; Do breakpoint command processing
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1456 (let ((bp (assoc
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1457 (list
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1458 (nth 0 idlwave-shell-halt-frame)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1459 (nth 1 idlwave-shell-halt-frame))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1460 idlwave-shell-bp-alist)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1461 (if bp
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1462 (let ((cmd (idlwave-shell-bp-get bp 'cmd)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1463 (if cmd
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1464 ;; Execute command
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1465 (if (listp cmd) (eval cmd) (funcall cmd))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1466 ;; A breakpoint that we did not know about - perhaps it was
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1467 ;; set by the user or IDL isn't reporting breakpoints like
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1468 ;; we expect. Lets update our list.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1469 (idlwave-shell-bp-query)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1470 (idlwave-shell-display-line (idlwave-shell-pc-frame)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1471
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1472 (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1473 "Buffer containing syntax errors from IDL compilations.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1474
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1475 ;; FIXME: the following two variables do not currently allow line breaks
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1476 ;; in module and file names. I am not sure if it will be necessary to
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1477 ;; change this. Currently it seems to work the way it is.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1478 (defvar idlwave-shell-syntax-error
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1479 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1480 "A regular expression to match an IDL syntax error.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1481 The first \(..\) pair should match the file name. The second pair
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1482 should match the line number.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1483
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1484 (defvar idlwave-shell-other-error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1485 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1486 "A regular expression to match any IDL error.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1487 The first \(..\) pair should match the file name. The second pair
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1488 should match the line number.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1489
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1490 (defvar idlwave-shell-file-line-message
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1491 (concat
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1492 "\\(" ; program name group (1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1493 "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter, followed by [..]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1494 "\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1495 "\\)" ; end program name group (1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1496 "[ \t\n]+" ; white space
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1497 "\\(" ; line number group (3)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1498 "[0-9]+" ; the line number (the fix point)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1499 "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1500 "\\)" ; end line number group (3)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1501 "[ \t\n]+" ; white space
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1502 "\\(" ; file name group (5)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1503 "[^ \t\n]+" ; file names can contain any non-white
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1504 "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1505 "\\)" ; end line number group (5)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1506 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1507 "*A regular expression to parse out the file name and line number.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1508 The 1st group should match the subroutine name.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1509 The 3rd group is the line number.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1510 The 5th group is the file name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1511 All parts may contain linebreaks surrounded by spaces. This is important
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1512 in IDL5 which inserts random linebreaks in long module and file names.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1513
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1514 (defun idlwave-shell-parse-line (string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1515 "Parse IDL message for the subroutine, file name and line number.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1516 We need to work hard here to remove the stupid line breaks inserted by
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1517 IDL5. These line breaks can be right in the middle of procedure
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1518 or file names.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1519 It is very difficult to come up with a robust solution. This one seems
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1520 to be pretty good though.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1521
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1522 Here is in what ways it improves over the previous solution:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1523
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1524 1. The procedure name can be split and will be restored.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1525 2. The number can be split. I have never seen this, but who knows.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1526 3. We do not require the `.pro' extension for files.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1527
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1528 This function can still break when the file name ends on a end line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1529 and the message line contains an additional line with garbage. Then
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1530 the first part of that garbage will be added to the file name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1531 However, the function checks the existence of the files with and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1532 without this last part - thus the function only breaks if file name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1533 plus garbage match an existing regular file. This is hopefully very
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1534 unlikely."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1535
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1536 (let (number procedure file)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1537 (when (and (not (string-match ":\\s-*\\$MAIN" string))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1538 (string-match idlwave-shell-file-line-message string))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1539 (setq procedure (match-string 1 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1540 number (match-string 3 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1541 file (match-string 5 string))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1542
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1543 ;; Repair the strings
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1544 (setq procedure (idlwave-shell-repair-string procedure))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1545 (setq number (idlwave-shell-repair-string number))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1546 (setq file (idlwave-shell-repair-file-name file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1547
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1548 ;; If we have a file, return the frame list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1549 (if file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1550 (list (idlwave-shell-file-name file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1551 (string-to-int number)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1552 procedure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1553 ;; No success finding a file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1554 nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1555
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1556 (defun idlwave-shell-repair-string (string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1557 "Repair a string by taking out all linebreaks. This is destructive!"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1558 (while (string-match "[ \t]*\n[ \t]*" string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1559 (setq string (replace-match "" t t string)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1560 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1561
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1562 (defun idlwave-shell-repair-file-name (file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1563 "Repair a file name string by taking out all linebreaks.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1564 The last line of STRING may be garbage - we check which one makes a valid
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1565 file name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1566 (let ((file1 "") (file2 "") (start 0))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1567 ;; We scan no further than to the next "^%" line
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1568 (if (string-match "^%" file)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1569 (setq file (substring file 0 (match-beginning 0))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1570 ;; Take out the line breaks
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1571 (while (string-match "[ \t]*\n[ \t]*" file start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1572 (setq file1 (concat file1 (substring file start (match-beginning 0)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1573 start (match-end 0)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1574 (setq file2 (concat file1 (substring file start)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1575 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1576 ((file-regular-p file2) file2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1577 ((file-regular-p file1) file1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1578 ;; If we cannot veryfy the existence of the file, we return the shorter
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1579 ;; name. The idea behind this is that this may be a relative file name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1580 ;; and our idea about the current working directory may be wrong.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1581 ;; If it is a relative file name, it hopefully is short.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1582 ((not (string= "" file1)) file1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1583 ((not (string= "" file2)) file2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1584 (t nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1585
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1586 (defun idlwave-shell-cleanup ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1587 "Do necessary cleanup for a terminated IDL process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1588 (setq idlwave-shell-step-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1589 idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1590 idlwave-shell-pending-commands nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1591 idlwave-shell-command-line-to-execute nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1592 idlwave-shell-bp-alist nil
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1593 idlwave-shell-calling-stack-index 0
47453
2e596fc1fdac (idlwave-shell-cleanup): Fix reference to `idlwave-idlwave_routine_info-compiled'.
Juanma Barranquero <lekktu@gmail.com>
parents: 47440
diff changeset
1594 idlwave-idlwave_routine_info-compiled nil)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1595 (idlwave-shell-delete-temp-files)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1596 (idlwave-shell-display-line nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1597 (idlwave-shell-update-bp-overlays) ; kill old overlays
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1598 (idlwave-shell-kill-buffer idlwave-shell-hidden-output-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1599 (idlwave-shell-kill-buffer idlwave-shell-bp-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1600 (idlwave-shell-kill-buffer idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1601 ;; (idlwave-shell-kill-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1602 (and (get-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1603 (bury-buffer (get-buffer (idlwave-shell-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1604 (run-hooks 'idlwave-shell-cleanup-hook))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1605
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1606 (defun idlwave-shell-kill-buffer (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1607 "Kill buffer BUF if it exists."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1608 (if (setq buf (get-buffer buf))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1609 (kill-buffer buf)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1610
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1611 (defun idlwave-shell-kill-shell-buffer-confirm ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1612 (when (idlwave-shell-is-running)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1613 (ding)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1614 (unless (y-or-n-p "IDL shell is running. Are you sure you want to kill the buffer? ")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1615 (error "Abort"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1616 (message "Killing buffer *idl* and the associated process")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1617
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1618 (defun idlwave-shell-window (n)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1619 "Issue a `window,N' command to IDL, with special window size.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1620 The size is given by `idlwave-shell-graphics-window-size'."
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1621 (interactive "P")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1622 (let ((n (if n (prefix-numeric-value n) 0)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1623 (idlwave-shell-send-command
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1624 (apply 'format "window,%d,xs=%d,ys=%d"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1625 n idlwave-shell-graphics-window-size)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1626 nil (idlwave-shell-hide-p 'misc))))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1627
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1628 (defun idlwave-shell-resync-dirs ()
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1629 "Resync the buffer's idea of the current directory.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1630 This command queries IDL with the command bound to
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1631 `idlwave-shell-dirstack-query', reads the output for the new
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1632 directory."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1633 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1634 (idlwave-shell-send-command idlwave-shell-dirstack-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1635 'idlwave-shell-filter-directory
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1636 'hide 'wait))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1637
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1638 (defun idlwave-shell-retall (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1639 "Return from the entire calling stack."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1640 (interactive "P")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1641 (idlwave-shell-send-command "retall" nil (idlwave-shell-hide-p 'misc)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1642
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1643 (defun idlwave-shell-closeall (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1644 "Close all open files."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1645 (interactive "P")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1646 (idlwave-shell-send-command "close,/all" nil (idlwave-shell-hide-p 'misc)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1647
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1648 (defun idlwave-shell-quit (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1649 "Exit the idl process after confirmation.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1650 With prefix ARG, exit without confirmation."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1651 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1652 (if (not (idlwave-shell-is-running))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1653 (error "Shell is not running")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1654 (if (or arg (y-or-n-p "Exit the IDLWAVE Shell? "))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1655 (condition-case nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1656 (idlwave-shell-send-command "exit")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1657 (error nil)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1658
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1659 (defun idlwave-shell-reset (&optional hidden)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1660 "Reset IDL. Return to main level and destroy the leftover variables.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1661 This issues the following commands:
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1662 RETALL
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1663 WIDGET_CONTROL,/RESET
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1664 CLOSE, /ALL
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1665 HEAP_GC, /VERBOSE"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1666 ;; OBJ_DESTROY, OBJ_VALID() FIXME: should this be added?
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1667 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1668 (message "Resetting IDL")
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1669 (setq idlwave-shell-calling-stack-index 0)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1670 (idlwave-shell-send-command "retall" nil hidden)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1671 (idlwave-shell-send-command "widget_control,/reset" nil hidden)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1672 (idlwave-shell-send-command "close,/all" nil hidden)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1673 ;; (idlwave-shell-send-command "obj_destroy, obj_valid()" nil hidden)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1674 (idlwave-shell-send-command "heap_gc,/verbose" nil hidden)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1675 (idlwave-shell-display-line nil))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1676
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1677 (defun idlwave-shell-path-filter ()
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1678 ;; Convert the output of the path query into a list of directories
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1679 (let ((path-string idlwave-shell-command-output)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1680 (case-fold-search t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1681 (start 0)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1682 dirs sysdir)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1683 (while (string-match "^PATH:[ \t]*<\\(.*\\)>[ \t]*\n" path-string start)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1684 (push (match-string 1 path-string) dirs)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1685 (setq start (match-end 0)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1686 (setq dirs (mapcar 'file-name-as-directory dirs))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1687 (if (string-match "^SYSDIR:[ \t]*<\\(.*\\)>[ \t]*\n" path-string)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1688 (setq sysdir (file-name-as-directory
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1689 (match-string 1 path-string))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1690 (cons sysdir (nreverse dirs))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1691
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1692 (defun idlwave-shell-routine-info-filter ()
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1693 "Function which parses the special output from idlwave_routine_info.pro."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1694 (let ((text idlwave-shell-command-output)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1695 (start 0)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1696 sep sep-re file type spec specs name cs key keys class entry)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1697 ; (message "GOT: %s" text) ;??????????????????????
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1698 ;; Initialize variables
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1699 (setq idlwave-compiled-routines nil
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1700 idlwave-unresolved-routines nil)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1701 ;; Cut out the correct part of the output.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1702 (if (string-match
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1703 "^>>>BEGIN OF IDLWAVE ROUTINE INFO (\"\\(.+\\)\" IS THE SEPARATOR.*"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1704 text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1705 (setq sep (match-string 1 text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1706 sep-re (concat (regexp-quote sep) " *")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1707 text (substring text (match-end 0)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1708 ;; Set dummy values and kill the text
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1709 (setq sep "@" sep-re "@ *" text "")
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1710 (message "Routine Info warning: No match for BEGIN line in \n>>>>\n%s\n<<<<\n"
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1711 idlwave-shell-command-output))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1712 (if (string-match "^>>>END OF IDLWAVE ROUTINE INFO.*" text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1713 (setq text (substring text 0 (match-beginning 0)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1714 (message "Routine Info warning: No match for END line in \n>>>>\n%s\n<<<<\n"
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1715 idlwave-shell-command-output))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1716 (if (string-match "\\S-" text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1717 ;; Obviously, the pro worked. Make a note that we have it now.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1718 (setq idlwave-idlwave_routine_info-compiled t))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1719 ;; Match the output lines
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1720 (while (string-match "^IDLWAVE-\\(PRO\\|FUN\\): \\(.*\\)" text start)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1721 (setq start (match-end 0))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1722 (setq type (match-string 1 text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1723 spec (match-string 2 text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1724 specs (idlwave-split-string spec sep-re)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1725 name (nth 0 specs)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1726 class (if (equal (nth 1 specs) "") nil (nth 1 specs))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1727 file (nth 2 specs)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1728 cs (nth 3 specs)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1729 key (nth 4 specs)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1730 keys (if (and (stringp key)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1731 (not (string-match "\\` *\\'" key)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1732 (mapcar 'list
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1733 (delete "" (idlwave-split-string key " +")))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1734 (setq name (idlwave-sintern-routine-or-method name class t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1735 class (idlwave-sintern-class class t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1736 file (if (equal file "") nil file)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1737 keys (mapcar (lambda (x)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1738 (list (idlwave-sintern-keyword (car x) t))) keys))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1739 ;; Make sure we use the same string object for the same file
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1740 (setq file (idlwave-sintern-file file t))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1741 ;; FIXME: What should I do with routines from the temp file???
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1742 ;; Maybe just leave it in - there is a chance that the
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1743 ;; routine is still in there.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1744 ;; (if (equal file idlwave-shell-temp-pro-file)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1745 ;; (setq file nil))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1746
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1747 ;; In the following ignore routines already defined in buffers,
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1748 ;; assuming that if the buffer stuff differs, it is a "new"
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1749 ;; version.
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1750 ;; We could do the same for the library to avoid duplicates -
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1751 ;; but I think frequently a user might have several versions of
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1752 ;; the same function in different programs, and in this case the
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1753 ;; compiled one will be the best guess of all version.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1754 ;; Therefore, we leave duplicates of library routines in.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1755
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1756 (cond ((string= name "$MAIN$")) ; ignore this one
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1757 ((and (string= type "PRO")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1758 ;; FIXME: is it OK to make the buffer routines dominate?
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1759 (or t (null file)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1760 (not (idlwave-rinfo-assq name 'pro class
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1761 idlwave-buffer-routines)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1762 ;; FIXME: is it OK to make the library routines dominate?
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1763 ;;(not (idlwave-rinfo-assq name 'pro class
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1764 ;; idlwave-library-routines))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1765 )
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1766 (setq entry (list name 'pro class (cons 'compiled file) cs keys))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1767 (if file
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1768 (push entry idlwave-compiled-routines)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1769 (push entry idlwave-unresolved-routines)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1770
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1771 ((and (string= type "FUN")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1772 ;; FIXME: is it OK to make the buffer routines dominate?
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1773 (or t (not file)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1774 (not (idlwave-rinfo-assq name 'fun class
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1775 idlwave-buffer-routines)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1776 ;; FIXME: is it OK to make the library routines dominate?
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1777 ;; (not (idlwave-rinfo-assq name 'fun class
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1778 ;; idlwave-library-routines))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1779 )
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1780 (setq entry (list name 'fun class (cons 'compiled file) cs keys))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1781 (if file
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1782 (push entry idlwave-compiled-routines)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1783 (push entry idlwave-unresolved-routines))))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1784 ;; Reverse the definitions so that they are alphabetically sorted.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1785 (setq idlwave-compiled-routines (nreverse idlwave-compiled-routines)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1786 idlwave-unresolved-routines (nreverse idlwave-unresolved-routines)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1787
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1788 (defun idlwave-shell-filter-directory ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1789 "Get the current directory from `idlwave-shell-command-output'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1790 Change the default directory for the process buffer to concur."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1791 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1792 (set-buffer (idlwave-shell-buffer))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1793 (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1794 idlwave-shell-command-output)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1795 (let ((dir (substring idlwave-shell-command-output
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1796 (match-beginning 1) (match-end 1))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1797 ; (message "Setting Emacs working dir to %s" dir)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1798 (setq idlwave-shell-default-directory dir)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1799 (setq default-directory (file-name-as-directory dir))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1800
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1801 (defvar idlwave-shell-get-object-class nil)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1802 (defun idlwave-shell-get-object-class (apos)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1803 "Query the shell for the class of the object before point."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1804 (let ((bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1805 (bol (save-excursion (forward-line 0) (point)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1806 expression)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1807 (save-excursion
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1808 (goto-char apos)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1809 (setq expression (buffer-substring
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1810 (catch 'exit
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1811 (while t
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1812 (if (not (re-search-backward
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1813 "[^][.A-Za-z0-9_() ]" bos t))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1814 (throw 'exit bos)) ;ran into bos
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1815 (if (not (idlwave-is-pointer-dereference bol))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1816 (throw 'exit (1+ (point))))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1817 apos)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1818 (when (not (string= expression ""))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1819 (setq idlwave-shell-get-object-class nil)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1820 (idlwave-shell-send-command
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1821 (concat "print,obj_class(" expression ")")
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1822 'idlwave-shell-parse-object-class
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1823 'hide 'wait)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1824 ;; If we don't know anything about the class, update shell routines
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1825 (if (and idlwave-shell-get-object-class
55729
0c0b514a4952 (idlwave-shell-get-object-class): Use assoc-string, not assoc-ignore-case.
Richard M. Stallman <rms@gnu.org>
parents: 54770
diff changeset
1826 (not (assoc-string idlwave-shell-get-object-class
0c0b514a4952 (idlwave-shell-get-object-class): Use assoc-string, not assoc-ignore-case.
Richard M. Stallman <rms@gnu.org>
parents: 54770
diff changeset
1827 (idlwave-class-alist) t)))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1828 (idlwave-shell-maybe-update-routine-info))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1829 idlwave-shell-get-object-class)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1830
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1831 (defun idlwave-shell-parse-object-class ()
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1832 "Parse the output of the obj_class command."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1833 (let ((match "print,obj_class([^\n\r]+[\n\r ]+"))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1834 (if (and
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1835 (not (string-match (concat match match "\\s-*^[\n\r]+"
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1836 "% Syntax error")
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1837 idlwave-shell-command-output))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1838 (string-match (concat match "\\([A-Za-z_0-9]+\\)")
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1839 idlwave-shell-command-output))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1840 (setq idlwave-shell-get-object-class
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1841 (match-string 1 idlwave-shell-command-output)))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1842
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1843
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1844 (defun idlwave-shell-complete (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1845 "Do completion in the idlwave-shell buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1846 Calls `idlwave-shell-complete-filename' after some executive commands or
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1847 in strings. Otherwise, calls `idlwave-complete' to complete modules and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1848 keywords."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1849 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1850 (let (cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1851 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1852 ((setq cmd (idlwave-shell-executive-command))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1853 ;; We are in a command line with an executive command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1854 (if (member (upcase cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1855 '(".R" ".RU" ".RUN" ".RN" ".RNE" ".RNEW"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1856 ".COM" ".COMP" ".COMPI" ".COMPIL" ".COMPILE"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1857 ;; This command expects file names
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1858 (idlwave-shell-complete-filename)))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1859
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1860 ((idlwave-shell-batch-command)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1861 (idlwave-shell-complete-filename))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1862
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1863 ((and (idlwave-shell-filename-string)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1864 (save-excursion
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1865 (beginning-of-line)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1866 (let ((case-fold-search t))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1867 (not (looking-at ".*obj_new")))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1868 (idlwave-shell-complete-filename))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1869
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1870 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1871 ;; Default completion of modules and keywords
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1872 (idlwave-complete arg)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1873
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1874 (defun idlwave-shell-complete-filename (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1875 "Complete a file name at point if after a file name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1876 We assume that we are after a file name when completing one of the
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1877 args of an executive .run, .rnew or .compile."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1878 ;; CWD might have changed, resync, to set default directory
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1879 (idlwave-shell-resync-dirs)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1880 (let ((comint-file-name-chars idlwave-shell-file-name-chars))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1881 (comint-dynamic-complete-as-filename)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1882
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1883 (defun idlwave-shell-executive-command ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1884 "Return the name of the current executive command, if any."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1885 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1886 (idlwave-beginning-of-statement)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1887 (if (looking-at "[ \t]*\\([.][^ \t\n\r]+\\)")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1888 (match-string 1))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1889
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1890 (defun idlwave-shell-filename-string ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1891 "Return t if in a string and after what could be a file name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1892 (let ((limit (save-excursion (beginning-of-line) (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1893 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1894 ;; Skip backwards over file name chars
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1895 (skip-chars-backward idlwave-shell-file-name-chars limit)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1896 ;; Check of the next char is a string delimiter
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1897 (memq (preceding-char) '(?\' ?\")))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1898
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1899 (defun idlwave-shell-batch-command ()
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1900 "Returns t if we're in a batch command statement like @foo"
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1901 (let ((limit (save-excursion (beginning-of-line) (point))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1902 (save-excursion
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1903 ;; Skip backwards over filename
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1904 (skip-chars-backward idlwave-shell-file-name-chars limit)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1905 (skip-chars-backward " \t" limit)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1906 (and (eq (preceding-char) ?@) (not (idlwave-in-quote))))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1907
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1908 ;;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1909 ;;; This section contains code for debugging IDL programs. --------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1910 ;;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1911
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1912 (defun idlwave-shell-redisplay (&optional hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1913 "Tries to resync the display with where execution has stopped.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1914 Issues a \"help,/trace\" command followed by a call to
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1915 `idlwave-shell-display-line'. Also updates the breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1916 overlays."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1917 (interactive)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1918 (setq idlwave-shell-calling-stack-index 0)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1919 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1920 "help,/trace"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1921 '(idlwave-shell-display-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1922 (idlwave-shell-pc-frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1923 hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1924 (idlwave-shell-bp-query))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1925
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1926 (defun idlwave-shell-display-level-in-calling-stack (&optional hide)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1927 (idlwave-shell-send-command
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1928 "help,/trace"
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1929 `(progn
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1930 ;; scanning for the state will reset the stack level - restore it
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1931 (setq idlwave-shell-calling-stack-index
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1932 ,idlwave-shell-calling-stack-index)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1933 ;; parse the stack and visit the selected frame
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1934 (idlwave-shell-parse-stack-and-display))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1935 hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1936
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1937 (defun idlwave-shell-parse-stack-and-display ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1938 (let* ((lines (delete "" (idlwave-split-string
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1939 idlwave-shell-command-output "^%")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1940 (stack (delq nil (mapcar 'idlwave-shell-parse-line lines)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1941 (nmax (1- (length stack)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1942 (nmin 0) message)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1943 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1944 ((< nmax nmin)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1945 (setq idlwave-shell-calling-stack-index 0)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1946 (ding)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1947 (message "Problem with calling stack"))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1948 ((> idlwave-shell-calling-stack-index nmax)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1949 (ding)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1950 (setq idlwave-shell-calling-stack-index nmax
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1951 message (format "%d is the highest calling stack level - can't go further up"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1952 (- nmax))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1953 ((< idlwave-shell-calling-stack-index nmin)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1954 (ding)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1955 (setq idlwave-shell-calling-stack-index nmin
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1956 message (format "%d is the current calling stack level - can't go further down"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1957 (- nmin)))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1958 (setq idlwave-shell-calling-stack-routine
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1959 (nth 2 (nth idlwave-shell-calling-stack-index stack)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1960 (idlwave-shell-display-line
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1961 (nth idlwave-shell-calling-stack-index stack))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1962 (message (or message
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1963 (format "In routine %s (stack level %d)"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1964 idlwave-shell-calling-stack-routine
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1965 (- idlwave-shell-calling-stack-index))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1966
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1967 (defun idlwave-shell-stack-up ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1968 "Display the source code one step up the calling stack."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1969 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1970 (incf idlwave-shell-calling-stack-index)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1971 (idlwave-shell-display-level-in-calling-stack 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1972 (defun idlwave-shell-stack-down ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1973 "Display the source code one step down the calling stack."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1974 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1975 (decf idlwave-shell-calling-stack-index)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1976 (idlwave-shell-display-level-in-calling-stack 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1977
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1978 (defun idlwave-shell-goto-frame (&optional frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1979 "Set buffer to FRAME with point at the frame line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1980 If the optional argument FRAME is nil then idlwave-shell-pc-frame is
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1981 used. Does nothing if the resulting frame is nil."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1982 (if frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1983 (setq frame (idlwave-shell-pc-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1984 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1985 (frame
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1986 (set-buffer (idlwave-find-file-noselect (car frame) 'shell))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1987 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1988 (goto-line (nth 1 frame)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1989
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1990 (defun idlwave-shell-pc-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1991 "Returns the frame for IDL execution."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1992 (and idlwave-shell-halt-frame
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
1993 (list (nth 0 idlwave-shell-halt-frame)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1994 (nth 1 idlwave-shell-halt-frame)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1995 (nth 2 idlwave-shell-halt-frame))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1996
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1997 (defun idlwave-shell-valid-frame (frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1998 "Check that frame is for an existing file."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1999 (file-readable-p (car frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2000
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2001 (defun idlwave-shell-display-line (frame &optional col)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2002 "Display FRAME file in other window with overlay arrow.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2003
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2004 FRAME is a list of file name, line number, and subroutine name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2005 If FRAME is nil then remove overlay."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2006 (if (not frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2007 ;; Remove stop-line overlay from old position
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2008 (progn
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2009 (setq overlay-arrow-string nil)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2010 (setq idlwave-shell-mode-line-info nil)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2011 (setq idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2012 (if idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2013 (delete-overlay idlwave-shell-stop-line-overlay)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2014 (if (not (idlwave-shell-valid-frame frame))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2015 ;; FIXME: errors are dangerous in shell filters. But I think I
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2016 ;; have never encountered this one.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2017 (error (concat "Invalid frame - unable to access file: " (car frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2018 ;;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2019 ;;; buffer : the buffer to display a line in.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2020 ;;; select-shell: current buffer is the shell.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2021 ;;;
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2022 (setq idlwave-shell-mode-line-info
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2023 (if (nth 2 frame)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2024 (format "[%d:%s]"
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2025 (- idlwave-shell-calling-stack-index)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2026 (nth 2 frame))))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2027 (let* ((buffer (idlwave-find-file-noselect (car frame) 'shell))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2028 (select-shell (equal (buffer-name) (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2029 window pos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2030
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2031 ;; First make sure the shell window is visible
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2032 (idlwave-display-buffer (idlwave-shell-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2033 nil (idlwave-shell-shell-frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2034
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2035 ;; Now display the buffer and remember which window it is.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2036 (setq window (idlwave-display-buffer buffer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2037 nil (idlwave-shell-source-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2038
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2039 ;; Enter the buffer and mark the line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2040 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2041 (set-buffer buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2042 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2043 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2044 (goto-line (nth 1 frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2045 (setq pos (point))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2046 (setq idlwave-shell-is-stopped t)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2047 (if idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2048 ;; Move overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2049 (move-overlay idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2050 (point) (save-excursion (end-of-line) (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2051 (current-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2052 ;; Use the arrow instead, but only if marking is wanted.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2053 (if idlwave-shell-mark-stop-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2054 (setq overlay-arrow-string idlwave-shell-overlay-arrow))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2055 (or overlay-arrow-position ; create the marker if necessary
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2056 (setq overlay-arrow-position (make-marker)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2057 (set-marker overlay-arrow-position (point) buffer)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2058
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2059 ;; If the point is outside the restriction, widen the buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2060 (if (or (< pos (point-min)) (> pos (point-max)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2061 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2062 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2063 (goto-char pos)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2064
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2065 ;; If we have the column of the error, move the cursor there.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2066 (if col (move-to-column col))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2067 (setq pos (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2068
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2069 ;; Make sure pos is really displayed in the window.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2070 (set-window-point window pos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2071
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2072 ;; If we came from the shell, go back there. Otherwise select
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2073 ;; the window where the error is displayed.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2074 (if (and (equal (buffer-name) (idlwave-shell-buffer))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2075 (not select-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2076 (select-window window))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2077
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2078
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2079 (defun idlwave-shell-step (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2080 "Step one source line. If given prefix argument ARG, step ARG source lines."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2081 (interactive "p")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2082 (or (not arg) (< arg 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2083 (setq arg 1))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2084 (idlwave-shell-send-command
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2085 (concat ".s " (if (integerp arg) (int-to-string arg) arg))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2086 nil (idlwave-shell-hide-p 'debug)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2087
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2088 (defun idlwave-shell-stepover (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2089 "Stepover one source line.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2090 If given prefix argument ARG, step ARG source lines.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2091 Uses IDL's stepover executive command which does not enter called functions."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2092 (interactive "p")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2093 (or (not arg) (< arg 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2094 (setq arg 1))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2095 (idlwave-shell-send-command
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2096 (concat ".so " (if (integerp arg) (int-to-string arg) arg))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2097 nil (idlwave-shell-hide-p 'debug)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2098
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2099 (defun idlwave-shell-break-here (&optional count cmd condition)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2100 "Set breakpoint at current line.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2101
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2102 If Count is nil then an ordinary breakpoint is set. We treat a count
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2103 of 1 as a temporary breakpoint using the ONCE keyword. Counts greater
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2104 than 1 use the IDL AFTER=count keyword to break only after reaching
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2105 the statement count times.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2106
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2107 Optional argument CMD is a list or function to evaluate upon reaching
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2108 the breakpoint."
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2109
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2110 (interactive "P")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2111 (when (listp count)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2112 (if (equal (car count) 4)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2113 (setq condition (read-string "Break Condition: ")))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2114 (setq count nil))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2115 (idlwave-shell-set-bp
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2116 ;; Create breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2117 (idlwave-shell-bp (idlwave-shell-current-frame)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2118 (list count cmd condition)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2119 (idlwave-shell-current-module))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2120
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2121 (defun idlwave-shell-set-bp-check (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2122 "Check for failure to set breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2123 This is run on `idlwave-shell-post-command-hook'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2124 Offers to recompile the procedure if we failed. This usually fixes
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2125 the problem with not being able to set the breakpoint."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2126 ;; Scan for message
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2127 (if (and idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2128 (string-match "% BREAKPOINT: *Unable to find code"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2129 idlwave-shell-command-output))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2130 ;; Offer to recompile
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2131 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2132 (if (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2133 (beep)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2134 (y-or-n-p
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2135 (concat "Okay to recompile file "
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2136 (idlwave-shell-bp-get bp 'file) " ")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2137 ;; Recompile
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2138 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2139 ;; Clean up before retrying
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2140 (idlwave-shell-command-failure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2141 (idlwave-shell-send-command
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2142 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2143 (idlwave-shell-hide-p 'run))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2144 ;; Try setting breakpoint again
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2145 (idlwave-shell-set-bp bp))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2146 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2147 (message "Unable to set breakpoint.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2148 (idlwave-shell-command-failure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2149 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2150 ;; return non-nil if no error found
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2151 nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2152 'okay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2153
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2154 (defun idlwave-shell-command-failure ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2155 "Do any necessary clean up when an IDL command fails.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2156 Call this from a function attached to `idlwave-shell-post-command-hook'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2157 that detects the failure of a command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2158 For example, this is called from `idlwave-shell-set-bp-check' when a
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2159 breakpoint can not be set."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2160 ;; Clear pending commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2161 (setq idlwave-shell-pending-commands nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2162
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2163 (defun idlwave-shell-cont ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2164 "Continue executing."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2165 (interactive)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2166 (idlwave-shell-send-command ".c" '(idlwave-shell-redisplay 'hide)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2167 (idlwave-shell-hide-p 'debug)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2168
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2169 (defun idlwave-shell-go ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2170 "Run .GO. This starts the main program of the last compiled file."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2171 (interactive)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2172 (idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2173 (idlwave-shell-hide-p 'debug)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2174
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2175 (defun idlwave-shell-return ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2176 "Run .RETURN (continue to next return, but stay in subprogram)."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2177 (interactive)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2178 (idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2179 (idlwave-shell-hide-p 'debug)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2180
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2181 (defun idlwave-shell-skip ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2182 "Run .SKIP (skip one line, then step)."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2183 (interactive)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2184 (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2185 (idlwave-shell-hide-p 'debug)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2186
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2187 (defun idlwave-shell-clear-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2188 "Clear breakpoint BP.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2189 Clears in IDL and in `idlwave-shell-bp-alist'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2190 (let ((index (idlwave-shell-bp-get bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2191 (if index
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2192 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2193 (idlwave-shell-send-command
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2194 (concat "breakpoint,/clear,"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2195 (if (integerp index) (int-to-string index) index))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2196 nil (idlwave-shell-hide-p 'breakpoint))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2197 (idlwave-shell-bp-query)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2198
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2199 (defun idlwave-shell-current-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2200 "Return a list containing the current file name and line point is in.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2201 If in the IDL shell buffer, returns `idlwave-shell-pc-frame'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2202 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2203 ;; In IDL shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2204 (idlwave-shell-pc-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2205 ;; In source
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2206 (list (idlwave-shell-file-name (buffer-file-name))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2207 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2208 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2209 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2210 (beginning-of-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2211 (1+ (count-lines 1 (point))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2212
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2213 (defun idlwave-shell-current-module ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2214 "Return the name of the module for the current file.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2215 Returns nil if unable to obtain a module name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2216 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2217 ;; In IDL shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2218 (nth 2 idlwave-shell-halt-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2219 ;; In pro file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2220 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2221 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2222 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2223 (if (idlwave-prev-index-position)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2224 (upcase (idlwave-unit-name)))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2225
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2226 (defun idlwave-shell-clear-current-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2227 "Remove breakpoint at current line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2228 This command can be called from the shell buffer if IDL is currently stopped
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2229 at a breakpoint."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2230 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2231 (let ((bp (idlwave-shell-find-bp (idlwave-shell-current-frame))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2232 (if bp (idlwave-shell-clear-bp bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2233 ;; Try moving to beginning of statement
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2234 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2235 (idlwave-shell-goto-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2236 (idlwave-beginning-of-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2237 (setq bp (idlwave-shell-find-bp (idlwave-shell-current-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2238 (if bp (idlwave-shell-clear-bp bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2239 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2240 (message "Cannot identify breakpoint for this line"))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2241
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2242 (defun idlwave-shell-disable-all-bp (&optional enable)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2243 "Disable all breakpoints we know about.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2244 If ENABLE is non-nil, enable them instead."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2245 (let ((bpl idlwave-shell-bp-alist))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2246 (while bpl
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2247 (idlwave-shell-send-command
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2248 (concat "breakpoint,"
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2249 (if enable "/enable," "/disable," )
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2250 (idlwave-shell-bp-get (car bpl)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2251 nil (idlwave-shell-hide-p 'breakpoint))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2252 (setq bpl (cdr bpl)))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2253
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2254 (defun idlwave-shell-to-here ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2255 "Set a breakpoint with count 1 then continue."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2256 (interactive)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2257 (idlwave-shell-disable-all-bp)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2258 (idlwave-shell-break-here 1)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2259 (idlwave-shell-cont)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2260 (idlwave-shell-disable-all-bp 'enable))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2261
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2262 (defun idlwave-shell-break-in (&optional module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2263 "Look for a module name near point and set a break point for it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2264 The command looks for an identifier near point and sets a breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2265 for the first line of the corresponding module."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2266 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2267 ;; get the identifier
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2268 (let (module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2269 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2270 (skip-chars-backward "a-zA-Z0-9_$")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2271 (if (looking-at idlwave-identifier)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2272 (setq module (match-string 0))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2273 (error "No identifier at point")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2274 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2275 idlwave-shell-sources-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2276 `(progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2277 (idlwave-shell-sources-filter)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2278 (idlwave-shell-set-bp-in-module ,module))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2279 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2280
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2281 (defun idlwave-shell-set-bp-in-module (module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2282 "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2283 contains an entry for that module."
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2284 (let ((source-file (car-safe
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2285 (cdr-safe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2286 (assoc (upcase module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2287 idlwave-shell-sources-alist))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2288 buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2289 (if (or (not source-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2290 (not (file-regular-p source-file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2291 (not (setq buf
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2292 (or (idlwave-get-buffer-visiting source-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2293 (find-file-noselect source-file)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2294 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2295 (message "The source file for module %s is probably not compiled"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2296 module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2297 (beep))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2298 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2299 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2300 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2301 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2302 (let ((case-fold-search t))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2303 (if (re-search-forward
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2304 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2305 (downcase module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2306 "[ \t\n,]") nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2307 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2308 (goto-char (match-beginning 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2309 (message "Setting breakpoint for module %s" module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2310 (idlwave-shell-break-here))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2311 (message "Cannot find module %s in file %s" module source-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2312 (beep))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2313
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2314 (defun idlwave-shell-up ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2315 "Run to end of current block.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2316 Sets a breakpoint with count 1 at end of block, then continues."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2317 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2318 (if (idlwave-shell-pc-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2319 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2320 (idlwave-shell-goto-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2321 ;; find end of subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2322 (let ((eos (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2323 (idlwave-beginning-of-subprogram)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2324 (idlwave-forward-block)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2325 (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2326 (idlwave-backward-up-block -1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2327 ;; move beyond end block line - IDL will not break there.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2328 ;; That is, you can put a breakpoint there but when IDL does
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2329 ;; break it will report that it is at the next line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2330 (idlwave-next-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2331 (idlwave-end-of-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2332 ;; Make sure we are not beyond subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2333 (if (< (point) eos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2334 ;; okay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2335 ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2336 ;; Move back inside subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2337 (goto-char eos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2338 (idlwave-previous-statement))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2339 (idlwave-shell-to-here)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2340
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2341 (defun idlwave-shell-out ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2342 "Attempt to run until this procedure exits.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2343 Runs to the last statement and then steps 1 statement. Use the .out command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2344 (interactive)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2345 (idlwave-shell-send-command ".o" nil (idlwave-shell-hide-p 'debug)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2346
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2347 (defun idlwave-shell-help-expression (arg)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2348 "Print help on current expression. See `idlwave-shell-print'."
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2349 (interactive "P")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2350 (idlwave-shell-print arg 'help))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2351
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2352 (defmacro idlwave-shell-mouse-examine (help &optional ev)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2353 "Create a function for generic examination of expressions."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2354 `(lambda (event)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2355 "Expansion function for expression examination."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2356 (interactive "e")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2357 (let ((transient-mark-mode t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2358 (zmacs-regions t)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2359 (tracker (if (featurep 'xemacs) 'mouse-track
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2360 'mouse-drag-region)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2361 (funcall tracker event)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2362 (idlwave-shell-print (if (idlwave-region-active-p) '(16) nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2363 ,help ,ev))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2364
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2365 (defun idlwave-shell-mouse-print (event)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2366 "Print value of variable at the mouse position, with `help'"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2367 (interactive "e")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2368 (funcall (idlwave-shell-mouse-examine nil) event))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2369
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2370 (defun idlwave-shell-mouse-help (event)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2371 "Print value of variable at the mouse position, with `print'."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2372 (interactive "e")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2373 (funcall (idlwave-shell-mouse-examine 'help) event))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2374
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2375 (defun idlwave-shell-examine-select (event)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2376 "Pop-up a list to select from for examining the expression"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2377 (interactive "e")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2378 (funcall (idlwave-shell-mouse-examine nil event) event))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2379
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2380 (defmacro idlwave-shell-examine (help)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2381 "Create a function for key-driven expression examination."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2382 `(lambda ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2383 (interactive)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2384 (idlwave-shell-print nil ,help)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2385
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2386 (defun idlwave-shell-define-key-both (key hook)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2387 "Define a key in both the shell and buffer mode maps."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2388 (define-key idlwave-mode-map key hook)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2389 (define-key idlwave-shell-mode-map key hook))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2390
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2391 (defvar idlwave-shell-examine-label nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2392 "Label to include with examine text if separate.")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2393
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2394 (defun idlwave-shell-print (arg &optional help ev)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2395 "Print current expression.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2396
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2397 With HELP non-nil, show help on expression. If HELP is a string,
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2398 the expression will be put in place of ___, e.g.:
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2399
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2400 print,size(___,/DIMENSIONS)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2401
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2402 Otherwise, print is called on the expression.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2403
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2404 An expression is an identifier plus 1 pair of matched parentheses
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2405 directly following the identifier - an array or function call.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2406 Alternatively, an expression is the contents of any matched
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2407 parentheses when the open parenthesis is not directly preceded by an
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2408 identifier. If point is at the beginning or within an expression
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2409 return the inner-most containing expression, otherwise, return the
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2410 preceding expression.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2411
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2412 With prefix arg ARG prompt for an expression.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2413
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2414 With double prefix arg, use the current region.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2415
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2416 If EV is a valid event passed, pop-up a list from
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2417 idlw-shell-examine-alist from which to select the help command text."
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2418 (interactive "P")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2419 (save-excursion
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2420 (let* ((process (get-buffer-process (current-buffer)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2421 (process-mark (if process (process-mark process)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2422 (stack-label
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2423 (if (and (integerp idlwave-shell-calling-stack-index)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2424 (> idlwave-shell-calling-stack-index 0))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2425 (format " [-%d:%s]"
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2426 idlwave-shell-calling-stack-index
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2427 idlwave-shell-calling-stack-routine)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2428 expr beg end cmd examine-hook)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2429 (cond
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2430 ((and (equal arg '(16))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2431 (< (- (region-end) (region-beginning)) 2000))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2432 (setq beg (region-beginning)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2433 end (region-end)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2434 (arg
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2435 (setq expr (read-string "Expression: ")))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2436 (t
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2437 (idlwave-with-special-syntax
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2438 ;; Move to beginning of current or previous expression
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2439 (if (looking-at "\\<\\|(")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2440 ;; At beginning of expression, don't move backwards unless
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2441 ;; this is at the end of an indentifier.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2442 (if (looking-at "\\>")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2443 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2444 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2445 (if (looking-at "\\>")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2446 ;; Move to beginning of identifier - must be an array or
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2447 ;; function expression.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2448 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2449 ;; Move to end of expression
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2450 (setq beg (point))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2451 (forward-sexp)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2452 (while (looking-at "\\>[[(]\\|\\.")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2453 ;; an array
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2454 (forward-sexp))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2455 (setq end (point)))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2456
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2457 ;; Get expression, but first move the begin mark if a
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2458 ;; process-mark is inside the region, to keep the overlay from
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2459 ;; wandering in the Shell.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2460 (when (and beg end)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2461 (if (and process-mark (> process-mark beg) (< process-mark end))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2462 (setq beg (marker-position process-mark)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2463 (setq expr (buffer-substring beg end)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2464
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2465 ;; Show the overlay(s) and attach any necessary hooks and filters
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2466 (when (and beg end idlwave-shell-expression-overlay)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2467 (move-overlay idlwave-shell-expression-overlay beg end
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2468 (current-buffer))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2469 (add-hook 'pre-command-hook
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2470 'idlwave-shell-delete-expression-overlay))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2471 (setq examine-hook
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2472 (if idlwave-shell-separate-examine-output
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2473 'idlwave-shell-examine-display
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2474 'idlwave-shell-examine-highlight))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2475 (add-hook 'pre-command-hook
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2476 'idlwave-shell-delete-output-overlay)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2477
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2478 ;; Remove empty or comment-only lines
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2479 (while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2480 (setq expr (replace-match "\n" t t expr)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2481 ;; Concatenate continuation lines
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2482 (while (string-match "[ \t]*\\$.*\\(;.*\\)?\\(\n[ \t]*\\|$\\)" expr)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2483 (setq expr (replace-match "" t t expr)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2484 ;; Remove final newline
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2485 (if (string-match "\n[ \t\r]*\\'" expr)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2486 (setq expr (replace-match "" t t expr)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2487 ;; Pop-up the examine selection list, if appropriate
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2488 (if (and ev idlwave-shell-examine-alist)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2489 (let* ((help-cons
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2490 (assoc
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2491 (idlwave-popup-select
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2492 ev (mapcar 'car idlwave-shell-examine-alist)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2493 "Examine with")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2494 idlwave-shell-examine-alist)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2495 (setq help (cdr help-cons))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2496 (if idlwave-shell-separate-examine-output
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2497 (setq idlwave-shell-examine-label
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2498 (concat
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2499 (format "==>%s<==\n%s:" expr (car help-cons))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2500 stack-label "\n"))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2501 (setq idlwave-shell-examine-label
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2502 (concat
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2503 (format "==>%s<==\n%s:" expr
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2504 (cond ((null help) "print")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2505 ((stringp help) help)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2506 (t (symbol-name help))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2507 stack-label "\n")))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2508
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2509 ;; Send the command
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2510 (if stack-label
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2511 (setq cmd (idlwave-retrieve-expression-from-level
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2512 expr
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2513 idlwave-shell-calling-stack-index
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2514 idlwave-shell-calling-stack-routine
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2515 help))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2516 (setq cmd (idlwave-shell-help-statement help expr)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2517 ;(idlwave-shell-recenter-shell-window)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2518 (idlwave-shell-send-command
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2519 cmd
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2520 examine-hook
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2521 (if idlwave-shell-separate-examine-output 'hide)))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2522
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2523 (defvar idlwave-shell-examine-window-alist nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2524 "Variable to hold the win/height pairs for all *Examine* windows.")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2525
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2526 (defun idlwave-shell-examine-display ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2527 "View the examine command output in a separate buffer."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2528 (let (win cur-beg cur-end)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2529 (save-excursion
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2530 (set-buffer (get-buffer-create "*Examine*"))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2531 (use-local-map idlwave-shell-examine-map)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2532 (setq buffer-read-only nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2533 (goto-char (point-max))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2534 (save-restriction
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2535 (narrow-to-region (point) (point))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2536 (if (string-match "^% Syntax error." idlwave-shell-command-output)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2537 (insert "% Syntax error.\n")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2538 (insert idlwave-shell-command-output)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2539 ;; Just take the last bit between the prompts (if more than one).
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2540 (let* ((end (or
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2541 (re-search-backward idlwave-shell-prompt-pattern nil t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2542 (point-max)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2543 (beg (progn
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2544 (goto-char
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2545 (or (progn (if (re-search-backward
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2546 idlwave-shell-prompt-pattern nil t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2547 (match-end 0)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2548 (point-min)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2549 (re-search-forward "\n")))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2550 (str (buffer-substring beg end)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2551 (delete-region (point-min) (point-max))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2552 (insert str)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2553 (if idlwave-shell-examine-label
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2554 (progn (goto-char (point-min))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2555 (insert idlwave-shell-examine-label)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2556 (setq idlwave-shell-examine-label nil)))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2557 (setq cur-beg (point-min)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2558 cur-end (point-max))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2559 (setq buffer-read-only t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2560 (move-overlay idlwave-shell-output-overlay cur-beg cur-end
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2561 (current-buffer))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2562
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2563 ;; Look for the examine buffer in all windows. If one is
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2564 ;; found in a frame all by itself, use that, otherwise, switch
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2565 ;; to or create an examine window in this frame, and resize if
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2566 ;; it's a newly created window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2567 (let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2568 (setq win (idlwave-display-buffer
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2569 "*Examine*"
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2570 nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2571 (let ((list winlist) thiswin)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2572 (catch 'exit
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2573 (save-selected-window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2574 (while (setq thiswin (pop list))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2575 (select-window thiswin)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2576 (if (one-window-p)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2577 (throw 'exit (window-frame thiswin)))))))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2578 (set-window-start win (point-min)) ; Ensure the point is visible.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2579 (save-selected-window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2580 (select-window win)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2581 (let ((elt (assoc win idlwave-shell-examine-window-alist)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2582 (when (and (not (one-window-p))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2583 (or (not (memq win winlist)) ;a newly created window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2584 (eq (window-height) (cdr elt))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2585 ;; Autosize it.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2586 (enlarge-window (- (/ (frame-height) 2)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2587 (window-height)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2588 (shrink-window-if-larger-than-buffer)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2589 ;; Clean the window list of dead windows
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2590 (setq idlwave-shell-examine-window-alist
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2591 (delq nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2592 (mapcar (lambda (x) (if (window-live-p (car x)) x))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2593 idlwave-shell-examine-window-alist)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2594 ;; And add the new value.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2595 (if (setq elt (assoc win idlwave-shell-examine-window-alist))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2596 (setcdr elt (window-height))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2597 (add-to-list 'idlwave-shell-examine-window-alist
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2598 (cons win (window-height)))))))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2599 ;; Recenter for maximum output, after widened
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2600 (save-selected-window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2601 (select-window win)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2602 (goto-char (point-max))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2603 (skip-chars-backward "\n")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2604 (recenter -1)))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2605
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2606 (defvar idlwave-shell-examine-map (make-sparse-keymap))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2607 (define-key idlwave-shell-examine-map "q" 'idlwave-shell-examine-display-quit)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2608 (define-key idlwave-shell-examine-map "c" 'idlwave-shell-examine-display-clear)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2609
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2610 (defun idlwave-shell-examine-display-quit ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2611 (interactive)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2612 (let ((win (selected-window)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2613 (if (one-window-p)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2614 (delete-frame (window-frame win))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2615 (delete-window win))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2616
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2617 (defun idlwave-shell-examine-display-clear ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2618 (interactive)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2619 (save-excursion
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2620 (let ((buf (get-buffer "*Examine*")))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2621 (when (bufferp buf)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2622 (set-buffer buf)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2623 (setq buffer-read-only nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2624 (erase-buffer)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2625 (setq buffer-read-only t)))))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2626
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2627 (defun idlwave-retrieve-expression-from-level (expr level routine help)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2628 "Return IDL command to print the expression EXPR from stack level LEVEL.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2629
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2630 It does not seem possible to evaluate an expression on a differnt
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2631 level than the current. Therefore, this function retrieves *copies* of
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2632 the variables involved in the expression from the desired level in the
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2633 calling stack. The copies are given some unlikely names on the
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2634 *current* level, and the expression is then evaluated on the *current*
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2635 level.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2636
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2637 Since this function depends upon the undocumented IDL routine routine_names,
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2638 there is no guarantee that this will work with future versions of IDL."
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2639 (let ((prefix "___") ;; No real variables should starts with this.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2640 (fetch (- 0 level))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2641 (start 0)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2642 var tvar fetch-vars pre post)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2643
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2644 ;; FIXME: In the following we try to find the variables in expression
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2645 ;; This is quite empirical - I don't know in what situations this will
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2646 ;; break. We will look for identifiers and exclude cases where we
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2647 ;; know it is not a variable. To distinguish array references from
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2648 ;; function calls, we require that arrays use [] instead of ()
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2649
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2650 (while (string-match
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2651 "\\(\\`\\|[^a-zA-Z0-9$_]\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([^a-zA-Z0-9$_]\\|\\'\\)" expr start)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2652 (setq var (match-string 2 expr)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2653 tvar (concat prefix var)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2654 start (match-beginning 2)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2655 pre (substring expr 0 (match-beginning 2))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2656 post (substring expr (match-end 2)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2657 (cond
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2658 ;; Exclude identifiers which are not variables
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2659 ((string-match ",[ \t]*/\\'" pre)) ;; a `/' KEYWORD
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2660 ((and (string-match "[,(][ \t]*\\'" pre)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2661 (string-match "\\`[ \t]*=" post))) ;; a `=' KEYWORD
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2662 ((string-match "\\`(" post)) ;; a function
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2663 ((string-match "->[ \t]*\\'" pre)) ;; a method
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2664 ((string-match "\\.\\'" pre)) ;; structure member
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2665 (t ;; seems to be a variable - arrange to get it and replace
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2666 ;; its name in the expression with the temproary name.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2667 (push (cons var tvar) fetch-vars)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2668 (setq expr (concat pre tvar post))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2669 (if (= start 0) (setq start 1)))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2670 ;; Make a command line that first copies the relevant variables
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2671 ;; and then prints the expression.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2672 (concat
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2673 (mapconcat
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2674 (lambda (x)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2675 (format "%s = routine_names('%s',fetch=%d)" (cdr x) (car x) fetch))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2676 (nreverse fetch-vars)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2677 " & ")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2678 "\n"
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2679 (idlwave-shell-help-statement help expr)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2680 (format " ; [-%d:%s]" level routine))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2681
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2682 (defun idlwave-shell-help-statement (help expr)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2683 "Construct a help statement for printing expression EXPR.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2684
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2685 HELP can be non-nil for `help,', nil for 'print,' or any string into which
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2686 to insert expression in place of the marker ___, e.g.: print,
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2687 size(___,/DIMENSIONS)"
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2688 (cond
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2689 ((null help) (concat "print, " expr))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2690 ((stringp help)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2691 (if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2692 (concat (substring help 0 (match-beginning 2))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2693 expr
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2694 (substring help (match-end 2)))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2695 (t (concat "help, " expr))))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2696
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2697
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2698 (defun idlwave-shell-examine-highlight ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2699 "Highlight the most recent IDL output."
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2700 (let* ((buffer (get-buffer (idlwave-shell-buffer)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2701 (process (get-buffer-process buffer))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2702 (process-mark (if process (process-mark process)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2703 output-begin output-end)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2704 (save-excursion
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2705 (set-buffer buffer)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2706 (goto-char process-mark)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2707 (beginning-of-line)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2708 (setq output-end (point))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2709 (re-search-backward idlwave-shell-prompt-pattern nil t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2710 (beginning-of-line 2)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2711 (setq output-begin (point)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2712
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2713 ;; First make sure the shell window is visible
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2714 (idlwave-display-buffer (idlwave-shell-buffer)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2715 nil (idlwave-shell-shell-frame))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2716 (if (and idlwave-shell-output-overlay process-mark)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2717 (move-overlay idlwave-shell-output-overlay
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2718 output-begin output-end buffer))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2719
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2720 (defun idlwave-shell-delete-output-overlay ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2721 (if (eq this-command 'idlwave-shell-mouse-nop)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2722 nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2723 (condition-case nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2724 (if idlwave-shell-output-overlay
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2725 (delete-overlay idlwave-shell-output-overlay))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2726 (error nil))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2727 (remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2728
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2729 (defun idlwave-shell-delete-expression-overlay ()
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2730 (if (eq this-command 'idlwave-shell-mouse-nop)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2731 nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2732 (condition-case nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2733 (if idlwave-shell-expression-overlay
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2734 (delete-overlay idlwave-shell-expression-overlay))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2735 (error nil))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2736 (remove-hook 'pre-command-hook 'idlwave-shell-delete-expression-overlay)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2737
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2738 (defvar idlwave-shell-bp-alist nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2739 "Alist of breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2740 A breakpoint is a cons cell \(\(file line\) . \(\(index module\) data\)\)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2741
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2742 The car is the frame for the breakpoint:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2743 file - full path file name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2744 line - line number of breakpoint - integer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2745
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2746 The first element of the cdr is a list of internal IDL data:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2747 index - the index number of the breakpoint internal to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2748 module - the module for breakpoint internal to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2749
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2750 Remaining elements of the cdr:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2751 data - Data associated with the breakpoint by idlwave-shell currently
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2752 contains two items:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2753
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2754 count - number of times to execute breakpoint. When count reaches 0
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2755 the breakpoint is cleared and removed from the alist.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2756 command - command to execute when breakpoint is reached, either a
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2757 lisp function to be called with `funcall' with no arguments or a
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2758 list to be evaluated with `eval'.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2759
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2760 (defun idlwave-shell-run-region (beg end &optional n)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2761 "Compile and run the region using the IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2762 Copies the region to a temporary file `idlwave-shell-temp-pro-file'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2763 and issues the IDL .run command for the file. Because the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2764 region is compiled and run as a main program there is no
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2765 problem with begin-end blocks extending over multiple
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2766 lines - which would be a problem if `idlwave-shell-evaluate-region'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2767 was used. An END statement is appended to the region if necessary.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2768
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2769 If there is a prefix argument, display IDL process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2770 (interactive "r\nP")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2771 (let ((oldbuf (current-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2772 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2773 (set-buffer (idlwave-find-file-noselect
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2774 (idlwave-shell-temp-file 'pro) 'tmp))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2775 (set (make-local-variable 'comment-start-skip) ";+[ \t]*")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2776 (set (make-local-variable 'comment-start) ";")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2777 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2778 (insert-buffer-substring oldbuf beg end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2779 (if (not (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2780 (idlwave-previous-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2781 (idlwave-look-at "\\<end\\>")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2782 (insert "\nend\n"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2783 (save-buffer 0)))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2784 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2785 nil (idlwave-shell-hide-p 'run))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2786 (if n
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2787 (idlwave-display-buffer (idlwave-shell-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2788 nil (idlwave-shell-shell-frame))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2789
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2790 (defun idlwave-shell-evaluate-region (beg end &optional n)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2791 "Send region to the IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2792 If there is a prefix argument, display IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2793 Does not work for a region with multiline blocks - use
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2794 `idlwave-shell-run-region' for this."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2795 (interactive "r\nP")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2796 (idlwave-shell-send-command (buffer-substring beg end))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2797 (if n
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2798 (idlwave-display-buffer (idlwave-shell-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2799 nil (idlwave-shell-shell-frame))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2800
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2801 (defun idlwave-shell-delete-temp-files ()
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2802 "Delete the temporary files and kill associated buffers."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2803 (if (stringp idlwave-shell-temp-pro-file)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2804 (condition-case nil
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2805 (let ((buf (idlwave-get-buffer-visiting
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2806 idlwave-shell-temp-pro-file)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2807 (if (buffer-live-p buf)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2808 (kill-buffer buf))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2809 (delete-file idlwave-shell-temp-pro-file))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2810 (error nil)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2811 (if (stringp idlwave-shell-temp-rinfo-save-file)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2812 (condition-case nil
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2813 (delete-file idlwave-shell-temp-rinfo-save-file)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2814 (error nil))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2815
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2816 (defun idlwave-display-buffer (buf not-this-window-p &optional frame)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2817 (if (featurep 'xemacs)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2818 ;; The XEmacs version enforces the frame
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2819 (display-buffer buf not-this-window-p frame)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2820 ;; For Emacs, we need to force the frame ourselves.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2821 (let ((this-frame (selected-frame)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2822 (if (frame-live-p frame)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2823 (select-frame frame))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2824 (if (eq this-frame (selected-frame))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2825 ;; same frame: use display buffer, to make sure the current
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2826 ;; window stays.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2827 (display-buffer buf)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2828 ;; different frame
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2829 (if (one-window-p)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2830 ;; only window: switch
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2831 (progn
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2832 (switch-to-buffer buf)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2833 (selected-window)) ; must return the window.
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2834 ;; several windows - use display-buffer
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2835 (display-buffer buf not-this-window-p))))))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2836 ; (if (not (frame-live-p frame)) (setq frame nil))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2837 ; (display-buffer buf not-this-window-p frame))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2838
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2839 (defvar idlwave-shell-bp-buffer " *idlwave-shell-bp*"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2840 "Scratch buffer for parsing IDL breakpoint lists and other stuff.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2841
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2842 (defun idlwave-shell-bp-query ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2843 "Reconcile idlwave-shell's breakpoint list with IDL's.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2844 Queries IDL using the string in `idlwave-shell-bp-query'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2845 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2846 (idlwave-shell-send-command idlwave-shell-bp-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2847 'idlwave-shell-filter-bp
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2848 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2849
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2850 (defun idlwave-shell-bp-get (bp &optional item)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2851 "Get a value for a breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2852 BP has the form of elements in idlwave-shell-bp-alist.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2853 Optional second arg ITEM is the particular value to retrieve.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2854 ITEM can be 'file, 'line, 'index, 'module, 'count, 'cmd, or 'data.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2855 'data returns a list of 'count and 'cmd.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2856 Defaults to 'index."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2857 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2858 ;; Frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2859 ((eq item 'line) (nth 1 (car bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2860 ((eq item 'file) (nth 0 (car bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2861 ;; idlwave-shell breakpoint data
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2862 ((eq item 'data) (cdr (cdr bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2863 ((eq item 'count) (nth 0 (cdr (cdr bp))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2864 ((eq item 'cmd) (nth 1 (cdr (cdr bp))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2865 ((eq item 'condition) (nth 2 (cdr (cdr bp))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2866 ;; IDL breakpoint info
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2867 ((eq item 'module) (nth 1 (car (cdr bp))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2868 ;; index - default
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2869 (t (nth 0 (car (cdr bp))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2870
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2871 (defun idlwave-shell-filter-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2872 "Get the breakpoints from `idlwave-shell-command-output'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2873 Create `idlwave-shell-bp-alist' updating breakpoint count and command data
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2874 from previous breakpoint list."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2875 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2876 (set-buffer (get-buffer-create idlwave-shell-bp-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2877 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2878 (insert idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2879 (goto-char (point-min))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2880 (let ((old-bp-alist idlwave-shell-bp-alist)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2881 ;; Searching the breakpoints
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2882 ;; In IDL 5.5, the breakpoint reporting format changed.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2883 (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2884 (bp-re55 "^\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\(Uncompiled\\|Func=\\|Pro=\\)\\([a-zA-Z][a-zA-Z0-9$_:]*\\)\\(,[^\n]*\n\\)?\\s-+\\(\\S-+\\)")
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2885 file line index module
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2886 bp-re indmap)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2887 (setq idlwave-shell-bp-alist (list nil))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2888 ;; Search for either header type, and set the correct regexp
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2889 (when (or
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2890 (if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2891 (setq bp-re bp-re54 ; versions <= 5.4
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2892 indmap '(1 2 3 4)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2893 (if (re-search-forward
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2894 "^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2895 (setq bp-re bp-re55 ; versions >= 5.5
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2896 indmap '(1 4 2 6))))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2897 ;; There seems to be a breakpoint listing here.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2898 ;; Parse breakpoint lines.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2899 ;; Breakpoints have the form
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2900 ;; for IDL<=v5.4:
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2901 ;; Index Module Line File
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2902 ;; All separated by whitespace.
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2903 ;; Module may be missing if the file is not compiled.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2904 ;; for IDL>=v5.5:
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2905 ;; Index Line Attributes File
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2906 ;; (attributes replaces module, "Uncompiled" included)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2907 (while (re-search-forward bp-re nil t)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2908 (setq index (match-string (nth 0 indmap))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2909 module (match-string (nth 1 indmap))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2910 line (string-to-int (match-string (nth 2 indmap)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2911 file (idlwave-shell-file-name (match-string (nth 3 indmap))))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2912 ;; Add the breakpoint info to the list
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2913 (nconc idlwave-shell-bp-alist
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2914 (list (cons (list file line)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2915 (list
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2916 (list index module)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2917 ;; idlwave-shell data: count, command
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2918 nil nil))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2919 (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2920 ;; Update count, commands of breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2921 (mapcar 'idlwave-shell-update-bp old-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2922 ;; Update the breakpoint overlays
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2923 (idlwave-shell-update-bp-overlays)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2924 ;; Return the new list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2925 idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2926
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2927 (defun idlwave-shell-update-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2928 "Update BP data in breakpoint list.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2929 If BP frame is in `idlwave-shell-bp-alist' updates the breakpoint data."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2930 (let ((match (assoc (car bp) idlwave-shell-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2931 (if match (setcdr (cdr match) (cdr (cdr bp))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2932
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2933 (defun idlwave-shell-set-bp-data (bp data)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2934 "Set the data of BP to DATA."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2935 (setcdr (cdr bp) data))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2936
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2937 (defun idlwave-shell-bp (frame &optional data module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2938 "Create a breakpoint structure containing FRAME and DATA. Second
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2939 and third args, DATA and MODULE, are optional. Returns a breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2940 of the format used in `idlwave-shell-bp-alist'. Can be used in commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2941 attempting match a breakpoint in `idlwave-shell-bp-alist'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2942 (cons frame (cons (list nil module) data)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2943
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2944 (defvar idlwave-shell-old-bp nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2945 "List of breakpoints previous to setting a new breakpoint.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2946
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2947 (defun idlwave-shell-sources-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2948 "Check `idlwave-shell-sources-alist' for source of breakpoint using BP.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2949 If an equivalency is found, return the IDL internal source name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2950 Otherwise return the filename in bp."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2951 (let*
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2952 ((bp-file (idlwave-shell-bp-get bp 'file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2953 (bp-module (idlwave-shell-bp-get bp 'module))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2954 (internal-file-list (cdr (assoc bp-module idlwave-shell-sources-alist))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2955 (if (and internal-file-list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2956 (equal bp-file (nth 0 internal-file-list)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2957 (nth 1 internal-file-list)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2958 bp-file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2959
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2960 (defun idlwave-shell-set-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2961 "Try to set a breakpoint BP.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2962
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2963 The breakpoint will be placed at the beginning of the statement on the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2964 line specified by BP or at the next IDL statement if that line is not
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2965 a statement.
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2966 Determines IDL's internal representation for the breakpoint which may
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2967 have occurred at a different line then used with the breakpoint
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2968 command."
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2969
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2970 ;; Get and save the old breakpoints
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2971 (idlwave-shell-send-command
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2972 idlwave-shell-bp-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2973 '(progn
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2974 (idlwave-shell-filter-bp)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2975 (setq idlwave-shell-old-bp idlwave-shell-bp-alist))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2976 'hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2977 ;; Get sources for IDL compiled procedures followed by setting
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2978 ;; breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2979 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2980 idlwave-shell-sources-query
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2981 `(progn
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2982 (idlwave-shell-sources-filter)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2983 (idlwave-shell-set-bp2 (quote ,bp)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2984 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2985
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2986 (defun idlwave-shell-set-bp2 (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2987 "Use results of breakpoint and sources query to set bp.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2988 Use the count argument with IDLs breakpoint command.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2989 We treat a count of 1 as a temporary breakpoint.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2990 Counts greater than 1 use the IDL AFTER=count keyword to break
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2991 only after reaching the statement count times."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2992 (let*
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2993 ((arg (idlwave-shell-bp-get bp 'count))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2994 (key (cond
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2995 ((not (and arg (numberp arg))) "")
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2996 ((= arg 1)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2997 ",/once")
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2998 ((> arg 1)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2999 (format ",after=%d" arg))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3000 (condition (idlwave-shell-bp-get bp 'condition))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3001 (key (concat key
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3002 (if condition (concat ",CONDITION=\"" condition "\""))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3003 (line (idlwave-shell-bp-get bp 'line)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3004 (idlwave-shell-send-command
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3005 (concat "breakpoint,'"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3006 (idlwave-shell-sources-bp bp) "',"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3007 (if (integerp line) (setq line (int-to-string line)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3008 key)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3009 ;; Check for failure and look for breakpoint in IDL's list
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
3010 `(progn
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
3011 (if (idlwave-shell-set-bp-check (quote ,bp))
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
3012 (idlwave-shell-set-bp3 (quote ,bp))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3013 ;; hide output?
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3014 (idlwave-shell-hide-p 'breakpoint)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3015 'preempt)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3016
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3017 (defun idlwave-shell-set-bp3 (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3018 "Find the breakpoint in IDL's internal list of breakpoints."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3019 (idlwave-shell-send-command idlwave-shell-bp-query
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
3020 `(progn
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
3021 (idlwave-shell-filter-bp)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
3022 (idlwave-shell-new-bp (quote ,bp)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3023 'hide
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3024 'preempt))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3025
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3026 (defun idlwave-shell-find-bp (frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3027 "Return breakpoint from `idlwave-shell-bp-alist' for frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3028 Returns nil if frame not found."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3029 (assoc frame idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3030
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3031 (defun idlwave-shell-new-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3032 "Find the new breakpoint in IDL's list and update with DATA.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3033 The actual line number for a breakpoint in IDL may be different than
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3034 the line number used with the IDL breakpoint command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3035 Looks for a new breakpoint index number in the list. This is
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3036 considered the new breakpoint if the file name of frame matches."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3037 (let ((obp-index (mapcar 'idlwave-shell-bp-get idlwave-shell-old-bp))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3038 (bpl idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3039 (while (and (member (idlwave-shell-bp-get (car bpl)) obp-index)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3040 (setq bpl (cdr bpl))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3041 (if (and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3042 (not bpl)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3043 ;; No additional breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3044 ;; Need to check if we are just replacing a breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3045 (setq bpl (assoc (car bp) idlwave-shell-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3046 (setq bpl (list bpl)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3047 (if (and bpl
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3048 (equal (idlwave-shell-bp-get (setq bpl (car bpl)) 'file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3049 (idlwave-shell-bp-get bp 'file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3050 ;; Got the breakpoint - add count, command to it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3051 ;; This updates `idlwave-shell-bp-alist' because a deep copy was
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3052 ;; not done for bpl.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3053 (idlwave-shell-set-bp-data bpl (idlwave-shell-bp-get bp 'data))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3054 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3055 (message "Failed to identify breakpoint in IDL"))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3056
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3057 (defvar idlwave-shell-bp-overlays nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3058 "List of overlays marking breakpoints")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3059
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3060 (defun idlwave-shell-update-bp-overlays ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3061 "Update the overlays which mark breakpoints in the source code.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3062 Existing overlays are recycled, in order to minimize consumption."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3063 (when idlwave-shell-mark-breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3064 (let ((bp-list idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3065 (ov-list idlwave-shell-bp-overlays)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3066 ov bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3067 ;; Delete the old overlays from their buffers
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3068 (while (setq ov (pop ov-list))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3069 (delete-overlay ov))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3070 (setq ov-list idlwave-shell-bp-overlays
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3071 idlwave-shell-bp-overlays nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3072 (while (setq bp (pop bp-list))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3073 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3074 (idlwave-shell-goto-frame (car bp))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3075 (let* ((end (progn (end-of-line 1) (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3076 (beg (progn (beginning-of-line 1) (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3077 (ov (or (pop ov-list)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3078 (idlwave-shell-make-new-bp-overlay))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3079 (move-overlay ov beg end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3080 (push ov idlwave-shell-bp-overlays)))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3081
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3082 (defvar idlwave-shell-bp-glyph)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3083 (defun idlwave-shell-make-new-bp-overlay ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3084 "Make a new overlay for highlighting breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3085 This stuff is stringly dependant upon the version of Emacs."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3086 (let ((ov (make-overlay 1 1)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3087 (if (featurep 'xemacs)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3088 ;; This is XEmacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3089 (progn
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3090 (cond
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3091 ((eq (console-type) 'tty)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3092 ;; tty's cannot display glyphs
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3093 (set-extent-property ov 'face idlwave-shell-breakpoint-face))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3094 ((and (memq idlwave-shell-mark-breakpoints '(t glyph))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3095 idlwave-shell-bp-glyph)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3096 ;; use the glyph
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3097 (set-extent-property ov 'begin-glyph idlwave-shell-bp-glyph))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3098 (idlwave-shell-mark-breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3099 ;; use the face
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3100 (set-extent-property ov 'face idlwave-shell-breakpoint-face))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3101 (t
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3102 ;; no marking
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3103 nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3104 (set-extent-priority ov -1)) ; make stop line face prevail
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3105 ;; This is Emacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3106 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3107 (window-system
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3108 (if (and (memq idlwave-shell-mark-breakpoints '(t glyph))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3109 idlwave-shell-bp-glyph) ; this var knows if glyph's possible
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3110 ;; use a glyph
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3111 (let ((string "@"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3112 (put-text-property 0 1
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3113 'display idlwave-shell-bp-glyph
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3114 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3115 (overlay-put ov 'before-string string))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3116 (overlay-put ov 'face idlwave-shell-breakpoint-face)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3117 (idlwave-shell-mark-breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3118 ;; use a face
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3119 (overlay-put ov 'face idlwave-shell-breakpoint-face))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3120 (t
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3121 ;; No marking
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3122 nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3123 ov))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3124
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3125 (defun idlwave-shell-edit-default-command-line (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3126 "Edit the current execute command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3127 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3128 (setq idlwave-shell-command-line-to-execute
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3129 (read-string "IDL> " idlwave-shell-command-line-to-execute)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3130
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3131 (defun idlwave-shell-execute-default-command-line (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3132 "Execute a command line. On first use, ask for the command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3133 Also with prefix arg, ask for the command. You can also uase the command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3134 `idlwave-shell-edit-default-command-line' to edit the line."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3135 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3136 (if (or (not idlwave-shell-command-line-to-execute)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3137 arg)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3138 (setq idlwave-shell-command-line-to-execute
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3139 (read-string "IDL> " idlwave-shell-command-line-to-execute)))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3140 (idlwave-shell-reset 'hidden)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3141 (idlwave-shell-send-command idlwave-shell-command-line-to-execute
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3142 '(idlwave-shell-redisplay 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3143
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3144 (defun idlwave-shell-save-and-run ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3145 "Save file and run it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3146 Runs `save-buffer' and sends a '.RUN' command for the associated file to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3147 When called from the shell buffer, re-run the file which was last handled by
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3148 one of the save-and-.. commands."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3149 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3150 (idlwave-shell-save-and-action 'run))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3151
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3152 (defun idlwave-shell-save-and-compile ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3153 "Save file and run it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3154 Runs `save-buffer' and sends '.COMPILE' command for the associated file to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3155 When called from the shell buffer, re-compile the file which was last handled by
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3156 one of the save-and-.. commands."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3157 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3158 (idlwave-shell-save-and-action 'compile))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3159
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3160 (defun idlwave-shell-save-and-batch ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3161 "Save file and batch it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3162 Runs `save-buffer' and sends a '@file' command for the associated file to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3163 When called from the shell buffer, re-batch the file which was last handled by
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3164 one of the save-and-.. commands."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3165 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3166 (idlwave-shell-save-and-action 'batch))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3167
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3168 (defun idlwave-shell-save-and-action (action)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3169 "Save file and compile it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3170 Runs `save-buffer' and sends a '.RUN' command for the associated file to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3171 When called from the shell buffer, re-compile the file which was last
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3172 handled by this command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3173 ;; Remove the stop overlay.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3174 (if idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3175 (delete-overlay idlwave-shell-stop-line-overlay))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3176 (setq idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3177 (setq overlay-arrow-string nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3178 (let (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3179 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3180 ((eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3181 (save-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3182 (setq idlwave-shell-last-save-and-action-file (buffer-file-name)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3183 (idlwave-shell-last-save-and-action-file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3184 (if (setq buf (idlwave-get-buffer-visiting
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3185 idlwave-shell-last-save-and-action-file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3186 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3187 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3188 (save-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3189 (t (setq idlwave-shell-last-save-and-action-file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3190 (read-file-name "File: ")))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3191 (if (file-regular-p idlwave-shell-last-save-and-action-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3192 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3193 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3194 (concat (cond ((eq action 'run) ".run ")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3195 ((eq action 'compile) ".compile ")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3196 ((eq action 'batch) "@")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3197 (t (error "Unknown action %s" action)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3198 idlwave-shell-last-save-and-action-file)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3199 'idlwave-shell-maybe-update-routine-info
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3200 (idlwave-shell-hide-p 'run))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3201 (idlwave-shell-bp-query))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3202 (let ((msg (format "No such file %s"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3203 idlwave-shell-last-save-and-action-file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3204 (setq idlwave-shell-last-save-and-action-file nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3205 (error msg))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3206
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3207 (defun idlwave-shell-maybe-update-routine-info (&optional wait)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3208 "Update the routine info if the shell is not stopped at an error."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3209 (if (and (not idlwave-shell-is-stopped)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3210 (or (eq t idlwave-auto-routine-info-updates)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3211 (memq 'compile-buffer idlwave-auto-routine-info-updates))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3212 idlwave-query-shell-for-routine-info
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3213 idlwave-routines)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3214 (idlwave-shell-update-routine-info t nil 'wait)))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3215
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3216 (defvar idlwave-shell-sources-query "help,/source,/full"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3217 "IDL command to obtain source files for compiled procedures.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3218
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3219 (defvar idlwave-shell-sources-alist nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3220 "Alist of IDL procedure names and compiled source files.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3221 Elements of the alist have the form:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3222
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3223 (module name . (source-file-truename idlwave-internal-filename)).")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3224
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3225 (defun idlwave-shell-sources-query ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3226 "Determine source files for IDL compiled procedures.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3227 Queries IDL using the string in `idlwave-shell-sources-query'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3228 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3229 (idlwave-shell-send-command idlwave-shell-sources-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3230 'idlwave-shell-sources-filter
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3231 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3232
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3233 (defun idlwave-shell-sources-filter ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3234 "Get source files from `idlwave-shell-sources-query' output.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3235 Create `idlwave-shell-sources-alist' consisting of
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3236 list elements of the form:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3237 (module name . (source-file-truename idlwave-internal-filename))."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3238 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3239 (set-buffer (get-buffer-create idlwave-shell-bp-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3240 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3241 (insert idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3242 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3243 (let (cpro cfun)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3244 (if (re-search-forward "Compiled Procedures:" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3245 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3246 (forward-line) ; Skip $MAIN$
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3247 (setq cpro (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3248 (if (re-search-forward "Compiled Functions:" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3249 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3250 (setq cfun (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3251 (setq idlwave-shell-sources-alist
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3252 (append
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3253 ;; compiled procedures
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3254 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3255 (beginning-of-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3256 (narrow-to-region cpro (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3257 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3258 (idlwave-shell-sources-grep))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3259 ;; compiled functions
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3260 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3261 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3262 (goto-char cfun)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3263 (idlwave-shell-sources-grep)))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3264
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3265 (defun idlwave-shell-sources-grep ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3266 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3267 (let ((al (list nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3268 (while (and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3269 (not (progn (forward-line) (eobp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3270 (re-search-forward
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3271 "\\s-*\\(\\S-+\\)\\s-+\\(\\S-+\\)" nil t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3272 (nconc al
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3273 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3274 (cons
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3275 (buffer-substring ; name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3276 (match-beginning 1) (match-end 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3277 (let ((internal-filename
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3278 (buffer-substring ; source
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3279 (match-beginning 2) (match-end 2))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3280 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3281 (idlwave-shell-file-name internal-filename)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3282 internal-filename))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3283 ))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3284 (cdr al))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3285
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3286 (defun idlwave-shell-clear-all-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3287 "Remove all breakpoints in IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3288 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3289 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3290 idlwave-shell-bp-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3291 '(progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3292 (idlwave-shell-filter-bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3293 (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3294 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3295
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3296 (defun idlwave-shell-list-all-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3297 "List all breakpoints in IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3298 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3299 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3300 idlwave-shell-bp-query))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3301
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3302 (defvar idlwave-shell-error-last 0
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3303 "Position of last syntax error in `idlwave-shell-error-buffer'.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3304
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3305 (defun idlwave-shell-goto-next-error ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3306 "Move point to next IDL syntax error."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3307 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3308 (let (frame col)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3309 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3310 (set-buffer idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3311 (goto-char idlwave-shell-error-last)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3312 (if (or (re-search-forward idlwave-shell-syntax-error nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3313 (re-search-forward idlwave-shell-other-error nil t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3314 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3315 (setq frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3316 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3317 (save-match-data
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3318 (idlwave-shell-file-name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3319 (buffer-substring (match-beginning 1) (match-end 1))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3320 (string-to-int
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3321 (buffer-substring (match-beginning 2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3322 (match-end 2)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3323 ;; Try to find the column of the error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3324 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3325 (setq col
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3326 (if (re-search-backward "\\^" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3327 (current-column)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3328 0)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3329 (setq idlwave-shell-error-last (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3330 (if frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3331 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3332 (idlwave-shell-display-line frame col))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3333 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3334 (message "No more errors."))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3335
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3336 (defun idlwave-shell-file-name (name)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3337 "If `idlwave-shell-use-truename' is non-nil, convert file name to true name.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3338 Otherwise, just expand the file name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3339 (let ((def-dir (if (eq major-mode 'idlwave-shell-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3340 default-directory
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3341 idlwave-shell-default-directory)))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3342 (if idlwave-shell-use-truename
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3343 (file-truename name def-dir)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3344 (expand-file-name name def-dir))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3345
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3346 ;; Keybindings --------------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3347
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3348 (defvar idlwave-shell-mode-map (copy-keymap comint-mode-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3349 "Keymap for idlwave-mode.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3350 (defvar idlwave-shell-mode-prefix-map (make-sparse-keymap))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3351 (fset 'idlwave-shell-mode-prefix-map idlwave-shell-mode-prefix-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3352
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3353 ;(define-key idlwave-shell-mode-map "\M-?" 'comint-dynamic-list-completions)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3354 ;(define-key idlwave-shell-mode-map "\t" 'comint-dynamic-complete)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3355 (define-key idlwave-shell-mode-map "\t" 'idlwave-shell-complete)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3356 (define-key idlwave-shell-mode-map "\M-\t" 'idlwave-shell-complete)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3357 (define-key idlwave-shell-mode-map "\C-c\C-s" 'idlwave-shell)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3358 (define-key idlwave-shell-mode-map "\C-c?" 'idlwave-routine-info)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3359 (define-key idlwave-shell-mode-map "\C-g" 'idlwave-keyboard-quit)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3360 (define-key idlwave-shell-mode-map "\M-?" 'idlwave-context-help)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3361 (define-key idlwave-shell-mode-map [(control meta ?\?)] 'idlwave-online-help)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3362 (define-key idlwave-shell-mode-map "\C-c\C-i" 'idlwave-update-routine-info)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3363 (define-key idlwave-shell-mode-map "\C-c\C-y" 'idlwave-shell-char-mode-loop)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3364 (define-key idlwave-shell-mode-map "\C-c\C-x" 'idlwave-shell-send-char)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3365 (define-key idlwave-shell-mode-map "\C-c=" 'idlwave-resolve)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3366 (define-key idlwave-shell-mode-map "\C-c\C-v" 'idlwave-find-module)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3367 (define-key idlwave-shell-mode-map "\C-c\C-k" 'idlwave-kill-autoloaded-buffers)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3368 (define-key idlwave-shell-mode-map idlwave-shell-prefix-key
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3369 'idlwave-shell-debug-map)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3370 (define-key idlwave-shell-mode-map [(up)] 'idlwave-shell-up-or-history)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3371 (define-key idlwave-shell-mode-map [(down)] 'idlwave-shell-down-or-history)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3372 (define-key idlwave-mode-map "\C-c\C-y" 'idlwave-shell-char-mode-loop)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3373 (define-key idlwave-mode-map "\C-c\C-x" 'idlwave-shell-send-char)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3374
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3375 ;; The mouse bindings for PRINT and HELP
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3376 (idlwave-shell-define-key-both
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3377 (if (featurep 'xemacs)
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3378 [(shift button2)]
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3379 [(shift down-mouse-2)])
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3380 'idlwave-shell-mouse-print)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3381 (idlwave-shell-define-key-both
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3382 (if (featurep 'xemacs)
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3383 [(control meta button2)]
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3384 [(control meta down-mouse-2)])
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3385 'idlwave-shell-mouse-help)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3386 (idlwave-shell-define-key-both
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3387 (if (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3388 [(control shift button2)]
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3389 [(control shift down-mouse-2)])
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3390 'idlwave-shell-examine-select)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3391 ;; Add this one from the idlwave-mode-map
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3392 (define-key idlwave-shell-mode-map
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3393 (if (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3394 [(shift button3)]
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3395 [(shift mouse-3)])
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3396 'idlwave-mouse-context-help)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3397
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3398 ;; For Emacs, we need to turn off the button release events.
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3399 (defun idlwave-shell-mouse-nop (event)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3400 (interactive "e"))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3401 (unless (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3402 (idlwave-shell-define-key-both
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3403 [(shift mouse-2)] 'idlwave-shell-mouse-nop)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3404 (idlwave-shell-define-key-both
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3405 [(shift control mouse-2)] 'idlwave-shell-mouse-nop)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3406 (idlwave-shell-define-key-both
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3407 [(control meta mouse-2)] 'idlwave-shell-mouse-nop))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3408
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3409
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3410 ;; The following set of bindings is used to bind the debugging keys.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3411 ;; If `idlwave-shell-activate-prefix-keybindings' is non-nil, the first key
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3412 ;; in the list gets bound the C-c C-d prefix map.
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3413 ;; If `idlwave-shell-debug-modifiers' is non-nil, the second key
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3414 ;; in the list gets bound with the specified modifiers in both
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3415 ;; `idlwave-mode-map' and `idlwave-shell-mode-map'.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3416
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3417 ;; Used keys: abcdef hi klmnopqrs u wxyz
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3418 ;; Unused keys: g j t v
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3419 (let* ((specs
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3420 '(([(control ?b)] ?b idlwave-shell-break-here)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3421 ([(control ?i)] ?i idlwave-shell-break-in)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3422 ([(control ?d)] ?d idlwave-shell-clear-current-bp)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3423 ([(control ?a)] ?a idlwave-shell-clear-all-bp)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3424 ([(control ?s)] ?s idlwave-shell-step)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3425 ([(control ?n)] ?n idlwave-shell-stepover)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3426 ([(control ?k)] ?k idlwave-shell-skip)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3427 ([(control ?u)] ?u idlwave-shell-up)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3428 ([(control ?o)] ?o idlwave-shell-out)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3429 ([(control ?m)] ?m idlwave-shell-return)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3430 ([(control ?h)] ?h idlwave-shell-to-here)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3431 ([(control ?r)] ?r idlwave-shell-cont)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3432 ([(control ?y)] ?y idlwave-shell-execute-default-command-line)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3433 ([(control ?z)] ?z idlwave-shell-reset)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3434 ([(control ?q)] ?q idlwave-shell-quit)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3435 ([(control ?p)] ?p idlwave-shell-print)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3436 ([(??)] ?? idlwave-shell-help-expression)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3437 ([(control ?c)] ?c idlwave-shell-save-and-run)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3438 ([( ?@)] ?@ idlwave-shell-save-and-batch)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3439 ([(control ?x)] ?x idlwave-shell-goto-next-error)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3440 ([(control ?e)] ?e idlwave-shell-run-region)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3441 ([(control ?w)] ?w idlwave-shell-resync-dirs)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3442 ([(control ?l)] ?l idlwave-shell-redisplay)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3443 ([(control ?t)] ?t idlwave-shell-toggle-toolbar)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3444 ([(control up)] up idlwave-shell-stack-up)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3445 ([(control down)] down idlwave-shell-stack-down)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3446 ([(control ?f)] ?f idlwave-shell-window)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3447 (mod (cond ((and idlwave-shell-debug-modifiers
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3448 (listp idlwave-shell-debug-modifiers)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3449 (not (equal '() idlwave-shell-debug-modifiers)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3450 idlwave-shell-debug-modifiers)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3451 (idlwave-shell-activate-alt-keybindings
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3452 '(alt))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3453 (shift (memq 'shift mod))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3454 (mod-noshift (delete 'shift (copy-sequence mod)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3455 s k1 c2 k2 cmd)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3456 (while (setq s (pop specs))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3457 (setq k1 (nth 0 s)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3458 c2 (nth 1 s)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3459 cmd (nth 2 s))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3460 (when idlwave-shell-activate-prefix-keybindings
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3461 (and k1 (define-key idlwave-shell-mode-prefix-map k1 cmd)))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3462 (when (and mod window-system)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3463 (if (char-or-string-p c2)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3464 (setq k2 (vector (append mod-noshift
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3465 (list (if shift (upcase c2) c2)))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3466 (setq k2 (vector (append mod (list c2)))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3467 (define-key idlwave-mode-map k2 cmd)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3468 (define-key idlwave-shell-mode-map k2 cmd))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3469
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3470 ;; Enter the prefix map at the two places.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3471 (fset 'idlwave-debug-map idlwave-shell-mode-prefix-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3472 (fset 'idlwave-shell-debug-map idlwave-shell-mode-prefix-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3473
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3474 ;; The Menus --------------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3475
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3476 (defvar idlwave-shell-menu-def
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3477 '("Debug"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3478 ["Save and .RUN" idlwave-shell-save-and-run
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3479 (or (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3480 idlwave-shell-last-save-and-action-file)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3481 ["Save and .COMPILE" idlwave-shell-save-and-compile
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3482 (or (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3483 idlwave-shell-last-save-and-action-file)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3484 ["Save and @Batch" idlwave-shell-save-and-batch
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3485 (or (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3486 idlwave-shell-last-save-and-action-file)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3487 ["Goto Next Error" idlwave-shell-goto-next-error t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3488 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3489 ["Execute Default Cmd" idlwave-shell-execute-default-command-line t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3490 ["Edit Default Cmd" idlwave-shell-edit-default-command-line t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3491 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3492 ["Set Breakpoint" idlwave-shell-break-here
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3493 (eq major-mode 'idlwave-mode)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3494 ["Break in Module" idlwave-shell-break-in t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3495 ["Clear Breakpoint" idlwave-shell-clear-current-bp t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3496 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3497 ["List All Breakpoints" idlwave-shell-list-all-bp t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3498 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3499 ["Step (into)" idlwave-shell-step t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3500 ["Step (over)" idlwave-shell-stepover t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3501 ["Skip One Statement" idlwave-shell-skip t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3502 ["Continue" idlwave-shell-cont t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3503 ("Continue to"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3504 ["End of Block" idlwave-shell-up t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3505 ["End of Subprog" idlwave-shell-return t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3506 ["End of Subprog+1" idlwave-shell-out t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3507 ["Here (Cursor Line)" idlwave-shell-to-here
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3508 (eq major-mode 'idlwave-mode)])
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3509 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3510 ["Print expression" idlwave-shell-print t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3511 ["Help on expression" idlwave-shell-help-expression t]
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3512 ["Evaluate Region" idlwave-shell-evaluate-region
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3513 (eq major-mode 'idlwave-mode)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3514 ["Run Region" idlwave-shell-run-region (eq major-mode 'idlwave-mode)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3515 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3516 ["Redisplay" idlwave-shell-redisplay t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3517 ["Stack Up" idlwave-shell-stack-up t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3518 ["Stack Down" idlwave-shell-stack-down t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3519 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3520 ["Update Working Dir" idlwave-shell-resync-dirs t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3521 ["Reset IDL" idlwave-shell-reset t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3522 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3523 ["Toggle Toolbar" idlwave-shell-toggle-toolbar t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3524 ["Exit IDL" idlwave-shell-quit t]))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3525
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3526 (setq idlwave-shell-menu-def
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3527 '("Debug"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3528 ("Compile & Run"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3529 ["Save and .RUN" idlwave-shell-save-and-run
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3530 (or (eq major-mode 'idlwave-mode)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3531 idlwave-shell-last-save-and-action-file)]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3532 ["Save and .COMPILE" idlwave-shell-save-and-compile
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3533 (or (eq major-mode 'idlwave-mode)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3534 idlwave-shell-last-save-and-action-file)]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3535 ["Save and @Batch" idlwave-shell-save-and-batch
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3536 (or (eq major-mode 'idlwave-mode)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3537 idlwave-shell-last-save-and-action-file)]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3538 ["Goto Next Error" idlwave-shell-goto-next-error t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3539 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3540 ["Run Region" idlwave-shell-run-region (eq major-mode 'idlwave-mode)]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3541 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3542 ["Execute Default Cmd" idlwave-shell-execute-default-command-line t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3543 ["Edit Default Cmd" idlwave-shell-edit-default-command-line t])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3544 ("Breakpoints"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3545 ["Set Breakpoint" idlwave-shell-break-here
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3546 (eq major-mode 'idlwave-mode)]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3547 ["Break in Module" idlwave-shell-break-in t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3548 ["Clear Breakpoint" idlwave-shell-clear-current-bp t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3549 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3550 ["List All Breakpoints" idlwave-shell-list-all-bp t])
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
3551 ("Continue/Step"
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3552 ["Step (into)" idlwave-shell-step t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3553 ["Step (over)" idlwave-shell-stepover t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3554 ["Skip One Statement" idlwave-shell-skip t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3555 ["Continue" idlwave-shell-cont t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3556 ["... to End of Block" idlwave-shell-up t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3557 ["... to End of Subprog" idlwave-shell-return t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3558 ["... to End of Subprog+1" idlwave-shell-out t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3559 ["... to Here (Cursor Line)" idlwave-shell-to-here
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3560 (eq major-mode 'idlwave-mode)])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3561 ("Print Expression"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3562 ["Print expression" idlwave-shell-print t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3563 ["Help on expression" idlwave-shell-help-expression t]
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3564 ["Evaluate Region" idlwave-shell-evaluate-region
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3565 (eq major-mode 'idlwave-mode)]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3566 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3567 ["Redisplay" idlwave-shell-redisplay t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3568 ["Stack Up" idlwave-shell-stack-up t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3569 ["Stack Down" idlwave-shell-stack-down t])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3570 ("Input Mode"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3571 ["Send one char" idlwave-shell-send-char t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3572 ["Temporary Character Mode" idlwave-shell-char-mode-loop t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3573 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3574 ["Use Input Mode Magic"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3575 (setq idlwave-shell-use-input-mode-magic
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3576 (not idlwave-shell-use-input-mode-magic))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3577 :style toggle :selected idlwave-shell-use-input-mode-magic])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3578 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3579 ["Update Working Dir" idlwave-shell-resync-dirs t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3580 ["Reset IDL" idlwave-shell-reset t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3581 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3582 ["Toggle Toolbar" idlwave-shell-toggle-toolbar t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3583 ["Exit IDL" idlwave-shell-quit t]))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3584
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3585 (if (or (featurep 'easymenu) (load "easymenu" t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3586 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3587 (easy-menu-define
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3588 idlwave-shell-mode-menu idlwave-shell-mode-map "IDL shell menus"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3589 idlwave-shell-menu-def)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3590 (easy-menu-define
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3591 idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3592 idlwave-shell-menu-def)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3593 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3594 (mapcar (lambda (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3595 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3596 (if (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3597 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3598 (easy-menu-remove idlwave-mode-debug-menu)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3599 (easy-menu-add idlwave-mode-debug-menu))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3600 (buffer-list)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3601
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3602 ;; The Breakpoint Glyph -------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3603
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3604 (defvar idlwave-shell-bp-glyph nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3605 "The glyph to mark breakpoint lines in the source code.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3606
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3607 (let ((image-string "/* XPM */
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3608 static char * file[] = {
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3609 \"14 12 3 1\",
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3610 \" c None s backgroundColor\",
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3611 \". c #4B4B4B4B4B4B\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3612 \"R c #FFFF00000000\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3613 \" \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3614 \" \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3615 \" RRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3616 \" RRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3617 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3618 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3619 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3620 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3621 \" RRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3622 \" RRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3623 \" \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3624 \" \"};"))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3625
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3626 (setq idlwave-shell-bp-glyph
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3627 (cond ((and (featurep 'xemacs)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3628 (featurep 'xpm))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3629 (make-glyph image-string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3630 ((and (not (featurep 'xemacs))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3631 (fboundp 'image-type-available-p)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3632 (image-type-available-p 'xpm))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3633 (list 'image :type 'xpm :data image-string :ascent 'center))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3634 (t nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3635
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3636 (provide 'idlw-shell)
27166
b2d17f0c1668 Also provide idlwave.shell, not only idlw-shell.
Carsten Dominik <dominik@science.uva.nl>
parents: 27108
diff changeset
3637 (provide 'idlwave-shell)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3638
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3639 ;;; Load the toolbar when wanted by the user.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3640
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3641 (autoload 'idlwave-toolbar-toggle "idlw-toolbar"
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3642 "Toggle the IDLWAVE toolbar")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3643 (autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3644 "Add IDLWAVE toolbar")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3645 (defun idlwave-shell-toggle-toolbar ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3646 "Toggle the display of the debugging toolbar."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3647 (interactive)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3648 (idlwave-toolbar-toggle))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3649
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3650 (if idlwave-shell-use-toolbar
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3651 (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere))
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47915
diff changeset
3652
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47915
diff changeset
3653 ;;; arch-tag: 20c2e8ce-0709-41d8-a5b6-bb039148440a
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3654 ;;; idlw-shell.el ends here