annotate lisp/progmodes/idlw-shell.el @ 108273:de8de918fbab

Remove NEED_BSDTTY and NEED_UNISTD_H. * s/hpux10-20.h (NEED_BSDTTY): Remove. * s/aix4-2.h (NEED_UNISTD_H): Remove. * systty.h: Simplify conditionals for including <sys/bsdtty.h>, <sys/ptyio.h> and <unistd.h>.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 06 May 2010 12:46:47 -0700
parents 1d1d5d9bd884
children 280c8ae2476d 376148b31b5e
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.
75347
e3694f1cb928 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74103
diff changeset
2
104543
da8b3e61b182 Use forward-line rather than goto-line.
Glenn Morris <rgm@gnu.org>
parents: 104029
diff changeset
3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 105813
diff changeset
4 ;; 2009, 2010 Free Software Foundation, Inc.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
5
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
6 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
7 ;; Carsten Dominik <dominik@astro.uva.nl>
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
8 ;; Chris Chase <chase@att.com>
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
9 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
74103
b21beb03e5c4 (idlwave-shell-filter-directory): Handle extra newlines and spaces.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 71938
diff changeset
10 ;; Version: 6.1_em22
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
11 ;; Keywords: processes
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
12
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
13 ;; This file is part of GNU Emacs.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
14
94673
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91440
diff changeset
15 ;; GNU Emacs is free software: you can redistribute it and/or modify
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
16 ;; it under the terms of the GNU General Public License as published by
94673
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91440
diff changeset
17 ;; the Free Software Foundation, either version 3 of the License, or
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91440
diff changeset
18 ;; (at your option) any later version.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
19
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
20 ;; 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
21 ;; 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
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
23 ;; GNU General Public License for more details.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
24
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
25 ;; You should have received a copy of the GNU General Public License
94673
52b7a8c22af5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 91440
diff changeset
26 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
27
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
28 ;;; Commentary:
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
29 ;;
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
30 ;; 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
31 ;; 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
32 ;;
74103
b21beb03e5c4 (idlwave-shell-filter-directory): Handle extra newlines and spaces.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 71938
diff changeset
33 ;; Runs IDL as an inferior process of Emacs, much like the Emacs
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
34 ;; `shell' or `telnet' commands. Provides command history and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
35 ;; searching. Provides debugging commands available in buffers
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
36 ;; visiting IDL procedure files, e.g., breakpoint setting, stepping,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
37 ;; execution until a certain line, printing expressions under point,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
38 ;; visual line pointer for current execution line, etc.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
39 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
40 ;; 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
41 ;;
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
42 ;; 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
43 ;; available from:
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
44 ;; http://idlwave.org
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
45 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
46 ;; INSTALLATION:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
47 ;; =============
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
48 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
49 ;; 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
50 ;; 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
51 ;; lines to your .emacs file:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
52 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
53 ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
56 ;; SOURCE
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
59 ;; 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
60 ;; web site.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
61 ;;
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
62 ;; http://idlwave.org
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
63 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
64 ;; DOCUMENTATION
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
67 ;; IDLWAVE is documented online in info format.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
68 ;; 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
69 ;; maintainers webpage (see under SOURCE)
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
72 ;; KNOWN PROBLEMS
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
75 ;; 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
76 ;; 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
77 ;; it is a bug in XEmacs.
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
78 ;; 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
79 ;;
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
80 ;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
81 ;; CUSTOMIZATION VARIABLES
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
84 ;; 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
85 ;; 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
86 ;; `M-x idlwave-customize'.
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
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
91 ;;; Code:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
92
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
93 (require 'comint)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
94 (require 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
95
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
96 (eval-when-compile (require 'cl))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
97
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
98 (defvar idlwave-shell-have-new-custom nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
99
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
100 ;;; Customizations: idlwave-shell group
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
101
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
102 ;; General/Misc. customizations
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
103 (defgroup idlwave-shell-general-setup nil
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
104 "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
105 :prefix "idlwave-shell"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
106 :group 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
107
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
108 (defcustom idlwave-shell-prompt-pattern "^\r? ?IDL> "
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
109 "*Regexp to match IDL prompt at beginning of a line.
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
110 For example, \"^\r?IDL> \" or \"^\r?WAVE> \".
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
111 The \"^\r?\" is needed, to indicate the beginning of the line, with
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
112 optional return character (which IDL seems to output randomly).
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
113 This variable is used to initialize `comint-prompt-regexp' in the
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
114 process buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
115
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
116 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
117 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
118 :type 'regexp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
119
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
120 (defcustom idlwave-shell-process-name "idl"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
121 "*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
122 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
123 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
124 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
125
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
126 ;; (defcustom idlwave-shell-automatic-start...) See idlwave.el
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
127
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
128 (defcustom idlwave-shell-use-dedicated-window nil
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
129 "*Non-nil means, never replace the shell frame with another buffer."
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
130 :group 'idlwave-shell-general-setup
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
131 :type 'boolean)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
132
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
133 (defcustom idlwave-shell-use-dedicated-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
134 "*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
135 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
136 :type 'boolean)
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-frame-parameters
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
139 '((height . 30) (unsplittable . nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
140 "The frame parameters for a dedicated idlwave-shell frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
141 See also `idlwave-shell-use-dedicated-frame'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
142 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
143 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
144 :type '(repeat
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
145 (cons symbol sexp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
146
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
147 (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
148 "*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
149 :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
150 :type 'boolean)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
151
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
152 (defcustom idlwave-shell-arrows-do-history t
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
153 "*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
154 This variable can have 3 values:
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
155 nil Arrows just move the cursor
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
156 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
157 walk the history
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
158 '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
159 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
160 :group 'idlwave-shell-general-setup
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
161 :type '(choice
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
162 (const :tag "never" nil)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
163 (const :tag "everywhere" t)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
164 (const :tag "in command line only" cmdline)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
165
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
166 ;; 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
167
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
168 (defcustom idlwave-shell-use-toolbar t
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
169 "*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
170 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
171 Exiting the shell will removed everywhere.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
172 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
173 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
174 `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
175 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
176 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
177
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
178 (defcustom idlwave-shell-temp-pro-prefix "/tmp/idltemp"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
179 "*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
180 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
181 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
182 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
183 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
184 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
185
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
186 (defvar idlwave-shell-fix-inserted-breaks nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
187 "*OBSOLETE VARIABLE, is no longer used.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
188
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
189 The documentation of this variable used to be:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
190 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
191
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
192 (defcustom idlwave-shell-prefix-key "\C-c\C-d"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
193 "*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
194 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
195 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
196 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
197 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
198
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
199 (defcustom idlwave-shell-activate-prefix-keybindings t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
200 "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
201 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
202 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
203 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
204 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
205
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
206 (defcustom idlwave-shell-automatic-electric-debug 'breakpoint
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
207 "Enter the electric-debug minor mode automatically.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
208 This occurs at a breakpoint or any other halt. The mode is exited
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
209 upon return to the main level. Can be set to 'breakpoint to enter
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
210 electric debug mode only when breakpoints are tripped."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
211 :group 'idlwave-shell-general-setup
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
212 :type '(choice
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
213 (const :tag "never" nil)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
214 (const :tag "always" t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
215 (const :tag "for breakpoints only" breakpoint)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
216
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
217 (defcustom idlwave-shell-electric-zap-to-file t
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
218 "When entering electric debug mode, select the window displaying the
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
219 file at which point is stopped. This takes point away from the shell
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
220 window, but is useful for stepping, etc."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
221 :group 'idlwave-shell-general-setup
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
222 :type 'boolean)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
223
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
224 ;; (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
225
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
226 (defvar idlwave-shell-activate-alt-keybindings nil
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
227 "Obsolete variable. See `idlwave-shell-debug-modifiers'.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
228
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
229 (defcustom idlwave-shell-use-truename nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
230 "*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
231 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
232 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
233 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
234 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
235 reuse that buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
236 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
237 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
238 to set this option to nil."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
239 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
240 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
241
74103
b21beb03e5c4 (idlwave-shell-filter-directory): Handle extra newlines and spaces.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 71938
diff changeset
242 (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
243 "The characters allowed in file names, as a string.
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
244 Used for file name completion. Must not contain `'', `,' and `\"'
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
245 because these are used as separators by IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
246 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
247 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
248
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
249 (defcustom idlwave-shell-mode-hook '()
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
250 "*Hook for customizing `idlwave-shell-mode'."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
251 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
252 :type 'hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
253
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
254 (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
255 "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
256 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
257 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
258 :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
259 :type '(list
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
260 (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
261 (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
262
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
263
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
264 ;; 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
265 (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
266 "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
267 :prefix "idlwave-shell"
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
268 :group 'idlwave)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
269
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
270 (defcustom idlwave-shell-initial-commands "!more=0 & defsysv,'!ERROR_STATE',EXISTS=__e & if __e then begin & !ERROR_STATE.MSG_PREFIX=\"% \" & delvar,__e & endif"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
271 "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
272 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
273 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
274 :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
275 :type 'string)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
276
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
277 (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
278 "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
279 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
280 the history."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
281 :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
282 :type 'boolean)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
283
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
284 (defcustom idlwave-shell-command-history-file "idlwhist"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
285 "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
286 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
287 `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
288 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
289 is non-nil."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
290 :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
291 :type 'file)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
292
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
293 (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
294 '(run misc breakpoint)
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
295 "*A list of command types to show output from in the shell.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
296 Possibilities are 'run, 'debug, 'breakpoint, and 'misc. Unselected
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
297 types are not displayed in the shell. The type 'everything causes all
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
298 the copious shell traffic to be displayed."
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
299 :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
300 :type '(choice
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
301 (const everything)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
302 (set :tag "Checklist" :greedy t
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
303 (const :tag "All .run and .compile commands" run)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
304 (const :tag "All breakpoint commands" breakpoint)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
305 (const :tag "All debug and stepping commands" debug)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
306 (const :tag "Close, window, retall, etc. commands" misc))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
307
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
308 (defcustom idlwave-shell-max-print-length 200
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
309 "Maximum number of array elements to print when examining."
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
310 :group 'idlwave-shell-command-setup
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
311 :type 'integer)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
312
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
313 (defcustom idlwave-shell-examine-alist
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
314 `(("Print" . ,(concat "idlwave_print_safe,___,"
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
315 (number-to-string
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
316 idlwave-shell-max-print-length)))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
317 ("Help" . "help,___")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
318 ("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
319 ("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
320 ("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
321 ("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
322 ("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
323 ("Ptr Valid" . "print,ptr_valid(___)")
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
324 ("Arg Present" . "print,arg_present(___)")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
325 ("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
326 ("Widget Geometry" . "help,widget_info(___,/GEOMETRY)"))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
327 "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
328 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
329 `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
330 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
331 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
332 :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
333 :type '(repeat
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
334 (cons
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
335 (string :tag "Label ")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
336 (string :tag "Command"))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
337
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
338 (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
339 "*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
340
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
341 (defcustom idlwave-shell-separate-examine-output t
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
342 "*Non-nil means, 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
343 :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
344 :type 'boolean)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
345
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
346 (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
347 '((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
348 (comint-scroll-to-bottom-on-output . t)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
349 (comint-scroll-show-maximum-output . nil)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
350 (comint-prompt-read-only . t))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
351
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
352 "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
353 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
354 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
355 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
356 newly created."
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
357 :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
358 :type '(repeat
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
359 (cons variable sexp)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
360
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
361 (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
362 "*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
363 :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
364 :type 'boolean)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
365
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
366 (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
367 "*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
368 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
369 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
370 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
371 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
372 :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
373 :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
374
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
375 (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
376 '("^<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
377 "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
378
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
379 When the first regexp matches in the output stream of IDL, IDLWAVE
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
380 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
381 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
382
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
383 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
384 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
385 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
386 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
387 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
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 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
390 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
391 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
392
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
393 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
394 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
395 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
396
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
397 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
398 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
399 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
400 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
401 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
402 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
403
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
404 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
405 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
406 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
407
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
408 Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION',
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
409 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
410 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
411
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
412 Usage:
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
413 ======
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
414 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
415 idlwave_char_input,/on ; Start the loop to send characters
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
416 idlwave_char_input,/off ; End the loop to send characters
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
417
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
418
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
419 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
420 ;; 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
421 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
422 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
423 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
424 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
425 else print,'<onechar>'
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
426 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
427 end"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
428 :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
429 :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
430 (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
431 (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
432 (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
433
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
434 (defcustom idlwave-shell-breakpoint-popup-menu t
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
435 "*If non-nil, provide a menu on mouse-3 on breakpoint lines, and
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
436 popup help text on the line."
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
437 :group 'idlwave-shell-command-setup
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
438 :type 'boolean)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
439
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
440 (defcustom idlwave-shell-reset-no-prompt nil
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
441 "If non-nil, skip the yes/no prompt when resetting the IDL session."
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
442 :group 'idlwave-shell-command-setup
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
443 :type 'boolean)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
444
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
445 ;; Breakpoint Overlays etc
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
446 (defgroup idlwave-shell-highlighting-and-faces nil
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
447 "Highlighting and faces used by the IDLWAVE Shell mode."
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
448 :prefix "idlwave-shell"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
449 :group 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
450
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
451 (defcustom idlwave-shell-mark-stop-line t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
452 "*Non-nil means, mark the source code line where IDL is currently stopped.
60925
a9c571ede913 * progmodes/cperl-mode.el, progmodes/idlw-shell.el,
Werner LEMBERG <wl@gnu.org>
parents: 58948
diff changeset
453 Value decides about the method which is used to mark the line. Valid values
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
454 are:
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 nil Do not mark the line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
457 'arrow Use the overlay arrow
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
458 '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
459 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
460 otherwise the overlay arrow.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
461 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
462 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
463 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
464 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
465 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
466 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
467 :type '(choice
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
468 (const :tag "No marking" nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
469 (const :tag "Use overlay arrow" arrow)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
470 (const :tag "Highlight with face" face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
471 (const :tag "Face or arrow." t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
472
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
473 (defcustom idlwave-shell-overlay-arrow ">"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
474 "*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
475 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
476 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
477 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
478 See also `idlwave-shell-use-overlay-arrow'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
479 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
480 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
481
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
482 (defcustom idlwave-shell-stop-line-face 'highlight
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
483 "*The face for `idlwave-shell-stop-line-overlay'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
484 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
485 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
486 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
487 :type 'symbol)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
488
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
489 (defcustom idlwave-shell-electric-stop-color "Violet"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
490 "*The color for the default face or overlay arrow when stopped."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
491 :group 'idlwave-shell-highlighting-and-faces
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
492 :type 'string)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
493
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
494 (defcustom idlwave-shell-electric-stop-line-face
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
495 (prog1
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
496 (copy-face 'modeline 'idlwave-shell-electric-stop-line)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
497 (set-face-background 'idlwave-shell-electric-stop-line
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
498 idlwave-shell-electric-stop-color)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
499 (condition-case nil
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
500 (set-face-foreground 'idlwave-shell-electric-stop-line nil)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
501 (error nil)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
502 "*The face for `idlwave-shell-stop-line-overlay' when in electric debug mode.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
503 Allows you to choose the font, color and other properties for the line
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
504 where IDL is stopped, when in Electric Debug Mode."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
505 :group 'idlwave-shell-highlighting-and-faces
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
506 :type 'symbol)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
507
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
508 (defcustom idlwave-shell-mark-breakpoints t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
509 "*Non-nil means, mark breakpoints in the source files.
60925
a9c571ede913 * progmodes/cperl-mode.el, progmodes/idlw-shell.el,
Werner LEMBERG <wl@gnu.org>
parents: 58948
diff changeset
510 Valid values are:
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
511 nil Do not mark breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
512 'face Highlight line with `idlwave-shell-breakpoint-face'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
513 '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
514 support glyphs, will use 'face instead.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
515 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
516 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
517 :type '(choice
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
518 (const :tag "No marking" nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
519 (const :tag "Highlight with face" face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
520 (const :tag "Display glyph (red dot)" glyph)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
521 (const :tag "Glyph or face." t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
522
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
523 (defvar idlwave-shell-use-breakpoint-glyph t
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
524 "Obsolete variable. See `idlwave-shell-mark-breakpoints'.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
525
63450
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
526 (defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
527 "*The face for breakpoint lines in the source code.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
528 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
529 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
530 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
531 :type 'symbol)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
532
63450
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
533 (if (not idlwave-shell-have-new-custom)
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
534 ;; Just copy the underline face to be on the safe side.
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
535 (copy-face 'underline 'idlwave-shell-bp)
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
536 ;; We have the new customize - use it to define a customizable face
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
537 (defface idlwave-shell-bp
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
538 '((((class color)) (:foreground "Black" :background "Pink"))
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
539 (t (:underline t)))
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
540 "Face for highlighting lines with breakpoints."
64993
fb2cad4cfb30 * mh-customize.el: Do not use face-alias compatibility for
Dan Nicolaescu <dann@ics.uci.edu>
parents: 64835
diff changeset
541 :group 'idlwave-shell-highlighting-and-faces))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
542
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
543 (defcustom idlwave-shell-disabled-breakpoint-face
63450
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
544 'idlwave-shell-disabled-bp
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
545 "*The face for disabled breakpoint lines in the source code.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
546 Allows you to choose the font, color and other properties for
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
547 lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
548 :group 'idlwave-shell-highlighting-and-faces
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
549 :type 'symbol)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
550
63450
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
551 (if (not idlwave-shell-have-new-custom)
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
552 ;; Just copy the underline face to be on the safe side.
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
553 (copy-face 'underline 'idlwave-shell-disabled-bp)
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
554 ;; We have the new customize - use it to define a customizable face
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
555 (defface idlwave-shell-disabled-bp
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
556 '((((class color)) (:foreground "Black" :background "gray"))
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
557 (t (:underline t)))
87216f91a211 Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents: 63426
diff changeset
558 "Face for highlighting lines with breakpoints."
64993
fb2cad4cfb30 * mh-customize.el: Do not use face-alias compatibility for
Dan Nicolaescu <dann@ics.uci.edu>
parents: 64835
diff changeset
559 :group 'idlwave-shell-highlighting-and-faces))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
560
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
561
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
562 (defcustom idlwave-shell-expression-face 'secondary-selection
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
563 "*The face for `idlwave-shell-expression-overlay'.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
564 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
565 the expression printed by IDL."
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
566 :group 'idlwave-shell-highlighting-and-faces
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
567 :type 'symbol)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
568
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
569 (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
570 "*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
571 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
572 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
573 :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
574 :type 'symbol)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
575
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
576 ;;; End user customization variables
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
577
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
578 ;;; External variables
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
579 (defvar comint-last-input-start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
580 (defvar comint-last-input-end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
581
58307
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
582 ;; Other variables
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
583 (defvar idlwave-shell-temp-pro-file nil
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
584 "Absolute pathname for temporary IDL file for compiling regions")
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
585
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
586 (defvar idlwave-shell-temp-rinfo-save-file nil
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
587 "Absolute pathname for temporary IDL file save file for routine_info.
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
588 This is used to speed up the reloading of the routine info procedure
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
589 before use by the shell.")
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
590
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
591 (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
592 "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
593
58307
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
594 TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
595 `idlwave-shell-temp-rinfo-save-file' is set (respectively)."
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
596 (cond
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
597 ((eq type 'rinfo)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
598 (or idlwave-shell-temp-rinfo-save-file
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
599 (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
600 (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
601 ((eq type 'pro)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
602 (or idlwave-shell-temp-pro-file
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
603 (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
604 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
605 (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
606 (symbol-name type)))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
607
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
608
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
609 (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
610 "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
611 ; 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
612 (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
613 (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
614 (let (file
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
615 (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
616 temporary-file-directory
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
617 "/tmp")))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
618 (while (condition-case ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
619 (progn
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
620 (setq file
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
621 (make-temp-name
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
622 (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
623 (if (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
624 (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
625 (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
626 nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
627 (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
628 ;; 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
629 ;; `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
630 nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
631 file)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
632
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
633
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
634 (defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
635 "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
636 the directory stack.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
637
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
638 (defvar idlwave-shell-path-query "print,'PATH:<'+transpose(expand_path(!PATH,/ARRAY))+'>' & print,'SYSDIR:<'+!dir+'>'"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
639
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
640 "The command which gets !PATH and !DIR info from the shell.")
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
641
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
642 (defvar idlwave-shell-mode-line-info nil
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
643 "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
644
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
645 (defvar idlwave-shell-default-directory nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
646 "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
647
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
648 (defvar idlwave-shell-last-save-and-action-file nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
649 "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
650
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
651 ;; Highlighting uses overlays. When necessary, require the emulation.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
652 (if (not (fboundp 'make-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
653 (condition-case nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
654 (require 'overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
655 (error nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
656
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
657 (defvar idlwave-shell-stop-line-overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
658 "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
659 (defvar idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
660 (defvar idlwave-shell-expression-overlay nil
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
661 "The overlay for the examined expression.")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
662 (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
663 "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
664
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
665 ;; 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
666 ;; are reloading this file.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
667 (if (overlayp idlwave-shell-stop-line-overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
668 (delete-overlay idlwave-shell-stop-line-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
669 (if (overlayp idlwave-shell-expression-overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
670 (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
671 (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
672 (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
673
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
674 ;; Set to nil initially
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
675 (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
676 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
677 idlwave-shell-output-overlay nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
678
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
679 ;; 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
680 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
681 ((or (null idlwave-shell-mark-stop-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
682 (eq idlwave-shell-mark-stop-line 'arrow))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
683 ;; Leave the overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
684 nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
685
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
686 ((eq idlwave-shell-mark-stop-line 'face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
687 ;; 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
688 ;; So who can display faces?
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
689 (when (or (featurep 'xemacs) ; XEmacs can do also ttys
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
690 (fboundp 'tty-defined-colors) ; Emacs 21 as well
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
691 window-system) ; Window systems always
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
692 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
693 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
694 (overlay-put idlwave-shell-stop-line-overlay
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
695 'face idlwave-shell-stop-line-face))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
696
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
697 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
698 ;; 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
699 (if window-system
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
700 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
701 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
702 (overlay-put idlwave-shell-stop-line-overlay
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
703 'face idlwave-shell-stop-line-face)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
704
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
705 ;; Now the expression and output overlays
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
706 (setq idlwave-shell-expression-overlay (make-overlay 1 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
707 (overlay-put idlwave-shell-expression-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
708 'face idlwave-shell-expression-face)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
709 (overlay-put idlwave-shell-expression-overlay
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
710 'priority 1)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
711 (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
712 (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
713 '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
714
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
715 (copy-face idlwave-shell-stop-line-face
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
716 'idlwave-shell-pending-stop)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
717 (copy-face idlwave-shell-electric-stop-line-face
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
718 'idlwave-shell-pending-electric-stop)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
719 (set-face-background 'idlwave-shell-pending-stop "gray70")
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
720 (set-face-background 'idlwave-shell-pending-electric-stop "gray70")
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
721
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
722
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
723
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
724 (defvar idlwave-shell-bp-query "help,/breakpoints"
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
725 "Command to obtain list of breakpoints.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
726
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
727 (defvar idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
728 "String for accumulating current command output.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
729
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
730 (defvar idlwave-shell-post-command-hook nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
731 "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
732 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
733 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
734
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
735 (defvar idlwave-shell-sentinel-hook nil
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
736 "Hook run when the IDL process exits.")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
737
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
738 (defvar idlwave-shell-hide-output nil
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
739 "If non-nil the process output is not inserted into the output buffer.")
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
740
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
741 (defvar idlwave-shell-show-if-error nil
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
742 "If non-nil the process output is inserted into the output buffer if
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
743 it contains an error message, even if hide-output is non-nil.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
744
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
745 (defvar idlwave-shell-accumulation nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
746 "Accumulate last line of output.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
747
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
748 (defvar idlwave-shell-command-line-to-execute nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
749 (defvar idlwave-shell-cleanup-hook nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
750 "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
751
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
752 (defvar idlwave-shell-pending-commands nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
753 "List of commands to be sent to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
754 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
755 string to be sent to IDL and PCMD is a post-command to be placed on
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
756 `idlwave-shell-post-command-hook'. If HIDE is non-nil, hide the output
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
757 from command CMD. PCMD and HIDE are optional.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
758
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
759 (defun idlwave-shell-buffer ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
760 "Name of buffer associated with IDL process.
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
761 The name of the buffer is made by surrounding `idlwave-shell-process-name'
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
762 with `*'s."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
763 (concat "*" idlwave-shell-process-name "*"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
764
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
765 (defvar idlwave-shell-ready nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
766 "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
767
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
768 ;;; 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
769 ;;; resync our idea of where IDL execution currently is.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
770 ;;;
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
771
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
772 (defvar idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
773 "The frame associated with halt/breakpoint messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
774
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
775 (defvar idlwave-shell-step-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
776 "The frame associated with step messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
777
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
778 (defvar idlwave-shell-trace-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
779 "The frame associated with trace messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
780
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
781 (defconst idlwave-shell-halt-messages
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
782 '("^% Interrupted at:"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
783 "^% Stepped to:"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
784 "^% Skipped to:"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
785 "^% Stop encountered:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
786 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
787 "*A list of regular expressions matching IDL messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
788 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
789 IDL is currently stopped.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
790
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
791
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
792 (defconst idlwave-shell-halt-messages-re
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
793 (mapconcat 'identity idlwave-shell-halt-messages "\\|")
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
794 "The regular expression computed from `idlwave-shell-halt-messages'.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
795
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
796 (defconst idlwave-shell-trace-message-re
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
797 "^% At " ;; First line of a trace message
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
798 "*A regular expression matching IDL trace messages. These are the
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
799 messages containing file and line information of a current
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
800 traceback.")
27107
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 (defconst idlwave-shell-step-messages
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
803 '("^% Stepped to:"
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 "*A list of regular expressions matching stepped execution messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
806 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
807 IDL has currently stepped.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
808
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
809 (defvar idlwave-shell-break-message "^% Breakpoint at:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
810 "*Regular expression matching an IDL breakpoint message line.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
811
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
812 (defconst idlwave-shell-electric-debug-help
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
813 " ==> IDLWAVE Electric Debug Mode Help <==
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
814
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
815 Break Point Setting and Clearing:
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
816 b Set breakpoint ([C-u b] for conditional, [C-n b] nth hit, etc.).
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
817 d Clear nearby breakpoint.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
818 a Clear all breakpoints.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
819 i Set breakpoint in routine named here.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
820 j Set breakpoint at beginning of containing routine.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
821 \\ Toggle breakpoint disable
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
822 ] Go to next breakpoint in file.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
823 [ Go to previous breakpoint in file.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
824
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
825 Stepping, Continuing, and the Stack:
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
826 s or SPACE Step, into function calls.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
827 n Step, over function calls.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
828 k Skip one statement.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
829 m Continue to end of function.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
830 o Continue past end of function.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
831 u Continue to end of block.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
832 h Continue to line at cursor position.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
833 r Continue execution to next breakpoint, if any.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
834 + or = Show higher level in calling stack.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
835 - or _ Show lower level in calling stack.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
836
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
837 Examining Expressions (with prefix for examining the region):
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
838 p Print expression near point or in region ([C-u p]).
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
839 ? Help on expression near point or in region ([C-u ?]).
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
840 x Examine expression near point or in region ([C-u x]) with
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
841 letter completion of the examine type.
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
842 e Prompt for an expression to print.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
843
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
844 Miscellaneous:
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
845 q Quit - end debugging session and return to the Shell's main level.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
846 v Turn Electric Debugging Mode off (C-c C-d C-v to return).
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
847 t Print a calling-level traceback in the shell.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
848 z Reset IDL.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
849 C-? Show this help menu.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
850
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
851 (defvar idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
852 ;(defvar idlwave-shell-post-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
853 (defvar idlwave-shell-sources-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
854 (defvar idlwave-shell-menu-def)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
855 (defvar idlwave-shell-mode-menu)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
856 (defvar idlwave-shell-initial-commands)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
857 (defvar idlwave-shell-syntax-error)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
858 (defvar idlwave-shell-other-error)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
859 (defvar idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
860 (defvar idlwave-shell-error-last)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
861 (defvar idlwave-shell-bp-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
862 (defvar idlwave-shell-sources-query)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
863 (defvar idlwave-shell-mode-map)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
864 (defvar idlwave-shell-calling-stack-index)
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
865 (defvar idlwave-shell-only-prompt-pattern nil)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
866 (defvar tool-bar-map)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
867
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
868 (defun idlwave-shell-mode ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
869 "Major mode for interacting with an inferior IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
870
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
871 1. Shell Interaction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
872 -----------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
873 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
874 end of process to the end of the current line. RET before end of
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
875 process output copies the current line (except for the prompt) to
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
876 the end of the buffer.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
877
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
878 Command history, searching of previous commands, command line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
879 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
880 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
881 the arrow keys UP and DOWN.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
882
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
883 2. Completion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
884 ----------
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
885 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
886 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
887 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
888 like in `idlwave-mode'.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
889
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
890 3. Routine Info
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
891 ------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
892 `\\[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
893 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
894 the one whose argument list is being edited.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
895 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
896 \\[idlwave-update-routine-info].
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
897 \\[idlwave-find-module] find the source of a module.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
898 \\[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
899 \\[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
900 point, if online help has been installed.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
901
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
902
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
903 4. Debugging
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
904 ---------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
905 A complete set of commands for compiling and debugging IDL programs
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
906 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
907 `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
908 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
909 keybindings is again the menu.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
910
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
911 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
912 installed.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
913
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
914 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
915 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
916 window. Breakpoints are also highlighted in the source.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
917
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
918 \\[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
919 to correspond to the IDL process current directory.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
920
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
921 5. Expression Examination
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
922 ----------------------
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
923
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
924 Expressions near point can be examined with print,
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
925 \\[idlwave-shell-print] or \\[idlwave-shell-mouse-print] with the
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
926 mouse, help, \\[idlwave-shell-help-expression] or
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
927 \\[idlwave-shell-mouse-help] with the mouse, or with a
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
928 configureable set of custom examine commands using
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
929 \\[idlwave-shell-examine-select]. The mouse examine commands can
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
930 also work by click and drag, to select an expression for
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
931 examination.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
932
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
933 6. Hooks
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
934 -----
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
935 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
936 `idlwave-shell-mode-hook' (in that order).
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
937
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
938 7. Documentation and Customization
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 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
941 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
942 For Postscript and HTML versions of the documentation, check IDLWAVE's
104029
55ba5af4bf3a Kevin Ryde <user42 at zip.com.au>
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
943 homepage at URL `http://idlwave.org'.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
944 IDLWAVE has customize support - see the group `idlwave'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
945
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
946 8. Keybindings
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
947 -----------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
948 \\{idlwave-shell-mode-map}"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
949
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
950 (interactive)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
951 (idlwave-setup) ; Make sure config files and paths, etc. are available.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
952 (unless (file-name-absolute-p idlwave-shell-command-history-file)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
953 (setq idlwave-shell-command-history-file
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
954 (expand-file-name idlwave-shell-command-history-file
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
955 idlwave-config-directory)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
956
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
957 ;; We don't do `kill-all-local-variables' here, because this is done by
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
958 ;; comint
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
959 (setq comint-prompt-regexp idlwave-shell-prompt-pattern)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
960 (setq comint-process-echoes t)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
961
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
962 ;; 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
963 (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
964 ; (setq comint-input-ring-size 64)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
965 (make-local-variable 'comint-completion-addsuffix)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
966 (set (make-local-variable 'completion-ignore-case) t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
967 (setq comint-completion-addsuffix '("/" . ""))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
968 (setq comint-input-ignoredups t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
969 (setq major-mode 'idlwave-shell-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
970 (setq mode-name "IDL-Shell")
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
971 (setq idlwave-shell-mode-line-info nil)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
972 (setq mode-line-format
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
973 '(""
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
974 mode-line-modified
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
975 mode-line-buffer-identification
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
976 " "
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
977 global-mode-string
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
978 " %[("
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
979 mode-name
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
980 mode-line-process
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
981 minor-mode-alist
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
982 "%n"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
983 ")%]-"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
984 idlwave-shell-mode-line-info
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
985 "---"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
986 (line-number-mode "L%l--")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
987 (column-number-mode "C%c--")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
988 (-3 . "%p")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
989 "-%-"))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
990 ;; (make-local-variable 'idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
991 (setq idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
992 idlwave-shell-trace-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
993 idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
994 idlwave-shell-step-frame nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
995 (idlwave-shell-display-line nil)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
996 (setq idlwave-shell-calling-stack-index 0)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
997 (setq idlwave-shell-only-prompt-pattern
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
998 (concat "\\`[ \t\n]*"
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
999 (substring idlwave-shell-prompt-pattern 1)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1000 "[ \t\n]*\\'"))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1001
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1002 (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
1003 (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
1004 '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
1005 (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
1006
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1007 ;; 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
1008 ;; 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
1009 (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
1010 (setq idlwave-idlwave_routine_info-compiled nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1011 (setq idlwave-shell-ready nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1012 (setq idlwave-shell-bp-alist nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1013 (idlwave-shell-update-bp-overlays) ; Throw away old overlays
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
1014 (setq idlwave-shell-post-command-hook nil ;clean up any old stuff
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
1015 idlwave-shell-sources-alist nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1016 (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
1017 (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
1018
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1019 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1020 ;; (make-local-hook 'kill-buffer-hook)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1021 (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
1022 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
1023 (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
1024 (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
1025 (use-local-map idlwave-shell-mode-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1026 (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
1027
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1028 ;; 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
1029 (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
1030 (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
1031 (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
1032 (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
1033
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1034
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1035 (unless (memq 'comint-carriage-motion
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1036 (default-value 'comint-output-filter-functions))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1037 ;; Strip those pesky ctrl-m's.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1038 (add-hook 'comint-output-filter-functions
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1039 (lambda (string)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1040 (when (string-match "\r" string)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1041 (let ((pmark (process-mark (get-buffer-process
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1042 (current-buffer)))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1043 (save-excursion
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1044 ;; bare CR -> delete preceding line
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1045 (goto-char comint-last-output-start)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1046 (while (search-forward "\r" pmark t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1047 (delete-region (point) (line-beginning-position)))))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1048 'append 'local)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1049 (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m nil 'local))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1050
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1051 ;; Python-mode, bundled with many Emacs installs, quite cavalierly
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1052 ;; adds this function to the global default hook. It interferes
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1053 ;; with overlay-arrows.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1054 (remove-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1055
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1056
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1057 ;; 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
1058 (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
1059 (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
1060 (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
1061 (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
1062
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1063 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1064 ;; 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
1065 (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
1066
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1067 ;; 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
1068 (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
1069 (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
1070 (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
1071 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
1072 (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
1073 (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
1074
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1075 ;; Turn off the non-debug toolbar buttons (open,save,etc.)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1076 (set (make-local-variable 'tool-bar-map) nil)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1077
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1078 ;; Run the hooks.
62772
f2892faa87d4 * progmodes/ada-mode.el (ada-mode):
Lute Kamstra <lute@gnu.org>
parents: 62402
diff changeset
1079 (run-mode-hooks 'idlwave-shell-mode-hook)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1080 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1081 ;; Turn off IDL's ^d interpreting, and define a system
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1082 ;; variable which knows the version of IDLWAVE
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1083 (idlwave-shell-send-command
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1084 (format "defsysv,'!idlwave_version','%s',1" idlwave-mode-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
1085 nil 'hide)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1086 ;; Read the paths, and save if they changed
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1087 (idlwave-shell-send-command idlwave-shell-path-query
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1088 'idlwave-shell-get-path-info
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1089 'hide))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1090
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1091 (defvar idlwave-system-directory)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1092 (defun idlwave-shell-get-path-info (&optional no-write)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1093 "Get the path lists, writing to file unless NO-WRITE is set."
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1094 (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
1095 (sysdir (car rpl))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1096 (dirs (cdr rpl))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1097 (old-path-alist idlwave-path-alist)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1098 (old-sys-dir idlwave-system-directory)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1099 path-changed sysdir-changed)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1100 (when sysdir
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1101 (setq idlwave-system-directory sysdir)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1102 (if (setq sysdir-changed
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1103 (not (string= idlwave-system-directory old-sys-dir)))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1104 (put 'idlwave-system-directory 'from-shell t)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1105 ;; Preserve any existing flags
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1106 (setq idlwave-path-alist
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1107 (mapcar (lambda (x)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1108 (let ((old-entry (assoc x old-path-alist)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1109 (if old-entry
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1110 (cons x (cdr old-entry))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1111 (list x))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1112 dirs))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1113 (if (setq path-changed (not (equal idlwave-path-alist old-path-alist)))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1114 (put 'idlwave-path-alist 'from-shell t))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1115 (if idlwave-path-alist
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1116 (if (and (not no-write)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1117 idlwave-auto-write-paths
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1118 (or sysdir-changed path-changed)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1119 (not idlwave-library-path))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1120 (idlwave-write-paths))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1121 ;; Fall back
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1122 (setq idlwave-path-alist old-path-alist))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1123
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1124 (if (not (fboundp 'idl-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1125 (fset 'idl-shell 'idlwave-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1126
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1127 (defvar idlwave-shell-idl-wframe nil
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1128 "Frame for displaying the IDL shell window.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1129 (defvar idlwave-shell-display-wframe nil
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1130 "Frame for displaying the IDL source files.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1131
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1132 (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
1133 (defvar idlwave-shell-calling-stack-routine nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1134
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1135 (defun idlwave-shell-source-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1136 "Return the frame to be used for source display."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1137 (if idlwave-shell-use-dedicated-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1138 ;; We want separate frames for source and shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1139 (if (frame-live-p idlwave-shell-display-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1140 ;; The frame exists, so we use it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1141 idlwave-shell-display-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1142 ;; 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
1143 ;; 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
1144 ;; or recycle the first existing visible frame
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1145 (setq idlwave-shell-display-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1146 (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
1147 (or
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1148 (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
1149 (frame (selected-frame)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1150 (catch 'exit
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1151 (while flist
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1152 (if (not (eq (car flist)
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1153 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
1154 (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
1155 (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
1156 (make-frame))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1157 (selected-frame))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1158
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1159 (defun idlwave-shell-shell-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1160 "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
1161 (if idlwave-shell-use-dedicated-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1162 ;; We want a dedicated frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1163 (if (frame-live-p idlwave-shell-idl-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1164 ;; It does exist, so we use it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1165 idlwave-shell-idl-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1166 ;; 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
1167 (if (not (frame-live-p idlwave-shell-display-wframe))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1168 ;; 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
1169 (setq idlwave-shell-display-wframe (selected-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1170 ;; Return a new frame
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1171 (setq idlwave-shell-idl-wframe
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1172 (make-frame idlwave-shell-frame-parameters)))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1173
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1174 ;;;###autoload
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1175 (defun idlwave-shell (&optional arg quick)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1176 "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
1177 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
1178 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
1179
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1180 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
1181 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
1182 separate frames.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1183
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1184 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
1185 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
1186
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1187 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
1188 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
1189 See also the variable `idlwave-shell-prompt-pattern'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1190
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1191 \(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
1192 (interactive "P")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1193 (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
1194 (progn
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1195 (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
1196 (idlwave-shell nil)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1197 (delete-other-windows))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1198 (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
1199 (setq idlwave-shell-idl-wframe (selected-frame)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1200 (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
1201 '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
1202
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1203 ;; 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
1204 ;; 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
1205 (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
1206 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1207
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1208 ;; 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
1209 (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
1210 (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
1211 (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
1212 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
1213 (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
1214 (idlwave-split-string
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1215 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
1216 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
1217 (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
1218 (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
1219 (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
1220 (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
1221 (set-buffer buf)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1222 (idlwave-shell-mode)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1223 (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
1224 (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
1225 (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
1226 (select-window window)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1227 (goto-char (point-max))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1228 (if idlwave-shell-use-dedicated-window
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1229 (set-window-dedicated-p window t))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1230 (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
1231 (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
1232 (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
1233 (if (eq (selected-frame) (window-frame window))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1234 (select-window window))))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1235 ;; Save the paths at the end, if they are from the Shell and new.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1236 (add-hook 'idlwave-shell-sentinel-hook
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1237 (lambda ()
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1238 (if (and
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1239 idlwave-auto-write-paths
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1240 idlwave-path-alist
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1241 (not idlwave-library-path)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1242 (get 'idlwave-path-alist 'from-shell))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1243 (idlwave-write-paths)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1244
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1245 (defun idlwave-shell-recenter-shell-window (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1246 "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
1247 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1248 (let ((window (selected-window)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1249 (idlwave-shell arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1250 (select-window window)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1251
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1252 (defun idlwave-shell-hide-p (type &optional list)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1253 "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
1254 Return either nil or 'hide."
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1255 (let ((list (or list idlwave-shell-show-commands)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1256 (if (listp list)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1257 (if (not (memq type list)) 'hide))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1258
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1259 (defun idlwave-shell-add-or-remove-show (type)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1260 "Add or remove a show command from the list."
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1261 (if (listp idlwave-shell-show-commands)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1262 (setq idlwave-shell-show-commands
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1263 (if (memq type idlwave-shell-show-commands)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1264 (delq type idlwave-shell-show-commands)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1265 (add-to-list'idlwave-shell-show-commands type)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1266 (setq idlwave-shell-show-commands (list type))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1267
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1268
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1269 (defun idlwave-shell-send-command (&optional cmd pcmd hide preempt
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1270 show-if-error)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1271 "Send a command to IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1272
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1273 \(CMD PCMD HIDE\) are placed at the end of `idlwave-shell-pending-commands'.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1274 If IDL is ready the first command in `idlwave-shell-pending-commands',
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1275 CMD, is sent to the IDL process.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1276
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1277 If optional second argument PCMD is non-nil it will be placed on
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1278 `idlwave-shell-post-command-hook' when CMD is executed.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1279
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1280 If the optional third argument HIDE is non-nil, then hide output from
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1281 CMD, unless it is the symbol 'mostly, in which case only output
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1282 beginning with \"%\" is hidden, and all other output (i.e., the
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1283 results of a PRINT command), is shown. This helps with, e.g.,
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1284 stepping through code with output.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1285
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1286 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
1287 `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
1288 output to complete and the next prompt to arrive before returning
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1289 \(useful if you need an answer now\). IDL is considered ready if the
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1290 prompt is present and if `idlwave-shell-ready' is non-nil.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1291
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
1292 If SHOW-IF-ERROR is non-nil, show the output if it contains an error
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1293 message, independent of what HIDE is set to."
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1294
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1295 ; (setq hide nil) ; FIXME: turn this on for debugging only
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1296 ; (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
1297 ; (progn
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1298 ; (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
1299 ; (prin1-to-string idlwave-shell-pending-commands)))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1300 ; (message "SENDING %s|||%s" cmd pcmd))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1301 (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
1302 (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
1303 (setq hide nil))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1304 (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
1305 buf proc)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1306 ;; Get or make the buffer and its process
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1307 (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
1308 (not (setq proc (get-buffer-process buf))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1309 (if (not idlwave-shell-automatic-start)
87143
e1c8546ca1d5 Fix buggy `error' calls in progmodes/
Deepak Goel <deego@gnufans.org>
parents: 85451
diff changeset
1310 (error "%s"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1311 (substitute-command-keys
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1312 "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
1313 (idlwave-shell-recenter-shell-window)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1314 (setq buf (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1315 (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
1316 (not (setq proc (get-buffer-process buf))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1317 ;; Still nothing
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1318 (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
1319 (when (or cmd idlwave-shell-pending-commands)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1320 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1321 ;; 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
1322 (if cmd
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1323 (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
1324 (if preempt
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1325 ;; Put at front.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1326 (append (list (list cmd pcmd hide show-if-error))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1327 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
1328 ;; Put at end.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1329 (append idlwave-shell-pending-commands
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1330 (list (list cmd pcmd hide show-if-error))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1331 ;; 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
1332 (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
1333 (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
1334 (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
1335 ;; 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
1336 (prog2
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1337 (forward-line 0)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1338 ;; (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
1339 (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
1340 (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
1341 ;; 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
1342 (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
1343 (cmd (car lcmd))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1344 (pcmd (nth 1 lcmd))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1345 (hide (nth 2 lcmd))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1346 (show-if-error (nth 3 lcmd)))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1347 ;; 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
1348 (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
1349 (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
1350 ;; Set post-command
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1351 (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
1352 ;; Output hiding
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1353 (setq idlwave-shell-hide-output hide)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1354 ;;Showing errors
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1355 (setq idlwave-shell-show-if-error show-if-error)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1356 ;; Pop command
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1357 (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
1358 (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
1359 ;; 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
1360 (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
1361 (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
1362 (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
1363 (setq idlwave-shell-ready nil)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1364 (if (equal preempt 'wait) ; Get all the output at once
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1365 (while (not idlwave-shell-ready)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1366 (when (not (accept-process-output proc 6)) ; long wait
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1367 (setq idlwave-shell-pending-commands nil)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1368 (error "Process timed out"))))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1369 (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
1370 (set-buffer save-buffer))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1371
57822
7cda0787d8cd (idlwave-shell-send-char): Don't use interactive-p.
Richard M. Stallman <rms@gnu.org>
parents: 55729
diff changeset
1372 (defun idlwave-shell-send-char (c &optional error)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1373 "Send one character to the shell, without a newline."
57822
7cda0787d8cd (idlwave-shell-send-char): Don't use interactive-p.
Richard M. Stallman <rms@gnu.org>
parents: 55729
diff changeset
1374 (interactive "cChar to send to IDL: \np")
7cda0787d8cd (idlwave-shell-send-char): Don't use interactive-p.
Richard M. Stallman <rms@gnu.org>
parents: 55729
diff changeset
1375 (let ((errf (if error 'error 'message))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1376 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
1377 (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
1378 (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
1379 (funcall errf "Shell is not running"))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1380 (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
1381 (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
1382 (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
1383
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1384 (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
1385 (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
1386 "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
1387 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
1388 (cond
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1389 ((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
1390 (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
1391 ((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
1392 (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
1393 (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
1394 ((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
1395 ;; 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
1396 (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
1397 (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
1398 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
1399 (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
1400
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1401 (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
1402 (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
1403 "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
1404 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
1405 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
1406 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
1407 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
1408 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
1409 (interactive)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1410
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1411 ;; 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
1412 (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
1413 (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
1414 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
1415 (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
1416 (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
1417 (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
1418 (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
1419 (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
1420
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1421 ;; 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
1422 (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
1423 (message
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1424 (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
1425 (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
1426 ;; 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
1427 ;; 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
1428 (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
1429 ;; 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
1430 (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
1431 (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
1432 (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
1433 (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
1434 (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
1435 ;; 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
1436 (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
1437 (setq c (read-char))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1438 (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
1439 (cond
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1440 ((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
1441 (ding))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1442 ((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
1443 (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
1444 (ding)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1445 (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
1446 (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
1447 (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
1448 (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
1449 (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
1450
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1451 (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
1452 "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
1453 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
1454 (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
1455 (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
1456 (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
1457 (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
1458 (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
1459 (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
1460 (>= (1+ (save-excursion (end-of-line) (point))) proc-pos))
70573
b79a60a5fdeb (idlwave-shell-move-or-history): Remove spurious move to point-max (new
J.D. Smith <jdsmith@as.arizona.edu>
parents: 69822
diff changeset
1461 (comint-previous-input arg)
85451
e1af3a725ca4 * textmodes/two-column.el (2C-split, 2C-merge):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 85220
diff changeset
1462 (forward-line (- arg)))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1463
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1464 (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
1465 "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
1466 Otherwise just go up one line."
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1467 (interactive "p")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1468 (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
1469
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1470 (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
1471 "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
1472 Otherwise just go down one line."
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1473 (interactive "p")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1474 (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
1475
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1476 ;; 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
1477 ;; comint-output-filter.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1478 (defun idlwave-shell-comint-filter (process string) nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1479 (if (fboundp 'comint-output-filter)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1480 (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
1481 (fset 'idlwave-shell-comint-filter (symbol-function 'comint-filter)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1482
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1483 (defun idlwave-shell-is-running ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1484 "Return t if the shell process is running."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1485 (eq (process-status idlwave-shell-process-name) 'run))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1486
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1487 (defun idlwave-shell-filter-hidden-output (output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1488 "Filter hidden output, leaving the good stuff.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1489
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1490 Remove everything to the first newline, and all lines with % in front
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1491 of them, with optional follow-on lines starting with two spaces. This
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1492 works well enough, since any print output typically arrives before
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1493 error messages, etc."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1494 (setq output (substring output (string-match "\n" output)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1495 (while (string-match "\\(\n\\|\\`\\)%.*\\(\n .*\\)*" output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1496 (setq output (replace-match "" nil t output)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1497 (unless
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1498 (string-match idlwave-shell-only-prompt-pattern output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1499 output))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1500
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1501 (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
1502 "Buffer containing hidden output from IDL commands.")
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1503 (defvar idlwave-shell-current-state nil)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1504
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1505 (defun idlwave-shell-filter (proc string)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1506 "Watch for IDL prompt and filter incoming text.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1507 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
1508 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
1509 ;; We no longer do the cleanup here - this is done by the process sentinel
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1510 (if (eq (process-status idlwave-shell-process-name) 'run)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1511 ;; OK, process is still running, so we can use it.
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1512 (let ((data (match-data)) p full-output)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1513 (unwind-protect
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1514 (progn
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1515 ;; Ring the bell if necessary
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1516 (while (setq p (string-match "\C-G" string))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1517 (ding)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1518 (aset string p ?\C-j ))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1519 (if idlwave-shell-hide-output
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1520 (save-excursion
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1521 (while (setq p (string-match "\C-M" string))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1522 (aset string p ?\ ))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1523 (set-buffer
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1524 (get-buffer-create idlwave-shell-hidden-output-buffer))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1525 (goto-char (point-max))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1526 (insert string))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1527 (idlwave-shell-comint-filter proc string))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1528 ;; Watch for magic - need to accumulate the current line
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1529 ;; since it may not be sent all at once.
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1530 (if (string-match "\n" string)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1531 (progn
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1532 (if idlwave-shell-use-input-mode-magic
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1533 (idlwave-shell-input-mode-magic
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1534 (concat idlwave-shell-accumulation string)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1535 (setq idlwave-shell-accumulation
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1536 (substring string
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1537 (progn (string-match "\\(.*[\n\r]+\\)*"
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1538 string)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1539 (match-end 0)))))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1540 (setq idlwave-shell-accumulation
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1541 (concat idlwave-shell-accumulation string)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1542
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1543
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1544 ;; ;; Test/Debug code
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1545 ;;(with-current-buffer
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1546 ;; (get-buffer-create "*idlwave-shell-output*")
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1547 ;; (goto-char (point-max))
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1548 ;; (insert "\nReceived STRING\n===>\n" string "\n<====\n"))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1549
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1550 ;; Check for prompt in current accumulating output
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1551 (when (setq idlwave-shell-ready
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1552 (string-match idlwave-shell-prompt-pattern
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1553 idlwave-shell-accumulation))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1554 ;; Gather the command output
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1555 (if idlwave-shell-hide-output
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1556 (with-current-buffer idlwave-shell-hidden-output-buffer
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1557 (setq full-output (buffer-string))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1558 (goto-char (point-max))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1559 (re-search-backward idlwave-shell-prompt-pattern nil t)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1560 (goto-char (match-end 0))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1561 (setq idlwave-shell-command-output
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1562 (buffer-substring-no-properties
74103
b21beb03e5c4 (idlwave-shell-filter-directory): Handle extra newlines and spaces.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 71938
diff changeset
1563 (point-min) (point)))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1564 (delete-region (point-min) (point)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1565 (setq idlwave-shell-command-output
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1566 (with-current-buffer (process-buffer proc)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1567 (buffer-substring-no-properties
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1568 (save-excursion
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1569 (goto-char (process-mark proc))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1570 (forward-line 0) ; Emacs 21 (beginning-of-line nil)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1571 (point))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1572 comint-last-input-end))))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1573
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1574 ;; Scan for state and do post commands - bracket
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1575 ;; them with idlwave-shell-ready=nil since they may
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1576 ;; call idlwave-shell-send-command themselves.
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1577 (let ((idlwave-shell-ready nil))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1578 (idlwave-shell-scan-for-state)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1579 ;; Show the output in the shell if it contains an error
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
1580 (if idlwave-shell-hide-output
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1581 (if (and idlwave-shell-show-if-error
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1582 (eq idlwave-shell-current-state 'error))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1583 (idlwave-shell-comint-filter proc full-output)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1584 ;; If it's only *mostly* hidden, filter % lines,
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1585 ;; and show anything that remains
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1586 (if (eq idlwave-shell-hide-output 'mostly)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1587 (let ((filtered
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1588 (idlwave-shell-filter-hidden-output
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1589 full-output)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1590 (if filtered
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1591 (idlwave-shell-comint-filter
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1592 proc filtered))))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1593
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1594 ;; Call the post-command hook
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1595 (if (listp idlwave-shell-post-command-hook)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1596 (progn
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1597 ;;(message "Calling list")
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1598 ;;(prin1 idlwave-shell-post-command-hook)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1599 (eval idlwave-shell-post-command-hook))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1600 ;;(message "Calling command function")
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1601 (funcall idlwave-shell-post-command-hook))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1602
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1603 ;; Reset to default state for next command.
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1604 ;; Also we do not want to find this prompt again.
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1605 (setq idlwave-shell-accumulation nil
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1606 idlwave-shell-command-output nil
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1607 idlwave-shell-post-command-hook nil
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1608 idlwave-shell-hide-output nil
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1609 idlwave-shell-show-if-error nil))
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1610 ;; Done with post command. Do pending command if
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1611 ;; any.
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1612 (idlwave-shell-send-command)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1613 (store-match-data data)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1614
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1615 (defun idlwave-shell-sentinel (process event)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1616 "The sentinel function for the IDLWAVE shell process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1617 (let* ((buf (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1618 (win (get-buffer-window buf)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1619 (when (get-buffer buf)
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1620 (with-current-buffer (idlwave-shell-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1621 (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
1622 (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
1623 (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
1624 (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
1625 (condition-case nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1626 (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
1627 (error nil)))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1628
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1629 (when (and (> (length (frame-list)) 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1630 (frame-live-p idlwave-shell-idl-wframe))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1631 (delete-frame idlwave-shell-idl-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1632 (setq idlwave-shell-idl-wframe nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1633 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
1634 (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
1635 (not (one-window-p 'nomini)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1636 (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
1637 (idlwave-shell-cleanup)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1638 ;; 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
1639 (if (get-buffer buf)
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
1640 (with-current-buffer buf
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
1641 (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
1642 (run-hooks 'idlwave-shell-sentinel-hook))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1643
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1644 (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*"
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1645 "Buffer containing syntax errors from IDL compilations.")
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1646
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1647 ;; FIXME: the following two variables do not currently allow line breaks
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1648 ;; in module and file names. I am not sure if it will be necessary to
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1649 ;; change this. Currently it seems to work the way it is.
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1650 (defvar idlwave-shell-syntax-error
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1651 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1652 "A regular expression to match an IDL syntax error.
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1653 The first pair matches the file name, the second pair matches the line
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1654 number.")
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1655
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1656 (defvar idlwave-shell-other-error
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1657 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1658 "A regular expression to match any IDL error.")
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1659
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1660 (defvar idlwave-shell-halting-error
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1661 "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n"
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1662 "A regular expression to match errors which halt execution.")
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1663
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1664 (defvar idlwave-shell-cant-continue-error
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1665 "^% Can't continue from this point.\n"
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1666 "A regular expression to match errors stepping errors.")
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1667
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1668 (defvar idlwave-shell-file-line-message
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1669 (concat
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1670 "\\(" ; program name group (1)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1671 "\\$MAIN\\$\\|" ; main level routine
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1672 "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..]
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1673 "\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1674 "\\)" ; end program name group (1)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1675 "[ \t\n]+" ; white space
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1676 "\\(" ; line number group (3)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1677 "[0-9]+" ; the line number (the fix point)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1678 "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1679 "\\)" ; end line number group (3)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1680 "[ \t\n]+" ; white space
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1681 "\\(" ; file name group (5)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1682 "[^ \t\n]+" ; file names can contain any non-white
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1683 "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1684 "\\)" ; end line number group (5)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1685 )
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1686 "*A regular expression to parse out the file name and line number.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1687 The 1st group should match the subroutine name.
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1688 The 3rd group is the line number.
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1689 The 5th group is the file name.
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1690 All parts may contain linebreaks surrounded by spaces. This is important
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1691 in IDL5 which inserts random linebreaks in long module and file names.")
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
1692
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1693 (defvar idlwave-shell-electric-debug-mode) ; defined by easy-mmode
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1694
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1695 (defun idlwave-shell-scan-for-state ()
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1696 "Scan for state info.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1697 Looks for messages in output from last IDL command indicating where
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1698 IDL has stopped. The types of messages we are interested in are
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1699 execution halted, stepped, breakpoint, interrupted at and trace
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1700 messages. For breakpoint messages process any attached count or
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1701 command parameters. Update the stop line if a message is found.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1702 The variable `idlwave-shell-current-state' is set to 'error, 'halt,
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1703 or 'breakpoint, which describes the status, or nil for none of
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1704 the above."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1705 (let (trace)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1706 (cond
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1707 ;; Make sure we have output
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1708 ((not idlwave-shell-command-output))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1709
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1710 ;; First Priority: Syntax and other errors
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1711 ((or
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1712 (string-match idlwave-shell-syntax-error
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1713 idlwave-shell-command-output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1714 (string-match idlwave-shell-other-error
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1715 idlwave-shell-command-output))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1716 (with-current-buffer
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1717 (get-buffer-create idlwave-shell-error-buffer)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1718 (erase-buffer)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1719 (insert idlwave-shell-command-output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1720 (goto-char (point-min))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1721 (setq idlwave-shell-error-last (point)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1722 (setq idlwave-shell-current-state 'error)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1723 (idlwave-shell-goto-next-error))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1724
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1725 ;; Second Priority: Halting errors
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1726 ((string-match idlwave-shell-halting-error
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1727 idlwave-shell-command-output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1728 ;; Grab the file and line state info.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1729 (setq idlwave-shell-calling-stack-index 0)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1730 (setq idlwave-shell-halt-frame
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1731 (idlwave-shell-parse-line
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1732 (substring idlwave-shell-command-output
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1733 (match-beginning 2)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1734 idlwave-shell-current-state 'error)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1735 (idlwave-shell-display-line (idlwave-shell-pc-frame)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1736
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1737 ;; Third Priority: Various types of innocuous HALT and
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1738 ;; TRACEBACK messages.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1739 ((or (setq trace (string-match idlwave-shell-trace-message-re
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1740 idlwave-shell-command-output))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1741 (string-match idlwave-shell-halt-messages-re
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1742 idlwave-shell-command-output))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1743 ;; Grab the file and line state info.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1744 (setq idlwave-shell-calling-stack-index 0)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1745 (setq idlwave-shell-halt-frame
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1746 (idlwave-shell-parse-line
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1747 (substring idlwave-shell-command-output (match-end 0))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1748 (setq idlwave-shell-current-state 'halt)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1749 ;; Don't debug trace messages
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1750 (idlwave-shell-display-line
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1751 (idlwave-shell-pc-frame) nil
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1752 (if trace 'disable
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1753 (if idlwave-shell-electric-debug-mode 'force))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1754
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1755 ;; Fourth Priority: Breakpoints
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1756 ((string-match idlwave-shell-break-message
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1757 idlwave-shell-command-output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1758 (setq idlwave-shell-calling-stack-index 0)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1759 (setq idlwave-shell-halt-frame
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1760 (idlwave-shell-parse-line
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1761 (substring idlwave-shell-command-output (match-end 0))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1762 ;; We used to count hits on breakpoints
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1763 ;; this is no longer supported since IDL breakpoints
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1764 ;; have learned counting.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1765 ;; Do breakpoint command processing
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1766 (let ((bp (assoc
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1767 (list
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1768 (nth 0 idlwave-shell-halt-frame)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1769 (nth 1 idlwave-shell-halt-frame))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1770 idlwave-shell-bp-alist)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1771 ;(message "Scanning with %s" bp)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1772 (if bp
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1773 (let ((cmd (idlwave-shell-bp-get bp 'cmd)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1774 (if cmd ;; Execute any breakpoint command
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1775 (if (listp cmd) (eval cmd) (funcall cmd))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1776 ;; A breakpoint that we did not know about - perhaps it was
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1777 ;; set by the user... Let's update our list.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1778 (idlwave-shell-bp-query)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1779 (setq idlwave-shell-current-state 'breakpoint)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1780 (idlwave-shell-display-line (idlwave-shell-pc-frame)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1781
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1782 ;; Last Priority: Can't Step errors
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1783 ((string-match idlwave-shell-cant-continue-error
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1784 idlwave-shell-command-output)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1785 (setq idlwave-shell-current-state 'breakpoint))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1786
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1787 ;; Otherwise, no particular state
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1788 (t (setq idlwave-shell-current-state nil)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1789
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
1790
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1791 (defun idlwave-shell-parse-line (string &optional skip-main)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1792 "Parse IDL message for the subroutine, file name and line number."
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1793 ;We need to work hard here to remove the stupid line breaks inserted by
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1794 ;IDL5. These line breaks can be right in the middle of procedure
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1795 ;or file names.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1796 ;It is very difficult to come up with a robust solution. This one seems
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1797 ;to be pretty good though.
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1798 ;
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1799 ;Here is in what ways it improves over the previous solution:
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1800 ;
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1801 ;1. The procedure name can be split and will be restored.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1802 ;2. The number can be split. I have never seen this, but who knows.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1803 ;3. We do not require the `.pro' extension for files.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1804 ;
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1805 ;This function can still break when the file name ends on an end line
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1806 ;and the message line contains an additional line with garbage. Then
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1807 ;the first part of that garbage will be added to the file name.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1808 ;However, the function checks the existence of the files with and
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1809 ;without this last part - thus the function only breaks if file name
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1810 ;plus garbage match an existing regular file. This is hopefully very
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1811 ;unlikely.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1812 ;
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1813 ;If optional arg SKIP-MAIN is non-nil, don't parse $MAIN$ routine stop
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1814 ;statements.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1815
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1816 (let (number procedure file)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1817 (when (and (not (if skip-main (string-match ":\\s-*\\$MAIN" string)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1818 (string-match idlwave-shell-file-line-message string))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1819 (setq procedure (match-string 1 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1820 number (match-string 3 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1821 file (match-string 5 string))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1822
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1823 ;; Repair the strings
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1824 (setq procedure (idlwave-shell-repair-string procedure))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1825 (setq number (idlwave-shell-repair-string number))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1826 (setq file (idlwave-shell-repair-file-name file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1827
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1828 ;; If we have a file, return the frame list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1829 (if file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1830 (list (idlwave-shell-file-name file)
62402
a7e02ef1e3d6 Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents: 60925
diff changeset
1831 (string-to-number number)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1832 procedure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1833 ;; No success finding a file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1834 nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1835
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1836 (defun idlwave-shell-repair-string (string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1837 "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
1838 (while (string-match "[ \t]*\n[ \t]*" string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1839 (setq string (replace-match "" t t string)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1840 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1841
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1842 (defun idlwave-shell-repair-file-name (file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1843 "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
1844 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
1845 file name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1846 (let ((file1 "") (file2 "") (start 0))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1847 ;; We scan no further than to the next "^%" line
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1848 (if (string-match "^%" file)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1849 (setq file (substring file 0 (match-beginning 0))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1850 ;; Take out the line breaks
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1851 (while (string-match "[ \t]*\n[ \t]*" file start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1852 (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
1853 start (match-end 0)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1854 (setq file2 (concat file1 (substring file start)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1855 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1856 ((file-regular-p file2) file2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1857 ((file-regular-p file1) file1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1858 ;; 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
1859 ;; 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
1860 ;; 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
1861 ;; 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
1862 ((not (string= "" file1)) file1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1863 ((not (string= "" file2)) file2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1864 (t nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1865
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1866 (defun idlwave-shell-cleanup ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1867 "Do necessary cleanup for a terminated IDL process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1868 (setq idlwave-shell-step-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1869 idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1870 idlwave-shell-pending-commands nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1871 idlwave-shell-command-line-to-execute nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1872 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
1873 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
1874 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
1875 (idlwave-shell-delete-temp-files)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1876 (idlwave-shell-display-line nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1877 (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
1878 (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
1879 (idlwave-shell-kill-buffer idlwave-shell-bp-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1880 (idlwave-shell-kill-buffer idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1881 ;; (idlwave-shell-kill-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1882 (and (get-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1883 (bury-buffer (get-buffer (idlwave-shell-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1884 (run-hooks 'idlwave-shell-cleanup-hook))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1885
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1886 (defun idlwave-shell-kill-buffer (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1887 "Kill buffer BUF if it exists."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1888 (if (setq buf (get-buffer buf))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1889 (kill-buffer buf)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1890
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1891 (defun idlwave-shell-kill-shell-buffer-confirm ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1892 (when (idlwave-shell-is-running)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1893 (ding)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1894 (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
1895 (error "Abort"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1896 (message "Killing buffer *idl* and the associated process")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1897
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1898 (defun idlwave-shell-window (n)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1899 "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
1900 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
1901 (interactive "P")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1902 (let ((n (if n (prefix-numeric-value n) 0)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1903 (idlwave-shell-send-command
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1904 (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
1905 n idlwave-shell-graphics-window-size)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1906 nil (idlwave-shell-hide-p 'misc) nil t)))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1907
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1908 (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
1909 "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
1910 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
1911 `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
1912 directory."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1913 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1914 (idlwave-shell-send-command idlwave-shell-dirstack-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1915 '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
1916 'hide 'wait))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1917
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1918 (defun idlwave-shell-retall (&optional arg)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1919 "Return from the entire calling stack.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1920 Also get rid of widget events in the queue."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1921 (interactive "P")
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1922 (save-selected-window
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1923 ;;if (widget_info(/MANAGED))[0] gt 0 then for i=0,n_elements(widget_info(/MANAGED))-1 do widget_control,(widget_info(/MANAGED))[i],/clear_events &
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1924 (idlwave-shell-send-command "retall" nil
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1925 (if (idlwave-shell-hide-p 'misc) 'mostly)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1926 nil t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1927 (idlwave-shell-display-line nil)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1928
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1929 (defun idlwave-shell-closeall (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1930 "Close all open files."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1931 (interactive "P")
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1932 (idlwave-shell-send-command "close,/all" nil
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1933 (idlwave-shell-hide-p 'misc) nil t))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1934
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1935 (defun idlwave-shell-quit (&optional arg)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
1936 "Exit the IDL process after confirmation.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1937 With prefix ARG, exit without confirmation."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1938 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1939 (if (not (idlwave-shell-is-running))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1940 (error "Shell is not running")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1941 (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
1942 (condition-case nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1943 (idlwave-shell-send-command "exit")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1944 (error nil)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1945
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1946 (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
1947 "Reset IDL. Return to main level and destroy the leftover variables.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1948 This issues the following commands:
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1949 RETALL
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1950 WIDGET_CONTROL,/RESET
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1951 CLOSE, /ALL
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1952 HEAP_GC, /VERBOSE"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1953 ;; OBJ_DESTROY, OBJ_VALID() FIXME: should this be added?
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1954 (interactive "P")
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
1955 (when (or idlwave-shell-reset-no-prompt
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1956 (yes-or-no-p "Really Reset IDL and discard current session? "))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1957 (message "Resetting IDL")
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1958 (setq idlwave-shell-calling-stack-index 0)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1959 ;; Give widget exit handlers a chance
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1960 (idlwave-shell-send-command "retall" nil hidden)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1961 (idlwave-shell-send-command "widget_control,/reset" nil hidden)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1962 (idlwave-shell-send-command "close,/all" nil hidden)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1963 ;; (idlwave-shell-send-command "obj_destroy, obj_valid()" nil hidden)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1964 (idlwave-shell-send-command "heap_gc,/verbose" nil hidden)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
1965 (idlwave-shell-display-line nil)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1966
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1967 (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
1968 ;; 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
1969 (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
1970 (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
1971 (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
1972 dirs sysdir)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1973 (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
1974 (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
1975 (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
1976 (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
1977 (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
1978 (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
1979 (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
1980 (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
1981
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1982 (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
1983 "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
1984 (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
1985 (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
1986 sep sep-re file type spec specs name cs key keys class entry)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
1987 ;; (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
1988 ;; 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
1989 (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
1990 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
1991 ;; 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
1992 (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
1993 "^>>>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
1994 text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1995 (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
1996 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
1997 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
1998 ;; 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
1999 (setq sep "@" sep-re "@ *" text "")
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2000 (if idlwave-idlwave_routine_info-compiled
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2001 (message
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2002 "Routine Info warning: No match for BEGIN line in \n>>>\n%s\n<<<\n"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2003 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
2004 (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
2005 (setq text (substring text 0 (match-beginning 0)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2006 (if idlwave-idlwave_routine_info-compiled
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2007 (message
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2008 "Routine Info warning: No match for END line in \n>>>\n%s\n<<<\n"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2009 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
2010 ;; 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
2011 (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
2012 (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
2013 (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
2014 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
2015 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
2016 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
2017 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
2018 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
2019 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
2020 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
2021 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
2022 (not (string-match "\\` *\\'" key)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2023 (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
2024 (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
2025 (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
2026 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
2027 file (if (equal file "") nil file)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2028 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
2029 (list (idlwave-sintern-keyword (car x) t))) keys))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2030
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2031 ;; 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
2032 ;; assuming that if the buffer stuff differs, it is a "new"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2033 ;; version, not yet compiled, and should take precedence.
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2034 ;; 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
2035 ;; but I think frequently a user might have several versions of
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2036 ;; the same function in different programs, and in this case the
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2037 ;; compiled one will be the best guess of all versions.
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2038 ;; 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
2039 (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
2040 ((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
2041 ;; 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
2042 (or t (null file)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2043 (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
2044 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
2045 ;; FIXME: is it OK to make the library routines dominate?
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2046 ;;(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
2047 ;; 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
2048 )
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2049 (setq entry (list name 'pro class
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2050 (cons 'compiled
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2051 (if file
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2052 (list
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2053 (file-name-nondirectory file)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2054 (idlwave-sintern-dir
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2055 (file-name-directory file)))))
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2056 cs (cons nil keys)))
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2057 (if file
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2058 (push entry idlwave-compiled-routines)
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2059 (push entry idlwave-unresolved-routines)))
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2060
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2061 ((and (string= type "FUN")
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2062 ;; FIXME: is it OK to make the buffer routines dominate?
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2063 (or t (not file)
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2064 (not (idlwave-rinfo-assq name 'fun class
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2065 idlwave-buffer-routines)))
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2066 ;; FIXME: is it OK to make the library routines dominate?
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2067 ;; (not (idlwave-rinfo-assq name 'fun class
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2068 ;; idlwave-library-routines))
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2069 )
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2070 (setq entry (list name 'fun class
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2071 (cons 'compiled
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2072 (if file
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2073 (list
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2074 (file-name-nondirectory file)
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2075 (idlwave-sintern-dir
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2076 (file-name-directory file)))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2077 cs (cons nil keys)))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2078 (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
2079 (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
2080 (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
2081 ;; 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
2082 (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
2083 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
2084
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2085 (defun idlwave-shell-filter-directory ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2086 "Get the current directory from `idlwave-shell-command-output'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2087 Change the default directory for the process buffer to concur."
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2088 (with-current-buffer (idlwave-shell-buffer)
74103
b21beb03e5c4 (idlwave-shell-filter-directory): Handle extra newlines and spaces.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 71938
diff changeset
2089 (if (string-match ",___cur[\n\r ]+\\([^\n\r]+\\)[\n\r]"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2090 idlwave-shell-command-output)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2091 (let ((dir (substring idlwave-shell-command-output
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2092 (match-beginning 1) (match-end 1))))
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2093 ;; (message "Setting Emacs working dir to %s" dir)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2094 (setq idlwave-shell-default-directory dir)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2095 (setq default-directory (file-name-as-directory dir))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2096
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2097 (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
2098 (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
2099 "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
2100 (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
2101 (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
2102 expression)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2103 (save-excursion
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2104 (goto-char apos)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2105 (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
2106 (catch 'exit
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2107 (while t
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2108 (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
2109 "[^][.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
2110 (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
2111 (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
2112 (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
2113 apos)))
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2114 (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
2115 (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
2116 (idlwave-shell-send-command
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2117 (concat "if obj_valid(" expression ") then print,obj_class("
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2118 expression ")")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2119 '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
2120 'hide 'wait)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2121 ;; 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
2122 (if (and idlwave-shell-get-object-class
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
2123 (not (assoc-string idlwave-shell-get-object-class
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
2124 (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
2125 (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
2126 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
2127
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2128 (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
2129 "Parse the output of the obj_class command."
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2130 (let ((match "obj_class([^\n\r]+[\n\r ]"))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2131 (if (string-match (concat match "\\([A-Za-z_0-9]+\\) *[\n\r]\\("
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2132 idlwave-shell-prompt-pattern "\\)")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2133 idlwave-shell-command-output)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2134 (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
2135 (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
2136
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2137 (defvar idlwave-sint-sysvars nil)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2138 (idlwave-new-sintern-type 'execcomm)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2139
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2140 (defun idlwave-shell-complete (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2141 "Do completion in the idlwave-shell buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2142 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
2143 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
2144 keywords."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2145 (interactive "P")
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2146 (let (exec-cmd)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2147 (cond
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2148 ((and
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2149 (setq exec-cmd (idlwave-shell-executive-command))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2150 (cdr exec-cmd)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2151 (member (upcase (cdr exec-cmd))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2152 '(".R" ".RU" ".RUN" ".RN" ".RNE" ".RNEW"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2153 ".COM" ".COMP" ".COMPI" ".COMPIL" ".COMPILE")))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2154 ;; We are in a command line with an executive command
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2155 (idlwave-shell-complete-filename))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2156
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2157 ((car-safe exec-cmd)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2158 (setq idlwave-completion-help-info
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2159 '(idlwave-shell-complete-execcomm-help))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2160 (idlwave-complete-in-buffer 'execcomm 'execcomm
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2161 idlwave-executive-commands-alist nil
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2162 "Select an executive command"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2163 "system variable"))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2164
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2165 ((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
2166 (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
2167
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2168 ((idlwave-shell-shell-command)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2169 (idlwave-shell-complete-filename))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2170
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2171 ((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
2172 (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
2173 (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
2174 (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
2175 (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
2176 (idlwave-shell-complete-filename))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2177
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2178 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2179 ;; 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
2180 (idlwave-complete arg)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2181
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2182 ;; Get rid of opaque dynamic variable passing of link?
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
2183 (defvar link) ;dynamic variable
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2184 (defun idlwave-shell-complete-execcomm-help (mode word)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2185 (let ((word (or (nth 1 idlwave-completion-help-info) word))
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
2186 (entry (assoc-string word idlwave-executive-commands-alist t)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2187 (cond
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2188 ((eq mode 'test)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2189 (and (stringp word) entry (cdr entry)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2190 ((eq mode 'set)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2191 (if entry (setq link (cdr entry)))) ;; setting dynamic variable!!!
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2192 (t (error "This should not happen")))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2193
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2194 (defun idlwave-shell-complete-filename (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2195 "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
2196 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
2197 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
2198 ;; CWD might have changed, resync, to set default directory
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2199 (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
2200 (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
2201 (comint-dynamic-complete-as-filename)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2202
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2203 (defun idlwave-shell-executive-command ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2204 "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
2205 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2206 (idlwave-beginning-of-statement)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2207 (cons (looking-at "[ \t]*\\.")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2208 (if (looking-at "[ \t]*[.]\\([^ \t\n\r]+\\)[ \t]")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2209 (match-string 1)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2210
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2211 (defun idlwave-shell-filename-string ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2212 "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
2213 (let ((limit (save-excursion (beginning-of-line) (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2214 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2215 ;; Skip backwards over file name chars
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2216 (skip-chars-backward idlwave-shell-file-name-chars limit)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2217 ;; Check of the next char is a string delimiter
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2218 (memq (preceding-char) '(?\' ?\")))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2219
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2220 (defun idlwave-shell-batch-command ()
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2221 "Return t if we're in a batch command statement like @foo"
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2222 (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
2223 (save-excursion
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2224 ;; 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
2225 (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
2226 (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
2227 (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
2228
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2229 (defun idlwave-shell-shell-command ()
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2230 "Return t if we're in a shell command statement like $ls"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2231 (save-excursion
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2232 (idlwave-beginning-of-statement)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2233 (looking-at "\\$")))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2234
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2235 ;; Debugging Commands ------------------------------------------------------
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2236
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2237 (defun idlwave-shell-redisplay (&optional hide)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2238 "Try to resync the display with where execution has stopped.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2239 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
2240 `idlwave-shell-display-line'. Also updates the breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2241 overlays."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2242 (interactive)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2243 (setq idlwave-shell-calling-stack-index 0)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2244 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2245 "help,/trace"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2246 '(idlwave-shell-display-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2247 (idlwave-shell-pc-frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2248 hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2249 (idlwave-shell-bp-query))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2250
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2251 (defun idlwave-shell-display-level-in-calling-stack (&optional hide)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2252 (idlwave-shell-send-command
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2253 "help,/trace"
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2254 `(progn
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2255 ;; 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
2256 (setq idlwave-shell-calling-stack-index
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2257 ,idlwave-shell-calling-stack-index)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2258 ;; 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
2259 (idlwave-shell-parse-stack-and-display))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2260 hide))
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-parse-stack-and-display ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2263 (let* ((lines (delete "" (idlwave-split-string
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2264 idlwave-shell-command-output "^%")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2265 (stack (delq nil (mapcar 'idlwave-shell-parse-line lines)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2266 (nmax (1- (length stack)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2267 (nmin 0) message)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2268 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2269 ((< 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
2270 (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
2271 (ding)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2272 (message "Problem with calling stack"))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2273 ((> idlwave-shell-calling-stack-index nmax)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2274 (ding)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2275 (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
2276 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
2277 (- nmax))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2278 ((< idlwave-shell-calling-stack-index nmin)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2279 (ding)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2280 (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
2281 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
2282 (- nmin)))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2283 (setq idlwave-shell-calling-stack-routine
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2284 (nth 2 (nth idlwave-shell-calling-stack-index stack)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2285
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2286 ;; force edebug for this frame if we're in that mode already
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2287 (idlwave-shell-display-line
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2288 (nth idlwave-shell-calling-stack-index stack) nil
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2289 (if idlwave-shell-electric-debug-mode 'force))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2290 (message "%s" (or message
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2291 (format "In routine %s (stack level %d)"
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2292 idlwave-shell-calling-stack-routine
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2293 (- idlwave-shell-calling-stack-index))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2294
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2295 (defun idlwave-shell-stack-up ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2296 "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
2297 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2298 (incf idlwave-shell-calling-stack-index)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2299 (idlwave-shell-display-level-in-calling-stack 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2300 (defun idlwave-shell-stack-down ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2301 "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
2302 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2303 (decf idlwave-shell-calling-stack-index)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2304 (idlwave-shell-display-level-in-calling-stack 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2305
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2306 (defun idlwave-shell-goto-frame (&optional frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2307 "Set buffer to FRAME with point at the frame line.
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2308 If the optional argument FRAME is nil then `idlwave-shell-pc-frame'
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2309 is used. Does nothing if the resulting frame is nil."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2310 (if frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2311 (setq frame (idlwave-shell-pc-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2312 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2313 (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
2314 (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
2315 (widen)
104543
da8b3e61b182 Use forward-line rather than goto-line.
Glenn Morris <rgm@gnu.org>
parents: 104029
diff changeset
2316 (goto-char (point-min))
da8b3e61b182 Use forward-line rather than goto-line.
Glenn Morris <rgm@gnu.org>
parents: 104029
diff changeset
2317 (forward-line (1- (nth 1 frame))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2318
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2319 (defun idlwave-shell-pc-frame ()
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2320 "Return the frame for IDL execution."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2321 (and idlwave-shell-halt-frame
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2322 (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
2323 (nth 1 idlwave-shell-halt-frame)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2324 (nth 2 idlwave-shell-halt-frame))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2325
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2326 (defun idlwave-shell-valid-frame (frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2327 "Check that frame is for an existing file."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2328 (file-readable-p (car frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2329
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2330 (defun idlwave-shell-stop-line-pending ()
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2331 ;; Temporarily change the color of the stop line overlay
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2332 (if idlwave-shell-stop-line-overlay
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2333 (overlay-put idlwave-shell-stop-line-overlay 'face
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2334 (if idlwave-shell-electric-debug-mode
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2335 'idlwave-shell-pending-electric-stop
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2336 'idlwave-shell-pending-stop))))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2337
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2338 (defvar idlwave-shell-suppress-electric-debug nil)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2339 (defun idlwave-shell-display-line (frame &optional col debug)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2340 "Display frame file in other window with overlay arrow.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2341
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2342 FRAME is a list of file name, line number, and subroutine name. If
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2343 FRAME is nil then remove overlay. If COL is set, move point to that
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2344 column in the line. If DEBUG is non-nil, enable the electric debug
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2345 mode. If it is 'disable, do not enable no matter what the setting of
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2346 `idlwave-shell-automatic-electric-debug'. If it is 'force, enable no
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2347 matter what the settings of that variable."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2348 (if (not frame)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2349 ;; remove stop-line overlay from old position
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2350 (progn
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2351 (setq overlay-arrow-string nil)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2352 (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
2353 (setq idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2354 (if idlwave-shell-stop-line-overlay
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2355 (delete-overlay idlwave-shell-stop-line-overlay))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2356 ;; turn off electric debug everywhere, if it's on
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2357 (idlwave-shell-electric-debug-all-off))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2358 (if (not (idlwave-shell-valid-frame frame))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2359 ;; fixme: errors are dangerous in shell filters. but i think i
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2360 ;; have never encountered this one.
87169
ac7eee19fc7e Improves calls to `error', per mail from RMS.
Deepak Goel <deego@gnufans.org>
parents: 87143
diff changeset
2361 (error "invalid frame - unable to access file: %s" (car frame))
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2362 ;;
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2363 ;; buffer : the buffer to display a line in.
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2364 ;; select-shell: current buffer is the shell.
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2365 ;;
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2366 (setq idlwave-shell-mode-line-info
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2367 (if (nth 2 frame)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2368 (format "[%d:%s]"
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2369 (- idlwave-shell-calling-stack-index)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2370 (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
2371 (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
2372 (select-shell (equal (buffer-name) (idlwave-shell-buffer)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2373 window pos electric)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2374
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2375 ;; first make sure the shell window is visible
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2376 (idlwave-display-buffer (idlwave-shell-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2377 nil (idlwave-shell-shell-frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2378
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2379 ;; now display the buffer and remember which window it is.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2380 (setq window (idlwave-display-buffer buffer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2381 nil (idlwave-shell-source-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2382
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2383 ;; enter the buffer and mark the line
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2384 (with-current-buffer buffer
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2385 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2386 (widen)
104543
da8b3e61b182 Use forward-line rather than goto-line.
Glenn Morris <rgm@gnu.org>
parents: 104029
diff changeset
2387 (goto-char (point-min))
da8b3e61b182 Use forward-line rather than goto-line.
Glenn Morris <rgm@gnu.org>
parents: 104029
diff changeset
2388 (forward-line (1- (nth 1 frame)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2389 (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
2390 (setq idlwave-shell-is-stopped t)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2391
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2392 (if idlwave-shell-stop-line-overlay
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2393 (progn
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2394 ;; restore face and move overlay
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2395 (overlay-put idlwave-shell-stop-line-overlay 'face
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2396 (if idlwave-shell-electric-debug-mode
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2397 idlwave-shell-electric-stop-line-face
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2398 idlwave-shell-stop-line-face))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2399 (move-overlay idlwave-shell-stop-line-overlay
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2400 (point) (save-excursion (end-of-line) (point))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2401 (current-buffer)))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2402 ;; use the arrow instead, but only if marking is wanted.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2403 (if idlwave-shell-mark-stop-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2404 (setq overlay-arrow-string idlwave-shell-overlay-arrow))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2405 (or overlay-arrow-position ; create the marker if necessary
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2406 (setq overlay-arrow-position (make-marker)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2407 (set-marker overlay-arrow-position (point) buffer)))
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
2408
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2409 ;; if the point is outside the restriction, widen the buffer.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2410 (if (or (< pos (point-min)) (> pos (point-max)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2411 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2412 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2413 (goto-char pos)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2414
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2415 ;; if we have the column of the error, move the cursor there.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2416 (if col (move-to-column col))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2417 (setq pos (point))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2418
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2419 ;; enter electric debug mode, if not prohibited and not in
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2420 ;; it already
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2421 (when (and (not idlwave-shell-electric-debug-mode)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2422 (or (eq debug 'force)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2423 (and
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2424 (not (eq debug 'disable)) ;; explicitly disabled
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2425 (or
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2426 (eq idlwave-shell-automatic-electric-debug t)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2427 (and
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2428 (eq idlwave-shell-automatic-electric-debug
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2429 'breakpoint)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2430 (not (eq idlwave-shell-current-state 'error))))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2431 (not idlwave-shell-suppress-electric-debug))))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2432 (idlwave-shell-electric-debug-mode t))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2433 (setq electric idlwave-shell-electric-debug-mode))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2434
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2435 ;; Make sure pos is really displayed in the window.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2436 (set-window-point window pos)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2437
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2438 ;; If we came from the shell, go back there. Otherwise select
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2439 ;; the window where the error/halt is displayed.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2440 (if (or (and idlwave-shell-electric-zap-to-file electric)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2441 (and (equal (buffer-name) (idlwave-shell-buffer))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2442 (not select-shell)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2443 (select-window window))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2444
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2445
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2446 (defun idlwave-shell-step (arg)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2447 "Step one source line.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2448 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
2449 (interactive "p")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2450 (or (not arg) (< arg 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2451 (setq arg 1))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2452 (idlwave-shell-stop-line-pending)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2453 (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
2454 (concat ".s " (if (integerp arg) (int-to-string arg) arg))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2455 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2456
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2457 (defun idlwave-shell-stepover (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2458 "Stepover one source line.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2459 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
2460 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
2461 (interactive "p")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2462 (or (not arg) (< arg 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2463 (setq arg 1))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2464 (idlwave-shell-stop-line-pending)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2465 (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
2466 (concat ".so " (if (integerp arg) (int-to-string arg) arg))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2467 nil (if (idlwave-shell-hide-p 'debug) 'mostly) nil t))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2468
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2469 (defun idlwave-shell-break-here (&optional count cmd condition disabled
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2470 no-show)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2471 "Set breakpoint at current line.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2472
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2473 If COUNT is nil then an ordinary breakpoint is set. We treat a COUNT
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2474 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
2475 than 1 use the IDL AFTER=count keyword to break only after reaching
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2476 the statement COUNT times.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2477
62402
a7e02ef1e3d6 Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents: 60925
diff changeset
2478 Optional argument CMD is a list or function to evaluate upon reaching
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2479 the breakpoint. CONDITION is a break condition, and DISABLED, if
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2480 non-nil disables the breakpoint."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2481 (interactive "P")
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2482 (when (listp count)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2483 (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
2484 (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
2485 (setq count nil))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2486 (idlwave-shell-set-bp
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2487 ;; Create breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2488 (idlwave-shell-bp (idlwave-shell-current-frame)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2489 (list count cmd condition disabled)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2490 (idlwave-shell-current-module))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2491 no-show))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2492
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2493 (defun idlwave-shell-set-bp-check (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2494 "Check for failure to set breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2495 This is run on `idlwave-shell-post-command-hook'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2496 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
2497 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
2498 ;; Scan for message
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2499 (if idlwave-shell-command-output
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2500 (cond
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2501 ((string-match "% BREAKPOINT: *Unable to find code"
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2502 idlwave-shell-command-output)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2503 ;; Offer to recompile
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2504 (if (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2505 (beep)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2506 (y-or-n-p
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2507 (concat "Okay to recompile file "
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2508 (idlwave-shell-bp-get bp 'file) "?")))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2509 ;; Recompile
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2510 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2511 ;; Clean up before retrying
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2512 (idlwave-shell-command-failure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2513 (idlwave-shell-send-command
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2514 (concat ".run \"" (idlwave-shell-bp-get bp 'file) "\"") nil
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2515 (if (idlwave-shell-hide-p 'run) 'mostly) nil t)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2516 ;; Try setting breakpoint again
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2517 (idlwave-shell-set-bp bp))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2518 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2519 (message "Unable to set breakpoint.")
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2520 (idlwave-shell-command-failure))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2521 nil)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2522
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2523 ((string-match "% Syntax error" idlwave-shell-command-output)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2524 (message "Syntax error in condition.")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2525 (idlwave-shell-command-failure)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2526 nil)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2527
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2528 (t 'okay))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2529
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2530 (defun idlwave-shell-command-failure ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2531 "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
2532 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
2533 that detects the failure of a command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2534 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
2535 breakpoint can not be set."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2536 ;; Clear pending commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2537 (setq idlwave-shell-pending-commands nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2538
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2539 (defun idlwave-shell-cont (&optional no-show)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2540 "Continue executing."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2541 (interactive)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2542 (idlwave-shell-stop-line-pending)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2543 (idlwave-shell-send-command ".c" (unless no-show
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2544 '(idlwave-shell-redisplay 'hide))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2545 (if (idlwave-shell-hide-p 'debug) 'mostly)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2546 nil t))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2547
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2548 (defun idlwave-shell-go ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2549 "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
2550 (interactive)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2551 (idlwave-shell-stop-line-pending)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2552 (idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2553 (if (idlwave-shell-hide-p 'debug) 'mostly)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2554 nil t))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2555
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2556 (defun idlwave-shell-return ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2557 "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
2558 (interactive)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2559 (idlwave-shell-stop-line-pending)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2560 (idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2561 (if (idlwave-shell-hide-p 'debug) 'mostly)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2562 nil t))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2563
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2564 (defun idlwave-shell-skip ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2565 "Run .SKIP (skip one line, then step)."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2566 (interactive)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2567 (idlwave-shell-stop-line-pending)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2568 (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2569 (if (idlwave-shell-hide-p 'debug) 'mostly)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2570 nil t))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2571
77472
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
2572 (defun idlwave-shell-clear-bp (bp &optional no-query)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2573 "Clear breakpoint BP.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2574 Clears in IDL and in `idlwave-shell-bp-alist'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2575 (let ((index (idlwave-shell-bp-get bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2576 (if index
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2577 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2578 (idlwave-shell-send-command
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2579 (concat "breakpoint,/clear," (int-to-string index))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2580 nil (idlwave-shell-hide-p 'breakpoint) nil t)
77472
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
2581 (unless no-query (idlwave-shell-bp-query))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2582
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2583 (defun idlwave-shell-current-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2584 "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
2585 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
2586 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2587 ;; In IDL shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2588 (idlwave-shell-pc-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2589 ;; In source
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2590 (list (idlwave-shell-file-name (buffer-file-name))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2591 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2592 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2593 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2594 (beginning-of-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2595 (1+ (count-lines 1 (point))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2596
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2597 (defun idlwave-shell-current-module ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2598 "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
2599 Returns nil if unable to obtain a module name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2600 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2601 ;; In IDL shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2602 (nth 2 idlwave-shell-halt-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2603 ;; In pro file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2604 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2605 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2606 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2607 (if (idlwave-prev-index-position)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2608 (let* ((module (idlwave-what-module))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2609 (name (idlwave-make-full-name (nth 2 module) (car module)))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2610 (type (nth 1 module)))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2611 (list (upcase name) type)))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2612
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2613 (defun idlwave-shell-clear-current-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2614 "Remove breakpoint at current line.
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2615 This command can be called from the shell buffer if IDL is currently
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2616 stopped at a breakpoint."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2617 (interactive)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2618 (let ((bp (idlwave-shell-find-current-bp)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2619 (if bp (idlwave-shell-clear-bp bp))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2620
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2621
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2622 (defun idlwave-shell-toggle-enable-current-bp (&optional bp force
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2623 no-update)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2624 "Disable or enable current breakpoint or a breakpoint passed in BP.
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2625 If FORCE is 'disable or 'enable, for that condition instead of
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2626 toggling. If NO-UPDATE is non-nil, don't update the breakpoint
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2627 list after toggling."
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2628 (interactive)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2629 (let* ((bp (or bp (idlwave-shell-find-current-bp)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2630 (disabled (idlwave-shell-bp-get bp 'disabled)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2631 (cond ((eq force 'disable) (setq disabled nil))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2632 ((eq force 'enable) (setq disabled t)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2633 (when bp
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2634 (setf (nth 3 (cdr (cdr bp))) (not disabled))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2635 (idlwave-shell-send-command
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2636 (concat "breakpoint,"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2637 (if disabled "/enable," "/disable,")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2638 (int-to-string (idlwave-shell-bp-get bp)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2639 nil (idlwave-shell-hide-p 'breakpoint) nil t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2640 (unless no-update (idlwave-shell-bp-query)))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2641
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2642 (defun idlwave-shell-enable-all-bp (&optional enable no-update bpl)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2643 "Disable all breakpoints we know about which need disabling.
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2644 If ENABLE is non-nil, enable them instead."
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2645 (let ((bpl (or bpl idlwave-shell-bp-alist)) disabled modified)
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2646 (while bpl
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2647 (setq disabled (idlwave-shell-bp-get (car bpl) 'disabled))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2648 (when (idlwave-xor (not disabled) (eq enable 'enable))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2649 (idlwave-shell-toggle-enable-current-bp
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2650 (car bpl) (if (eq enable 'enable) 'enable 'disable) no-update)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2651 (push (car bpl) modified))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2652 (setq bpl (cdr bpl)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2653 (unless no-update (idlwave-shell-bp-query))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2654 modified))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2655
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2656 (defun idlwave-shell-to-here ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2657 "Set a breakpoint with count 1 then continue."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2658 (interactive)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2659 ;; temporarily disable all other breakpoints
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2660 (let ((disabled (idlwave-shell-enable-all-bp 'disable 'no-update)))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2661 (idlwave-shell-break-here 1 nil nil nil 'no-show)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2662 (idlwave-shell-cont 'no-show)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2663 (idlwave-shell-enable-all-bp 'enable 'no-update disabled))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2664 (idlwave-shell-redisplay)) ; sync up everything at the end
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2665
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2666 (defun idlwave-shell-break-this-module (&optional arg)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2667 (interactive "P")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2668 (save-excursion
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2669 (idlwave-beginning-of-subprogram)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2670 (idlwave-shell-break-here arg)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2671
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2672 (defun idlwave-shell-break-in ()
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2673 "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
2674 The command looks for an identifier near point and sets a breakpoint
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2675 for the first line of the corresponding module. If MODULE is `t', set
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2676 in the current routine."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2677 (interactive)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2678 (let* ((module (idlwave-fix-module-if-obj_new (idlwave-what-module)))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2679 (type (nth 1 module))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2680 (name (car module))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2681 (class (nth 2 module)))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2682 (if module
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2683 (progn
76864
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2684 (setq module (idlwave-make-full-name class name))
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2685 (idlwave-shell-module-source-query module type)
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2686 (idlwave-shell-set-bp-in-module name type class))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2687 (error "No identifier at point"))))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2688
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2689
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
2690 (defun idlwave-shell-set-bp-in-module (name type class)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2691 "Set breakpoint in module.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2692 Assumes that `idlwave-shell-sources-alist' contains an entry for that module."
76864
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2693 (let* ((module (idlwave-make-full-name class name))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2694 (source-file
76864
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2695 (car-safe (cdr-safe
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2696 (or
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2697 (assoc (upcase module)
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2698 idlwave-shell-sources-alist)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2699 (nth 3 (idlwave-best-rinfo-assoc name type class
76864
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2700 (idlwave-routines)))))))
1064d1d79d3e (idlwave-shell-break-in): Simplify module calc.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76073
diff changeset
2701 buf)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2702 (if (or (not source-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2703 (not (file-regular-p source-file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2704 (not (setq buf
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2705 (or (idlwave-get-buffer-visiting source-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2706 (find-file-noselect source-file)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2707 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2708 (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
2709 module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2710 (beep))
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2711 (with-current-buffer buf
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2712 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2713 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2714 (let ((case-fold-search t))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2715 (if (re-search-forward
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2716 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2717 (downcase module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2718 "[ \t\n,]") nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2719 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2720 (goto-char (match-beginning 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2721 (message "Setting breakpoint for module %s" module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2722 (idlwave-shell-break-here))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2723 (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
2724 (beep))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2725
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2726 (defun idlwave-shell-up ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2727 "Run to end of current block.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2728 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
2729 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2730 (if (idlwave-shell-pc-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2731 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2732 (idlwave-shell-goto-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2733 ;; find end of subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2734 (let ((eos (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2735 (idlwave-beginning-of-subprogram)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2736 (idlwave-forward-block)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2737 (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2738 (idlwave-backward-up-block -1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2739 ;; 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
2740 ;; 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
2741 ;; 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
2742 (idlwave-next-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2743 (idlwave-end-of-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2744 ;; Make sure we are not beyond subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2745 (if (< (point) eos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2746 ;; okay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2747 ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2748 ;; Move back inside subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2749 (goto-char eos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2750 (idlwave-previous-statement))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2751 (idlwave-shell-to-here)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2752
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2753 (defun idlwave-shell-out ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2754 "Attempt to run until this procedure exits.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2755 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
2756 (interactive)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2757 (idlwave-shell-send-command ".o" nil
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2758 (if (idlwave-shell-hide-p 'debug) 'mostly)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2759 nil t))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2760
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2761 (defun idlwave-shell-goto-previous-bp ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2762 "Move to the previous breakpoint in the buffer."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2763 (interactive)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2764 (idlwave-shell-move-to-bp -1))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2765 (defun idlwave-shell-goto-next-bp ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2766 "Move to the next breakpoint in the buffer."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2767 (interactive)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2768 (idlwave-shell-move-to-bp 1))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2769
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2770 (defun idlwave-shell-move-to-bp (dir)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2771 "Move to the next or previous breakpoint, depending on direction DIR."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2772 (let* ((frame (idlwave-shell-current-frame))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2773 (file (car frame))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2774 (orig-bp-line (nth 1 frame))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2775 (bp-alist idlwave-shell-bp-alist)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2776 (orig-func (if (> dir 0) '> '<))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2777 (closer-func (if (> dir 0) '< '>))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2778 bp got-bp bp-line cur-line)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2779 (while (setq bp (pop bp-alist))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2780 (when (string= file (car (car bp)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2781 (setq got-bp 1)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2782 (setq cur-line (nth 1 (car bp)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2783 (if (and
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2784 (funcall orig-func cur-line orig-bp-line)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2785 (or (not bp-line) (funcall closer-func cur-line bp-line)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2786 (setq bp-line cur-line))))
63426
1fca8244172a (idlwave-shell-move-to-bp): Follow error conventions.
Juanma Barranquero <lekktu@gmail.com>
parents: 62772
diff changeset
2787 (unless bp-line (error "No further breakpoints"))
104774
468b7fa34d2c Use forward-line rather than goto-line.
Glenn Morris <rgm@gnu.org>
parents: 104543
diff changeset
2788 (goto-char (point-min))
468b7fa34d2c Use forward-line rather than goto-line.
Glenn Morris <rgm@gnu.org>
parents: 104543
diff changeset
2789 (forward-line (1- bp-line))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2790
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2791 ;; Examine Commands ------------------------------------------------------
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2792
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2793 (defun idlwave-shell-help-expression (arg)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2794 "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
2795 (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
2796 (idlwave-shell-print arg 'help))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2797
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2798 (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
2799 "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
2800 `(lambda (event)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2801 "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
2802 (interactive "e")
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2803 (let* ((drag-track (fboundp 'mouse-drag-track))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2804 (transient-mark-mode t)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2805 (zmacs-regions t)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2806 (tracker (if (featurep 'xemacs)
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2807 (if (fboundp
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2808 'default-mouse-track-event-is-with-button)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2809 'idlwave-xemacs-hack-mouse-track
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2810 'mouse-track)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2811 ;; Emacs 22 no longer completes the drag with
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2812 ;; mouse-drag-region, without an additional
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2813 ;; event. mouse-drag-track does so.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2814 (if drag-track 'mouse-drag-track 'mouse-drag-region))))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2815 (funcall tracker event)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2816 (idlwave-shell-print (if (idlwave-region-active-p) '(4) nil)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2817 ,help ,ev))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2818
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2819 ;; Begin terrible hack section -- XEmacs tests for button2 explicitly
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
2820 ;; on drag events, calling drag-n-drop code if detected. Ughhh...
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2821 (defun idlwave-default-mouse-track-event-is-with-button (event n)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2822 t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2823
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2824 (defun idlwave-xemacs-hack-mouse-track (event)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2825 (if (featurep 'xemacs)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2826 (let ((oldfunc (symbol-function
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2827 'default-mouse-track-event-is-with-button)))
64835
4694417f9930 (idlwave-xemacs-hack-mouse-track): Avoid warnings.
Richard M. Stallman <rms@gnu.org>
parents: 64699
diff changeset
2828 (unwind-protect
4694417f9930 (idlwave-xemacs-hack-mouse-track): Avoid warnings.
Richard M. Stallman <rms@gnu.org>
parents: 64699
diff changeset
2829 (progn
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2830 (fset 'default-mouse-track-event-is-with-button
64835
4694417f9930 (idlwave-xemacs-hack-mouse-track): Avoid warnings.
Richard M. Stallman <rms@gnu.org>
parents: 64699
diff changeset
2831 'idlwave-default-mouse-track-event-is-with-button)
4694417f9930 (idlwave-xemacs-hack-mouse-track): Avoid warnings.
Richard M. Stallman <rms@gnu.org>
parents: 64699
diff changeset
2832 (mouse-track event))
4694417f9930 (idlwave-xemacs-hack-mouse-track): Avoid warnings.
Richard M. Stallman <rms@gnu.org>
parents: 64699
diff changeset
2833 (fset 'default-mouse-track-event-is-with-button oldfunc)))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2834 ;;; End terrible hack section
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2835
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2836 (defun idlwave-shell-mouse-print (event)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2837 "Print value of variable at the mouse position, with `print'."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2838 (interactive "e")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2839 (funcall (idlwave-shell-mouse-examine nil) event))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2840
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2841 (defun idlwave-shell-mouse-help (event)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2842 "Print value of variable at the mouse position, with `help'."
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2843 (interactive "e")
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2844 (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
2845
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2846 (defun idlwave-shell-examine-select (event)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2847 "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
2848 (interactive "e")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2849 (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
2850
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2851 (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
2852 "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
2853 `(lambda ()
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2854 (interactive)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2855 (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
2856
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2857 (defvar idlwave-shell-examine-label nil
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2858 "Label to include with examine text if in a separate buffer.")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2859 (defvar idlwave-shell-examine-completion-list nil)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2860
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2861 (defun idlwave-shell-print (arg &optional help ev complete-help-type)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2862 "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
2863
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2864 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
2865 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
2866
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2867 print,size(___,/DIMENSIONS)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2868
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2869 HELP can also be a cons cell ( NAME . STRING ) in which case NAME will
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2870 be used to label the help print-out.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2871
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2872 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
2873
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2874 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
2875 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
2876 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
2877 parentheses when the open parenthesis is not directly preceded by an
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2878 identifier. If point is at the beginning or within an expression
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2879 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
2880 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
2881
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2882 With prefix arg, or if transient mode set and the region is defined,
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2883 use the current region as the expression.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2884
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2885 With double prefix arg ARG prompt for an expression.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2886
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2887 If EV is a valid event passed, pop-up a list from
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2888 `idlwave-shell-examine-alist' from which to select the help
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2889 command text. If instead COMPLETE-HELP-TYPE is non-nil, choose
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
2890 from `idlwave-shell-examine-alist' via mini-buffer shortcut key."
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2891 (interactive "P")
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2892
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2893 ;; For speed: assume the helper routine hasn't been lost, e.g. with
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2894 ;; .FULL_RESET_SESSION. We'll recover if necessary
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2895 (unless idlwave-idlwave_routine_info-compiled
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2896 (idlwave-shell-compile-helper-routines))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2897 (save-excursion
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2898 (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
2899 (process-mark (if process (process-mark process)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2900 (stack-label
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2901 (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
2902 (> idlwave-shell-calling-stack-index 0))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2903 (format " [-%d:%s]"
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2904 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
2905 idlwave-shell-calling-stack-routine)))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
2906 expr beg end cmd)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2907 (cond
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2908 ((equal arg '(16))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2909 (setq expr (read-string "Expression: ")))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2910 ((and (or arg (idlwave-region-active-p))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2911 (< (- (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
2912 (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
2913 end (region-end)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2914 (t
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
2915 (idlwave-with-special-syntax
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2916 ;; 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
2917 (if (looking-at "\\<\\|(")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2918 ;; 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
2919 ;; 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
2920 (if (looking-at "\\>")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2921 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2922 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2923 (if (looking-at "\\>")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2924 ;; 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
2925 ;; function expression.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2926 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2927 ;; Move to end of expression
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2928 (setq beg (point))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2929 (forward-sexp)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2930 (while (looking-at "\\>[[(]\\|\\.")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2931 ;; an array
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2932 (forward-sexp))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2933 (setq end (point)))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2934
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2935 ;; 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
2936 ;; 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
2937 ;; 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
2938 (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
2939 (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
2940 (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
2941 (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
2942
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2943 ;; 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
2944 (when (and beg end idlwave-shell-expression-overlay)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2945 (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
2946 (current-buffer))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2947 (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
2948 'idlwave-shell-delete-expression-overlay))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2949 (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
2950 'idlwave-shell-delete-output-overlay)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2951
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2952 ;; 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
2953 (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
2954 (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
2955 ;; Concatenate continuation lines
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
2956 (while (string-match "[ \t]*\\$[ \t]*\\(;.*\\)?\\(\n[ \t]*\\|$\\)" expr)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2957 (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
2958 ;; Remove final newline
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
2959 (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
2960 (setq expr (replace-match "" t t expr)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2961
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2962 (catch 'exit
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2963 ;; Pop-up or complete on the examine selection list, if appropriate
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2964 (if (or
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2965 complete-help-type
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2966 (and ev idlwave-shell-examine-alist)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2967 (consp help))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2968 (let ((help-cons
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2969 (if (consp help) help
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2970 (assoc
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2971 ;; A cons from either a pop-up or mini-buffer completion
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2972 (if complete-help-type
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2973 (idlwave-one-key-select 'idlwave-shell-examine-alist
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2974 "Examine with: " 1.5)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2975 ;; (idlwave-completing-read
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2976 ;; "Examine with: "
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2977 ;; idlwave-shell-examine-alist nil nil nil
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2978 ;; 'idlwave-shell-examine-completion-list
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2979 ;; "Print")
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2980 (idlwave-popup-select
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2981 ev
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2982 (mapcar 'car idlwave-shell-examine-alist)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2983 "Examine with"))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2984 idlwave-shell-examine-alist))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2985 (setq help (cdr help-cons))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2986 (if (null help) (throw 'exit nil))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2987 (if idlwave-shell-separate-examine-output
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2988 (setq idlwave-shell-examine-label
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2989 (concat
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2990 (format "==>%s<==\n%s:" expr (car help-cons))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2991 stack-label "\n"))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2992 ;; The regular help label (no popups, cons cells, etc.)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2993 (setq idlwave-shell-examine-label
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2994 (concat
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
2995 (format "==>%s<==\n%s:" expr
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2996 (cond ((null help) "print")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2997 ((stringp help) help)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2998 (t (symbol-name help))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
2999 stack-label "\n")))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3000
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3001 ;; Send the command
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3002 (if stack-label
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3003 (setq expr (idlwave-retrieve-expression-from-level
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3004 expr
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3005 idlwave-shell-calling-stack-index)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3006 (setq cmd (idlwave-shell-help-statement help expr))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3007 ;;(idlwave-shell-recenter-shell-window)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3008 (idlwave-shell-send-command
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3009 cmd
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3010 'idlwave-shell-check-compiled-and-display
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3011 (if idlwave-shell-separate-examine-output 'hide))))))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3012
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3013 (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
3014 "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
3015
58307
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
3016 (defvar idlwave-shell-examine-map (make-sparse-keymap))
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
3017 (define-key idlwave-shell-examine-map "q" 'idlwave-shell-examine-display-quit)
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
3018 (define-key idlwave-shell-examine-map "c" 'idlwave-shell-examine-display-clear)
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
3019
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3020
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3021 (defun idlwave-shell-check-compiled-and-display ()
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3022 "Check examine output for warning about undefined procedure/function."
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3023 (if (string-match "% Attempt to call undefined" idlwave-shell-command-output)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3024 (idlwave-shell-compile-helper-routines))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3025 (if idlwave-shell-separate-examine-output
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3026 (idlwave-shell-examine-display)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3027 (idlwave-shell-examine-highlight)))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3028
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3029 (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
3030 "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
3031 (let (win cur-beg cur-end)
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3032 (with-current-buffer (get-buffer-create "*Examine*")
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3033 (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
3034 (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
3035 (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
3036 (save-restriction
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3037 (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
3038 (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
3039 (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
3040 (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
3041 ;; 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
3042 (let* ((end (or
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3043 (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
3044 (point-max)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3045 (beg (progn
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3046 (goto-char
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3047 (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
3048 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
3049 (match-end 0)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3050 (point-min)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3051 (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
3052 (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
3053 (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
3054 (insert str)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3055 (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
3056 (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
3057 (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
3058 (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
3059 (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
3060 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
3061 (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
3062 (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
3063 (current-buffer))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3064
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3065 ;; 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
3066 ;; 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
3067 ;; 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
3068 ;; 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
3069 (let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3070 (setq win (idlwave-display-buffer
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3071 "*Examine*"
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3072 nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3073 (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
3074 (catch 'exit
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3075 (save-selected-window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3076 (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
3077 (select-window thiswin)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3078 (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
3079 (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
3080 (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
3081 (save-selected-window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3082 (select-window win)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3083 (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
3084 (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
3085 (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
3086 (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
3087 ;; Autosize it.
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3088 (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
3089 (window-height)))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3090 (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
3091 ;; 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
3092 (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
3093 (delq nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3094 (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
3095 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
3096 ;; 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
3097 (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
3098 (setcdr elt (window-height))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3099 (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
3100 (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
3101 ;; 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
3102 (save-selected-window
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3103 (select-window win)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3104 (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
3105 (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
3106 (recenter -1)))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3107
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3108 (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
3109 (interactive)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3110 (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
3111 (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
3112 (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
3113 (delete-window win))))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3114
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3115 (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
3116 (interactive)
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3117 (let ((buf (get-buffer "*Examine*")))
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3118 (when (bufferp buf)
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3119 (with-current-buffer buf
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3120 (let ((inhibit-read-only t))
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3121 (erase-buffer))))))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3122
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3123 (defun idlwave-retrieve-expression-from-level (expr level)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3124 "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
3125
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3126 It does not seem possible to evaluate an expression on a different
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3127 level than the current. Therefore, this function retrieves variables
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3128 by reference from other levels, and then includes that variable in
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3129 place of the chosen one.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3130
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3131 Since this function depends upon the undocumented IDL routine
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3132 routine_names, there is no guarantee that this will work with future
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3133 versions of IDL."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3134 (let ((fetch (- 0 level))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3135 (start 0)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3136 var fetch-start fetch-end pre post)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3137
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3138 ;; 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
3139 ;; 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
3140 ;; 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
3141 ;; 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
3142 ;; function calls, we require that arrays use [] instead of ()
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3143
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3144 (while (string-match
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3145 "\\(\\`\\|[^a-zA-Z0-9$_][ \t]*\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([ \t]*[^a-zA-Z0-9$_]\\|\\'\\)" expr start)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3146 (setq var (match-string 2 expr)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3147 start (match-end 2)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3148 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
3149 post (substring expr (match-end 2)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3150 (cond
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3151 ((or
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3152 ;; Exclude identifiers which are not variables
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3153 (string-match ",[ \t$\n]*/\\'" pre) ;; a `/' KEYWORD
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3154 (and (string-match "[,(][ \t\n]*\\'" pre)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3155 (string-match "\\`[ \t]*=" post)) ;; a `=' KEYWORD
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3156 (string-match "\\`(" post) ;; a function
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3157 (string-match "->[ \t]*\\'" pre) ;; a method
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3158 (string-match "\\.\\'" pre))) ;; structure member
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3159
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3160 ;; Skip over strings
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3161 ((and (string-match "\\([\"\']\\)[^\1]*$" pre)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3162 (string-match (concat "^[^" (match-string 1 pre) "]*"
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3163 (match-string 1 pre)) post))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3164 (setq start (+ start (match-end 0))))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3165
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3166
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3167 ;; seems to be a variable - delimit its name
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3168 (t
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3169 (put-text-property start (- start (length var)) 'fetch t expr))))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3170
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3171 (setq start 0)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3172 (while (setq fetch-start
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3173 (next-single-property-change start 'fetch expr))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3174 (if (get-text-property start 'fetch expr) ; it's on in range
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3175 (setq fetch-end fetch-start ;it's off in range
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3176 fetch-start start)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3177 (setq fetch-end (next-single-property-change fetch-start 'fetch expr)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3178 (unless fetch-end (setq fetch-end (length expr)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3179 (remove-text-properties fetch-start fetch-end '(fetch) expr)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3180 (setq expr (concat (substring expr 0 fetch-start)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3181 (format "(routine_names('%s',fetch=%d))"
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3182 (substring expr fetch-start fetch-end)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3183 fetch)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3184 (substring expr fetch-end)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3185 (setq start fetch-end))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3186 (if (get-text-property 0 'fetch expr) ; Full expression, left over
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3187 (setq expr (format "(routine_names('%s',fetch=%d))" expr fetch)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3188 expr))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3189
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3190
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3191 (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
3192 "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
3193
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3194 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
3195 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
3196 size(___,/DIMENSIONS)"
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3197 (cond
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3198 ((null help)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3199 (concat "idlwave_print_safe, " expr ","
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3200 (number-to-string idlwave-shell-max-print-length)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3201 ((stringp help)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3202 (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
3203 (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
3204 expr
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3205 (substring help (match-end 2)))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3206 (t
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3207 (concat "help, " expr))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3208
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3209
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3210 (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
3211 "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
3212 (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
3213 (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
3214 (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
3215 output-begin output-end)
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3216 (with-current-buffer buffer
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3217 (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
3218 (beginning-of-line)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3219 (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
3220 (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
3221 (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
3222 (setq output-begin (point)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3223
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3224 ;; 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
3225 (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
3226 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
3227 (if (and idlwave-shell-output-overlay process-mark)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3228 (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
3229 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
3230
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3231 (defun idlwave-shell-delete-output-overlay ()
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3232 (unless (or (eq this-command 'idlwave-shell-mouse-nop)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3233 (eq this-command 'handle-switch-frame))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3234 (condition-case nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3235 (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
3236 (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
3237 (error nil))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3238 (remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3239
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3240 (defun idlwave-shell-delete-expression-overlay ()
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3241 (unless (or (eq this-command 'idlwave-shell-mouse-nop)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3242 (eq this-command 'handle-switch-frame))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3243 (condition-case nil
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3244 (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
3245 (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
3246 (error nil))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3247 (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
3248
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3249 (defvar idlwave-shell-bp-alist nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3250 "Alist of breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3251 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
3252
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3253 The car is the `frame' for the breakpoint:
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3254 file - full path file name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3255 line - line number of breakpoint - integer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3256
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3257 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
3258 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
3259 module - the module for breakpoint internal to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3260
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3261 Remaining elements of the cdr:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3262 data - Data associated with the breakpoint by idlwave-shell currently
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3263 contains four items:
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3264
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3265 count - number of times to execute breakpoint. When count reaches 0
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3266 the breakpoint is cleared and removed from the alist.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3267
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3268 command - command to execute when breakpoint is reached, either a
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3269 lisp function to be called with `funcall' with no arguments or a
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3270 list to be evaluated with `eval'.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3271
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3272 condition - any condition to apply to the breakpoint.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3273
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3274 disabled - whether the bp is disabled.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3275
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3276 (defun idlwave-shell-run-region (beg end &optional n)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3277 "Compile and run the region using the IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3278 Copies the region to a temporary file `idlwave-shell-temp-pro-file'
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3279 and issues the IDL .run command for the file. Because the region
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3280 is compiled and run as a main program there is no problem with
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3281 begin-end blocks extending over multiple lines - which would be
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3282 a problem if `idlwave-shell-evaluate-region' was used.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3283 An END statement is appended to the region if necessary.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3284
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3285 If there is a prefix argument, display IDL process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3286 (interactive "r\nP")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3287 (let ((oldbuf (current-buffer)))
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3288 (with-current-buffer (idlwave-find-file-noselect
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3289 (idlwave-shell-temp-file 'pro) 'tmp)
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3290 (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
3291 (set (make-local-variable 'comment-start) ";")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3292 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3293 (insert-buffer-substring oldbuf beg end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3294 (if (not (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3295 (idlwave-previous-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3296 (idlwave-look-at "\\<end\\>")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3297 (insert "\nend\n"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3298 (save-buffer 0)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3299 (idlwave-shell-send-command (concat ".run \""
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3300 idlwave-shell-temp-pro-file "\"")
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3301 nil
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3302 (if (idlwave-shell-hide-p 'run) 'mostly)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3303 nil t)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3304 (if n
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3305 (idlwave-display-buffer (idlwave-shell-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3306 nil (idlwave-shell-shell-frame))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3307
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3308 (defun idlwave-shell-evaluate-region (beg end &optional n)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3309 "Send region to the IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3310 If there is a prefix argument, display IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3311 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
3312 `idlwave-shell-run-region' for this."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3313 (interactive "r\nP")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3314 (idlwave-shell-send-command (buffer-substring beg end))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3315 (if n
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3316 (idlwave-display-buffer (idlwave-shell-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3317 nil (idlwave-shell-shell-frame))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3318
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3319 (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
3320 "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
3321 (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
3322 (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
3323 (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
3324 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
3325 (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
3326 (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
3327 (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
3328 (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
3329 (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
3330 (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
3331 (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
3332 (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
3333
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3334 (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
3335 (if (featurep 'xemacs)
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3336 ;; 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
3337 (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
3338 ;; 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
3339 (let ((this-frame (selected-frame)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3340 (save-excursion ;; make sure we end up in the same buffer
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3341 (if (frame-live-p frame)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3342 (select-frame frame))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3343 (if (eq this-frame (selected-frame))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3344 ;; same frame: use display buffer, to make sure the current
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3345 ;; window stays.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3346 (display-buffer buf)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3347 ;; different frame
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3348 (if (one-window-p)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3349 ;; only window: switch
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3350 (progn
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3351 (switch-to-buffer buf)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3352 (selected-window)) ; must return the window.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3353 ;; several windows - use display-buffer
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3354 (display-buffer buf not-this-window-p)))))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3355 ; (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
3356 ; (display-buffer buf not-this-window-p frame))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3357
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3358 (defvar idlwave-shell-bp-buffer " *idlwave-shell-bp*"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3359 "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
3360
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3361 (defun idlwave-shell-bp-query (&optional no-show)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3362 "Reconcile idlwave-shell's breakpoint list with IDL's.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3363 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
3364 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3365 (idlwave-shell-send-command idlwave-shell-bp-query
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3366 `(progn
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3367 (idlwave-shell-filter-bp (quote ,no-show)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3368 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3369
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3370 (defun idlwave-shell-bp-get (bp &optional item)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3371 "Get a value for a breakpoint.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3372 BP has the form of elements in `idlwave-shell-bp-alist'.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3373 Optional second arg ITEM is the particular value to retrieve.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3374 ITEM can be 'file, 'line, 'index, 'module, 'count, 'cmd,
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3375 'condition, 'disabled, 'type, or 'data. 'data returns a list
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3376 of 'count, 'cmd and 'condition. Defaults to 'index."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3377 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3378 ;; Frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3379 ((eq item 'line) (nth 1 (car bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3380 ((eq item 'file) (nth 0 (car bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3381 ;; idlwave-shell breakpoint data
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3382 ((eq item 'data) (cdr (cdr bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3383 ((eq item 'count) (nth 0 (cdr (cdr bp))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3384 ((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
3385 ((eq item 'condition) (nth 2 (cdr (cdr bp))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3386 ((eq item 'disabled) (nth 3 (cdr (cdr bp))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3387 ;; IDL breakpoint info
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3388 ((eq item 'module)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3389 (let ((module (nth 1 (car (cdr bp)))))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3390 (if (listp module) (car module) module)))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3391 ((eq item 'type)
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3392 (let ((module (nth 1 (car (cdr bp)))))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3393 (if (listp module) (nth 1 module))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3394 ;; index - default
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3395 (t (nth 0 (car (cdr bp))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3396
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3397 (defun idlwave-shell-filter-bp (&optional no-show)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3398 "Get the breakpoints from `idlwave-shell-command-output'.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3399 Create `idlwave-shell-bp-alist' updating breakpoint count and command
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3400 data from previous breakpoint list. If NO-SHOW is set, don't update
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3401 the breakpoint overlays."
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3402 (with-current-buffer (get-buffer-create idlwave-shell-bp-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3403 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3404 (insert idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3405 (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
3406 (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
3407 ;; Searching the breakpoints
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3408 ;; 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
3409 (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)")
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3410 (bp-re55
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3411 (concat
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3412 "^\\s-*\\([0-9]+\\)" ; 1 index
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3413 "\\s-+\\([0-9]+\\)" ; 2 line number
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3414 "\\s-+\\(Uncompiled\\|" ; 3-6 either uncompiled or routine name
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3415 "\\(\\(Func=\\|Pro=\\)\\(\\$?[a-zA-Z][a-zA-Z0-9$_:]*\\$?\\)\\)\\)"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3416 "\\(\\s-*,\\s-*After=[0-9]+/\\([0-9]+\\)?\\)?" ; 7-8 After part
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3417 "\\(\\s-*,\\s-*\\(BreakOnce\\)\\)?" ; 9-10 BreakOnce
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3418 "\\(\\s-*,\\s-*\\(Condition='\\(.*\\)'\\)\n?\\)?" ; 11-13 Condition
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3419 "\\(\\s-*,\\s-*\\(Disabled\\)\n?\\)?" ; 14-15 Disabled
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3420 "\\s-+\\(\\S-+\\)")) ; 16 File name
47915
f1ce118178c3 (idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents: 47453
diff changeset
3421 file line index module
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3422 count condition disabled
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3423 bp-re indmap)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3424 (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
3425 ;; Search for either header type, and set the correct regexp
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3426 (when (or
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3427 (if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3428 (setq bp-re bp-re54 ; versions <= 5.4
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3429 indmap '(1 2 3 4))) ;index module line file
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3430 (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
3431 "^\\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
3432 (setq bp-re bp-re55 ; versions >= 5.5
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3433 indmap '(1 6 2 16)))) ; index module line file
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3434 ;; There seems to be a breakpoint listing here, parse breakpoint lines.
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3435 (while (re-search-forward bp-re nil t)
62402
a7e02ef1e3d6 Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents: 60925
diff changeset
3436 (setq index (string-to-number (match-string (nth 0 indmap)))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3437 module (match-string (nth 1 indmap))
62402
a7e02ef1e3d6 Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents: 60925
diff changeset
3438 line (string-to-number (match-string (nth 2 indmap)))
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3439 file (idlwave-shell-file-name (match-string (nth 3 indmap))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3440 (if (eq bp-re bp-re55)
85220
5d24da5e0deb (idlwave-shell-filter-bp, top level): Use mapc rather than mapcar.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
3441 (setq count (if (match-string 10) 1
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3442 (if (match-string 8)
62402
a7e02ef1e3d6 Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents: 60925
diff changeset
3443 (string-to-number (match-string 8))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3444 condition (match-string 13)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3445 disabled (not (null (match-string 15)))))
85220
5d24da5e0deb (idlwave-shell-filter-bp, top level): Use mapc rather than mapcar.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
3446
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3447 ;; 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
3448 (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
3449 (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
3450 (list
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
3451 (list index module)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3452 ;; bp data: count, command, condition, disabled
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3453 count nil condition disabled))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3454 (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3455 ;; Update breakpoint data
85220
5d24da5e0deb (idlwave-shell-filter-bp, top level): Use mapc rather than mapcar.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
3456 (if (eq bp-re bp-re54)
5d24da5e0deb (idlwave-shell-filter-bp, top level): Use mapc rather than mapcar.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
3457 (mapc 'idlwave-shell-update-bp old-bp-alist)
5d24da5e0deb (idlwave-shell-filter-bp, top level): Use mapc rather than mapcar.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
3458 (mapc 'idlwave-shell-update-bp-command-only old-bp-alist))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3459 ;; Update the breakpoint overlays
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3460 (unless no-show (idlwave-shell-update-bp-overlays))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3461 ;; Return the new list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3462 idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3463
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3464 (defun idlwave-shell-update-bp-command-only (bp)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3465 (idlwave-shell-update-bp bp t))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3466
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3467 (defun idlwave-shell-update-bp (bp &optional command-only)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3468 "Update BP data in breakpoint list.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3469 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
3470 (let ((match (assoc (car bp) idlwave-shell-bp-alist)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3471 (if match
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3472 (if command-only
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3473 (setf (nth 1 (cdr (cdr match))) (nth 1 (cdr (cdr match))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3474 (setcdr (cdr match) (cdr (cdr bp)))))))
27107
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 (defun idlwave-shell-set-bp-data (bp data)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3477 "Set the data of BP to DATA."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3478 (setcdr (cdr bp) data))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3479
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3480 (defun idlwave-shell-bp (frame &optional data module)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3481 "Create a breakpoint structure containing FRAME and DATA.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3482 Second and third args, DATA and MODULE, are optional. Returns
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3483 a breakpoint of the format used in `idlwave-shell-bp-alist'.
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3484 Can be used in commands attempting match a breakpoint in
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3485 `idlwave-shell-bp-alist'."
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3486 (cons frame ;; (file line)
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3487 (cons (list nil module) ;; (index_id (module type) | module)
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3488 data))) ;; (count command condition disabled)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3489
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3490 (defvar idlwave-shell-old-bp nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3491 "List of breakpoints previous to setting a new breakpoint.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3492
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3493 (defun idlwave-shell-sources-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3494 "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
3495 If an equivalency is found, return the IDL internal source name.
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3496 Otherwise return the filename in BP."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3497 (let*
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3498 ((bp-file (idlwave-shell-bp-get bp 'file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3499 (bp-module (idlwave-shell-bp-get bp 'module))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3500 (internal-file-list
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3501 (if bp-module
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3502 (cdr (assoc bp-module idlwave-shell-sources-alist)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3503 (if (and internal-file-list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3504 (equal bp-file (nth 0 internal-file-list)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3505 (nth 1 internal-file-list)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3506 bp-file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3507
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3508 (defun idlwave-shell-set-bp (bp &optional no-show)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3509 "Try to set a breakpoint BP.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3510 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
3511 line specified by BP or at the next IDL statement if that line is not
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3512 a statement. Determines IDL's internal representation for the
58307
8e5e564777ba Re-applied diff 3.26->3.27, variable reorganization.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58297
diff changeset
3513 breakpoint, which may have occurred at a different line than
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3514 specified. If NO-SHOW is non-nil, don't do any updating."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3515 ;; Get and save the old breakpoints
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3516 (idlwave-shell-send-command
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3517 idlwave-shell-bp-query
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3518 `(progn
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3519 (idlwave-shell-filter-bp (quote ,no-show))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3520 (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
3521 'hide)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3522
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3523 ;; Get sources for this routine in the sources list
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3524 (idlwave-shell-module-source-query (idlwave-shell-bp-get bp 'module)
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3525 (idlwave-shell-bp-get bp 'type))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3526 (let*
76073
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3527 ((count (idlwave-shell-bp-get bp 'count))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3528 (condition (idlwave-shell-bp-get bp 'condition))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3529 (disabled (idlwave-shell-bp-get bp 'disabled))
76073
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3530 (key (concat (if (and count (numberp count))
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3531 (cond
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3532 ((= count 1) ",/once")
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3533 ((> count 1) (format ",after=%d" count))))
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3534 (if condition (concat ",CONDITION=\"" condition "\""))
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3535 ;; IDL can't simultaneously set a condition/count
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3536 ;; and disable a breakpoint, but it does keep both
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3537 ;; of these when resetting the same BP. We assume
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3538 ;; DISABLE and CONDITION/COUNT are not set
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3539 ;; together for a newly created breakpoint.
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3540 (if (and disabled (not condition) (not count))
9c80ddcdba82 (idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76070
diff changeset
3541 ",/DISABLE")))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3542 (line (idlwave-shell-bp-get bp 'line)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3543 (idlwave-shell-send-command
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3544 (concat "breakpoint,'"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3545 (idlwave-shell-sources-bp bp) "',"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3546 (if (integerp line) (setq line (int-to-string line)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3547 key)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3548 ;; Check for failure and adjust breakpoint to match IDL's list
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
3549 `(progn
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3550 (if (idlwave-shell-set-bp-check (quote ,bp))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3551 (idlwave-shell-set-bp-adjust (quote ,bp) (quote ,no-show))))
47440
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3552 ;; hide output?
0e5a022947e9 Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 47262
diff changeset
3553 (idlwave-shell-hide-p 'breakpoint)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3554 'preempt t)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3555
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3556 (defun idlwave-shell-set-bp-adjust (bp &optional no-show)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3557 "Find the breakpoint in IDL's internal list of breakpoints."
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3558 (idlwave-shell-send-command
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3559 idlwave-shell-bp-query
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3560 `(progn
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3561 (idlwave-shell-filter-bp 'no-show)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3562 (idlwave-shell-new-bp (quote ,bp))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3563 (unless (quote ,no-show)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3564 (idlwave-shell-update-bp-overlays)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3565 'hide
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3566 'preempt))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3567
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3568 (defun idlwave-shell-find-bp (frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3569 "Return breakpoint from `idlwave-shell-bp-alist' for frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3570 Returns nil if frame not found."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3571 (assoc frame idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3572
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3573 (defun idlwave-shell-find-current-bp ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3574 "Find breakpoint here, or at halt location."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3575 (let ((bp (idlwave-shell-find-bp (idlwave-shell-current-frame))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3576 (when (not bp)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3577 ;; Try moving to beginning of halted-at statement
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3578 (save-excursion
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3579 (idlwave-shell-goto-frame)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3580 (idlwave-beginning-of-statement)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3581 (setq bp (idlwave-shell-find-bp (idlwave-shell-current-frame))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3582 (unless bp
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3583 (beep)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3584 (message "Cannot identify breakpoint for this line")))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3585 bp))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3586
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3587 (defun idlwave-shell-new-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3588 "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
3589 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
3590 the line number used with the IDL breakpoint command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3591 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
3592 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
3593 (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
3594 (bpl idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3595 (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
3596 (setq bpl (cdr bpl))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3597 (if (and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3598 (not bpl)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3599 ;; No additional breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3600 ;; 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
3601 (setq bpl (assoc (car bp) idlwave-shell-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3602 (setq bpl (list bpl)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3603 (if (and bpl
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3604 (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
3605 (idlwave-shell-bp-get bp 'file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3606 ;; Got the breakpoint - add count, command to it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3607 ;; 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
3608 ;; not done for bpl.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3609 (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
3610 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3611 (message "Failed to identify breakpoint in IDL"))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3612
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3613 (defvar idlwave-shell-bp-overlays nil
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3614 "Alist of overlays marking breakpoints.")
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
3615 (defvar idlwave-shell-bp-glyph)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3616
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3617 (defvar idlwave-shell-debug-line-map (make-sparse-keymap))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3618 (define-key idlwave-shell-debug-line-map
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3619 (if (featurep 'xemacs) [button3] [mouse-3])
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3620 'idlwave-shell-mouse-active-bp)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3621
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3622 (defun idlwave-shell-update-bp-overlays ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3623 "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
3624 Existing overlays are recycled, in order to minimize consumption."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3625 (when idlwave-shell-mark-breakpoints
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3626 (let ((ov-alist (copy-alist idlwave-shell-bp-overlays))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3627 (bp-list idlwave-shell-bp-alist)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3628 (use-glyph (and (memq idlwave-shell-mark-breakpoints '(t glyph))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3629 idlwave-shell-bp-glyph))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3630 ov ov-list bp buf old-buffers win)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3631
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3632 ;; Delete the old overlays from their buffers
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3633 (if ov-alist
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3634 (while (setq ov-list (pop ov-alist))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3635 (while (setq ov (pop (cdr ov-list)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3636 (add-to-list 'old-buffers (overlay-buffer ov))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3637 (delete-overlay ov))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3638
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3639 (setq ov-alist idlwave-shell-bp-overlays
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3640 idlwave-shell-bp-overlays
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3641 (if idlwave-shell-bp-glyph
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3642 (mapcar 'list (mapcar 'car idlwave-shell-bp-glyph))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3643 (list (list 'bp))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3644 (while (setq bp (pop bp-list))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3645 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3646 (idlwave-shell-goto-frame (car bp))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3647 (let* ((end (progn (end-of-line 1) (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3648 (beg (progn (beginning-of-line 1) (point)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3649 (condition (idlwave-shell-bp-get bp 'condition))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3650 (count (idlwave-shell-bp-get bp 'count))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3651 (disabled (idlwave-shell-bp-get bp 'disabled))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3652 (type (if idlwave-shell-bp-glyph
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3653 (cond
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3654 (condition 'bp-cond )
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3655 (count
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3656 (cond
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3657 ((<= count 0) 'bp)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3658 ((<= count 4)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3659 (intern
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3660 (concat "bp-" (number-to-string count))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3661 (t 'bp-n)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3662 (t 'bp))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3663 'bp))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3664 (help-list
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3665 (delq nil
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3666 (list
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3667 (if count
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3668 (concat "after:" (int-to-string count)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3669 (if condition
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3670 (concat "condition:" condition))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3671 (if disabled "disabled"))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3672 (help-text (concat
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3673 "BP "
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3674 (int-to-string (idlwave-shell-bp-get bp))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3675 (if help-list
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3676 (concat
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3677 " - "
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3678 (mapconcat 'identity help-list ", ")))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3679 (if (and (not count) (not condition))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3680 " (use mouse-3 for breakpoint actions)")))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3681 (full-type (if disabled
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3682 (intern (concat (symbol-name type)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3683 "-disabled"))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3684 type))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3685 (ov-existing (assq full-type ov-alist))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3686 (ov (or (and (cdr ov-existing)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3687 (pop (cdr ov-existing)))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3688 (idlwave-shell-make-new-bp-overlay type disabled)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3689 match)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3690 (if idlwave-shell-breakpoint-popup-menu
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3691 (overlay-put ov 'help-echo help-text))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3692 (move-overlay ov beg end)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3693 (if (setq match (assq full-type idlwave-shell-bp-overlays))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3694 (push ov (cdr match))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3695 (nconc idlwave-shell-bp-overlays
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3696 (list (list full-type ov)))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3697 ;; Take care of margins if using a glyph
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3698 (when use-glyph
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3699 (if old-buffers
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3700 (setq old-buffers (delq (current-buffer) old-buffers)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3701 (if (fboundp 'set-specifier) ;; XEmacs
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3702 (set-specifier left-margin-width (cons (current-buffer) 2))
77472
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3703 (if (< left-margin-width 2)
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3704 (setq left-margin-width 2)))
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3705 (let ((window (get-buffer-window (current-buffer) 0)))
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3706 (if window
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3707 (set-window-margins
77472
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3708 window left-margin-width right-margin-width))))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3709 (if use-glyph
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3710 (while (setq buf (pop old-buffers))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3711 (with-current-buffer buf
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3712 (if (fboundp 'set-specifier) ;; XEmacs
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3713 (set-specifier left-margin-width (cons (current-buffer) 0))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3714 (setq left-margin-width 0))
77472
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3715 (let ((window (get-buffer-window buf 0)))
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3716 (if window
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3717 (set-window-margins
77472
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
3718 window left-margin-width right-margin-width)))))))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3719
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3720 (defun idlwave-shell-make-new-bp-overlay (&optional type disabled)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3721 "Make a new overlay for highlighting breakpoints.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3722
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3723 This stuff is strongly dependant upon the version of Emacs. If TYPE
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3724 is passed, make an overlay of that type ('bp or 'bp-cond, currently
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3725 only for glyphs)."
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3726 (let ((ov (make-overlay 1 1))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3727 (use-glyph (and (memq idlwave-shell-mark-breakpoints '(t glyph))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3728 idlwave-shell-bp-glyph))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3729 (type (or type 'bp))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3730 (face (if disabled
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3731 idlwave-shell-disabled-breakpoint-face
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3732 idlwave-shell-breakpoint-face)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3733 (if (featurep 'xemacs)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3734 ;; This is XEmacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3735 (progn
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3736 (when idlwave-shell-breakpoint-popup-menu
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3737 (set-extent-property ov 'mouse-face 'highlight)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3738 (set-extent-property ov 'keymap idlwave-shell-debug-line-map))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3739
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3740 (cond
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3741 ;; tty's cannot display glyphs
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3742 ((eq (console-type) 'tty)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3743 (set-extent-property ov 'face face))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3744
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3745 ;; use the glyph
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3746 (use-glyph
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3747 (let ((glyph (cdr (assq type idlwave-shell-bp-glyph))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3748 (if disabled (setq glyph (car glyph)) (setq glyph (nth 1 glyph)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3749 (set-extent-property ov 'begin-glyph glyph)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3750 (set-extent-property ov 'begin-glyph-layout 'outside-margin)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3751
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3752 ;; use the face
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3753 (idlwave-shell-mark-breakpoints
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3754 (set-extent-property ov 'face face))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3755
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3756 ;; no marking
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3757 (t nil))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3758 (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
3759 ;; This is Emacs
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3760 (when idlwave-shell-breakpoint-popup-menu
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3761 (overlay-put ov 'mouse-face 'highlight)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3762 (overlay-put ov 'keymap idlwave-shell-debug-line-map))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3763 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3764 (window-system
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3765 (if use-glyph
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3766 (let ((image-props (cdr (assq type idlwave-shell-bp-glyph)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3767 string)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3768
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3769 (if disabled (setq image-props
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3770 (append image-props
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3771 (list :conversion 'disabled))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3772 (setq string
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3773 (propertize "@"
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3774 'display
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3775 (list (list 'margin 'left-margin)
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3776 image-props)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3777 (overlay-put ov 'before-string string))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3778 ;; just the face
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3779 (overlay-put ov 'face face)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3780
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3781 ;; use a face
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3782 (idlwave-shell-mark-breakpoints
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3783 (overlay-put ov 'face face))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3784
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3785 ;; No marking
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3786 (t nil)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3787 ov))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3788
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3789 (defun idlwave-shell-mouse-active-bp (ev)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3790 "Does right-click mouse action on breakpoint lines."
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3791 (interactive "e")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3792 (if ev (mouse-set-point ev))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3793 (let ((bp (idlwave-shell-find-bp (idlwave-shell-current-frame)))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3794 index condition count select cmd disabled)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3795 (unless bp
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3796 (error "Breakpoint not found"))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3797 (setq index (int-to-string (idlwave-shell-bp-get bp))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3798 condition (idlwave-shell-bp-get bp 'condition)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3799 cmd (idlwave-shell-bp-get bp 'cmd)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3800 count (idlwave-shell-bp-get bp 'count)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3801 disabled (idlwave-shell-bp-get bp 'disabled))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3802 (setq select (idlwave-popup-select
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3803 ev
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3804 (delq nil
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3805 (list (if disabled "Enable" "Disable")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3806 "Clear"
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3807 "Clear All"
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3808 (if condition "Remove Condition" "Add Condition")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3809 (if condition "Change Condition")
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3810 (if count "Remove Repeat Count"
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3811 "Add Repeat Count")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3812 (if count "Change Repeat Count")))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3813 (concat "BreakPoint " index)))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3814 (if select
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3815 (cond
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3816 ((string-equal select "Clear All")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3817 (idlwave-shell-clear-all-bp))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3818 ((string-equal select "Clear")
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3819 (idlwave-shell-clear-current-bp))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3820 ((string-match "Condition" select)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3821 (idlwave-shell-break-here count cmd
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3822 (if (or (not condition)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3823 (string-match "Change" select))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3824 (read-string "Break Condition: "))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3825 disabled))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3826 ((string-match "Count" select)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3827 (idlwave-shell-break-here (if (or (not count)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3828 (string-match "Change" select))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3829 (string-to-number
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3830 (read-string "Break After Count: ")))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3831 cmd condition disabled))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3832 ((string-match "able$" select)
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3833 (idlwave-shell-toggle-enable-current-bp))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3834 (t
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3835 (message "Unimplemented: %s" select))))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3836
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3837 (defun idlwave-shell-edit-default-command-line (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3838 "Edit the current execute command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3839 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3840 (setq idlwave-shell-command-line-to-execute
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3841 (read-string "IDL> " idlwave-shell-command-line-to-execute)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3842
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3843 (defun idlwave-shell-execute-default-command-line (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3844 "Execute a command line. On first use, ask for the command.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3845 Also with prefix arg, ask for the command. You can also use the command
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3846 `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
3847 (interactive "P")
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3848 (cond
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3849 ((equal arg '(16))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3850 (setq idlwave-shell-command-line-to-execute nil))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3851 ((equal arg '(4))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3852 (setq idlwave-shell-command-line-to-execute
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3853 (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
3854 (idlwave-shell-reset 'hidden)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3855 (idlwave-shell-send-command
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3856 (or idlwave-shell-command-line-to-execute
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3857 (with-current-buffer (idlwave-shell-buffer)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3858 (ring-ref comint-input-ring 0)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3859 '(idlwave-shell-redisplay 'hide)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3860
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3861 (defun idlwave-shell-save-and-run ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3862 "Save file and run it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3863 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
3864 When called from the shell buffer, re-run the file which was last handled by
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3865 one of the save-and-.. commands."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3866 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3867 (idlwave-shell-save-and-action 'run))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3868
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3869 (defun idlwave-shell-save-and-compile ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3870 "Save file and run it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3871 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
3872 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
3873 one of the save-and-.. commands."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3874 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3875 (idlwave-shell-save-and-action 'compile))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3876
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3877 (defun idlwave-shell-save-and-batch ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3878 "Save file and batch it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3879 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
3880 When called from the shell buffer, re-batch the file which was last handled by
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3881 one of the save-and-.. commands."
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3882 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3883 (idlwave-shell-save-and-action 'batch))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3884
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3885 (defun idlwave-shell-save-and-action (action)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3886 "Save file and compile it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3887 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
3888 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
3889 handled by this command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3890 ;; Remove the stop overlay.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3891 (if idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3892 (delete-overlay idlwave-shell-stop-line-overlay))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3893 (if idlwave-shell-is-stopped
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3894 (idlwave-shell-electric-debug-all-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
3895 (setq idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3896 (setq overlay-arrow-string nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3897 (let (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3898 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3899 ((eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3900 (save-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3901 (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
3902 (idlwave-shell-last-save-and-action-file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3903 (if (setq buf (idlwave-get-buffer-visiting
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3904 idlwave-shell-last-save-and-action-file))
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3905 (with-current-buffer buf
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3906 (save-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3907 (t (setq idlwave-shell-last-save-and-action-file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3908 (read-file-name "File: ")))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3909 (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
3910 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3911 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3912 (concat (cond ((eq action 'run) ".run ")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3913 ((eq action 'compile) ".compile ")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3914 ((eq action 'batch) "@")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3915 (t (error "Unknown action %s" action)))
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3916 "\""
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3917 idlwave-shell-last-save-and-action-file
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3918 "\"")
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3919 `(idlwave-shell-maybe-update-routine-info nil
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3920 ,idlwave-shell-last-save-and-action-file)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
3921 (if (idlwave-shell-hide-p 'run) 'mostly) nil t)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3922 (idlwave-shell-bp-query))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3923 (let ((msg (format "No such file %s"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3924 idlwave-shell-last-save-and-action-file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3925 (setq idlwave-shell-last-save-and-action-file nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3926 (error msg))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3927
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3928 (defun idlwave-shell-maybe-update-routine-info (&optional wait 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
3929 "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
3930 (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
3931 (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
3932 (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
3933 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
3934 idlwave-routines)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
3935 (idlwave-shell-update-routine-info t nil wait 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
3936
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
3937 (defvar idlwave-shell-sources-query "help,/source,/full"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3938 "IDL command to obtain source files for compiled procedures.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3939
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3940 (defvar idlwave-shell-sources-alist nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3941 "Alist of IDL procedure names and compiled source files.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3942 Elements of the alist have the form:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3943
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3944 (module name . (source-file-truename idlwave-internal-filename))")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3945
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3946 (defun idlwave-shell-module-source-query (module &optional type)
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3947 "Determine the source file for a given module.
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3948 Query as a function if TYPE set to something beside 'pro."
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3949 (if module
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3950 (idlwave-shell-send-command
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3951 (format "print,(routine_info('%s',/SOURCE%s)).PATH" module
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3952 (if (eq type 'pro) "" ",/FUNCTIONS"))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3953 `(idlwave-shell-module-source-filter ,module)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3954 'hide 'wait)))
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3955
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3956 (defun idlwave-shell-module-source-filter (module)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3957 "Get module source, and update `idlwave-shell-sources-alist'."
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3958 (let ((old (assoc (upcase module) idlwave-shell-sources-alist))
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3959 filename)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3960 (when (string-match "\.PATH *[\n\r]\\([^%][^\r\n]+\\)[\n\r]"
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3961 idlwave-shell-command-output)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3962 (setq filename (substring idlwave-shell-command-output
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3963 (match-beginning 1) (match-end 1)))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3964 (if old
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3965 (setcdr old (list (idlwave-shell-file-name filename) filename))
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3966 (setq idlwave-shell-sources-alist
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3967 (append idlwave-shell-sources-alist
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3968 (list (cons (upcase module)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3969 (list (idlwave-shell-file-name filename)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
3970 filename)))))))))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
3971
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3972 (defun idlwave-shell-sources-query ()
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3973 "Determine source files for all IDL compiled procedures.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3974 Queries IDL using the string in `idlwave-shell-sources-query'."
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
3975 (interactive)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3976 (idlwave-shell-send-command idlwave-shell-sources-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3977 'idlwave-shell-sources-filter
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3978 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3979
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3980 (defun idlwave-shell-sources-filter ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3981 "Get source files from `idlwave-shell-sources-query' output.
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3982 Create `idlwave-shell-sources-alist' consisting of list elements
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3983 of the form:
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
3984 (module name . (source-file-truename idlwave-internal-filename))"
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
3985 (with-current-buffer (get-buffer-create idlwave-shell-bp-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3986 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3987 (insert idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3988 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3989 (let (cpro cfun)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3990 (if (re-search-forward "Compiled Procedures:" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3991 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3992 (forward-line) ; Skip $MAIN$
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3993 (setq cpro (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3994 (if (re-search-forward "Compiled Functions:" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3995 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3996 (setq cfun (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3997 (setq idlwave-shell-sources-alist
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3998 (append
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3999 ;; compiled procedures
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4000 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4001 (beginning-of-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4002 (narrow-to-region cpro (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4003 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4004 (idlwave-shell-sources-grep))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4005 ;; compiled functions
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4006 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4007 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4008 (goto-char cfun)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4009 (idlwave-shell-sources-grep)))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4010
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4011 (defun idlwave-shell-sources-grep ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4012 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4013 (let ((al (list nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4014 (while (and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4015 (not (progn (forward-line) (eobp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4016 (re-search-forward
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4017 "\\s-*\\(\\S-+\\)\\s-+\\(\\S-+\\)" nil t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4018 (nconc al
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4019 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4020 (cons
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4021 (buffer-substring ; name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4022 (match-beginning 1) (match-end 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4023 (let ((internal-filename
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4024 (buffer-substring ; source
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4025 (match-beginning 2) (match-end 2))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4026 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4027 (idlwave-shell-file-name internal-filename)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4028 internal-filename))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4029 ))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4030 (cdr al))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4031
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4032 (defun idlwave-shell-clear-all-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4033 "Remove all breakpoints in IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4034 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4035 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4036 idlwave-shell-bp-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4037 '(progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4038 (idlwave-shell-filter-bp)
77472
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
4039 (mapcar (lambda (x) (idlwave-shell-clear-bp x 'no-query))
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
4040 idlwave-shell-bp-alist)
70d58d56b53b (idlwave-shell-clear-all-bp): Don't re-query for each cleared BP.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 76864
diff changeset
4041 (idlwave-shell-bp-query))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4042 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4043
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4044 (defun idlwave-shell-list-all-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4045 "List all breakpoints in IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4046 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4047 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4048 idlwave-shell-bp-query))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4049
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4050 (defvar idlwave-shell-error-last 0
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4051 "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
4052
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4053 (defun idlwave-shell-goto-next-error ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4054 "Move point to next IDL syntax error."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4055 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4056 (let (frame col)
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4057 (with-current-buffer idlwave-shell-error-buffer
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4058 (goto-char idlwave-shell-error-last)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4059 (if (or
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4060 (re-search-forward idlwave-shell-syntax-error nil t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4061 (re-search-forward idlwave-shell-other-error nil t))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4062 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4063 (setq frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4064 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4065 (save-match-data
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4066 (idlwave-shell-file-name
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4067 (buffer-substring (match-beginning 1 )
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4068 (match-end 1))))
62402
a7e02ef1e3d6 Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents: 60925
diff changeset
4069 (string-to-number
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4070 (buffer-substring (match-beginning 2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4071 (match-end 2)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4072 ;; Try to find the column of the error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4073 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4074 (setq col
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4075 (if (re-search-backward "\\^" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4076 (current-column)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4077 0)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4078 (setq idlwave-shell-error-last (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4079 (if frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4080 (progn
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4081 (idlwave-shell-display-line frame col 'disable))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4082 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4083 (message "No more errors."))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4084
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4085 (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
4086 "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
4087 Otherwise, just expand the file name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4088 (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
4089 default-directory
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4090 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
4091 (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
4092 (file-truename name def-dir)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4093 (expand-file-name name def-dir))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4094
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4095 ;; Keybindings ------------------------------------------------------------
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4096
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4097 (defvar idlwave-shell-mode-map (copy-keymap comint-mode-map)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
4098 "Keymap for `idlwave-mode'.")
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4099 (defvar idlwave-shell-electric-debug-mode-map (make-sparse-keymap))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4100 (defvar idlwave-shell-mode-prefix-map (make-sparse-keymap))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4101 (fset 'idlwave-shell-mode-prefix-map idlwave-shell-mode-prefix-map)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4102 (defvar idlwave-mode-prefix-map (make-sparse-keymap))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4103 (fset 'idlwave-mode-prefix-map idlwave-mode-prefix-map)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4104
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4105 (defun idlwave-shell-define-key-both (key hook)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4106 "Define a key in both the shell and buffer mode maps."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4107 (define-key idlwave-mode-map key hook)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4108 (define-key idlwave-shell-mode-map key hook))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4109
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4110 ;(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
4111 ;(define-key idlwave-shell-mode-map "\t" 'comint-dynamic-complete)
76070
1029d540daf5 (idlwave-shell-mode): Clean up pending commands, for
J.D. Smith <jdsmith@as.arizona.edu>
parents: 75347
diff changeset
4112
74103
b21beb03e5c4 (idlwave-shell-filter-directory): Handle extra newlines and spaces.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 71938
diff changeset
4113 (define-key idlwave-shell-mode-map "\C-w" 'comint-kill-region)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4114 (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
4115 (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
4116 (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
4117 (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
4118 (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
4119 (define-key idlwave-shell-mode-map "\M-?" 'idlwave-context-help)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4120 (define-key idlwave-shell-mode-map [(control meta ?\?)]
74103
b21beb03e5c4 (idlwave-shell-filter-directory): Handle extra newlines and spaces.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 71938
diff changeset
4121 'idlwave-help-assistant-help-with-topic)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4122 (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
4123 (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
4124 (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
4125 (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
4126 (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
4127 (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
4128 (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
4129 'idlwave-shell-debug-map)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4130 (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
4131 (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
4132 (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
4133 (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
4134
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4135 ;; 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
4136 (idlwave-shell-define-key-both
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4137 (if (featurep 'xemacs)
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4138 [(shift button2)]
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4139 [(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
4140 '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
4141 (idlwave-shell-define-key-both
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4142 (if (featurep 'xemacs)
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4143 [(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
4144 [(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
4145 '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
4146 (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
4147 (if (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4148 [(control shift button2)]
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4149 [(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
4150 '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
4151 ;; Add this one from the idlwave-mode-map
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4152 (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
4153 (if (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4154 [(shift button3)]
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4155 [(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
4156 '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
4157
46529
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4158 ;; For Emacs, we need to turn off the button release events.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4159 (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
4160 (interactive "e"))
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4161 (unless (featurep 'xemacs)
148f4d9a8905 Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 46289
diff changeset
4162 (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
4163 [(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
4164 (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
4165 [(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
4166 (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
4167 [(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
4168
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4169
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4170 ;; The following set of bindings is used to bind the debugging keys.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4171 ;; If `idlwave-shell-activate-prefix-keybindings' is non-nil, the
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4172 ;; first key in the list gets bound the C-c C-d prefix map. If
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4173 ;; `idlwave-shell-debug-modifiers' is non-nil, the second key in the
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4174 ;; list gets bound with the specified modifiers in both
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4175 ;; `idlwave-mode-map' and `idlwave-shell-mode-map'. The next list
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4176 ;; item, if non-nil, means to bind this as a single key in the
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4177 ;; electric-debug-mode-map.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4178 ;;
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4179 ;; [C-c C-d]-binding debug-modifier-key command bind-electric-debug buf-only
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4180 ;; Used keys: abcdef hijklmnopqrstuvwxyz
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4181 ;; Unused keys: g
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4182 (let* ((specs
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4183 '(([(control ?b)] ?b idlwave-shell-break-here t t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4184 ([(control ?i)] ?i idlwave-shell-break-in t t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4185 ([(control ?j)] ?j idlwave-shell-break-this-module t t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4186 ([(control ?d)] ?d idlwave-shell-clear-current-bp t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4187 ([(control ?a)] ?a idlwave-shell-clear-all-bp t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4188 ([(control ?\\)] ?\\ idlwave-shell-toggle-enable-current-bp t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4189 ([(control ?s)] ?s idlwave-shell-step t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4190 ([(control ?n)] ?n idlwave-shell-stepover t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4191 ([(control ?k)] ?k idlwave-shell-skip t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4192 ([(control ?u)] ?u idlwave-shell-up t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4193 ([(control ?o)] ?o idlwave-shell-out t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4194 ([(control ?m)] ?m idlwave-shell-return t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4195 ([(control ?h)] ?h idlwave-shell-to-here t t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4196 ([(control ?r)] ?r idlwave-shell-cont t)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4197 ([(control ?y)] ?y idlwave-shell-execute-default-command-line)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4198 ([(control ?z)] ?z idlwave-shell-reset t)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4199 ([(control ?q)] ?q idlwave-shell-quit)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4200 ([(control ?p)] ?p idlwave-shell-print t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4201 ([( ??)] ?? idlwave-shell-help-expression t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4202 ([(control ?v)] ?v idlwave-shell-toggle-electric-debug-mode t t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4203 ([(control ?x)] ?x idlwave-shell-goto-next-error)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4204 ([(control ?c)] ?c idlwave-shell-save-and-run t)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4205 ([( ?@)] ?@ idlwave-shell-save-and-batch)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4206 ([(control ?e)] ?e idlwave-shell-run-region)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4207 ([(control ?w)] ?w idlwave-shell-resync-dirs)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4208 ([(control ?l)] ?l idlwave-shell-redisplay t)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4209 ([(control ?t)] ?t idlwave-shell-toggle-toolbar)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4210 ([(control up)] up idlwave-shell-stack-up)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4211 ([(control down)] down idlwave-shell-stack-down)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4212 ([( ?[)] ?[ idlwave-shell-goto-previous-bp t t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4213 ([( ?])] ?] idlwave-shell-goto-next-bp t t)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4214 ([(control ?f)] ?f idlwave-shell-window)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4215 (mod (cond ((and idlwave-shell-debug-modifiers
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4216 (listp idlwave-shell-debug-modifiers)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4217 (not (equal '() idlwave-shell-debug-modifiers)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4218 idlwave-shell-debug-modifiers)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4219 (idlwave-shell-activate-alt-keybindings
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4220 '(alt))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4221 (shift (memq 'shift mod))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4222 (mod-noshift (delete 'shift (copy-sequence mod)))
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
4223 s k1 c2 k2 cmd electric only-buffer cannotshift)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4224 (while (setq s (pop specs))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4225 (setq k1 (nth 0 s)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4226 c2 (nth 1 s)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4227 cmd (nth 2 s)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4228 electric (nth 3 s)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4229 only-buffer (nth 4 s)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4230 cannotshift (and shift (characterp c2) (eq c2 (upcase c2))))
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4231
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4232 ;; The regular prefix keymap.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4233 (when (and idlwave-shell-activate-prefix-keybindings k1)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4234 (unless only-buffer
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4235 (define-key idlwave-shell-mode-prefix-map k1 cmd))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4236 (define-key idlwave-mode-prefix-map k1 cmd))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4237 ;; The debug modifier map
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4238 (when (and mod window-system)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4239 (if (char-or-string-p c2)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4240 (setq k2 (vector (append mod-noshift
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4241 (list (if shift (upcase c2) c2)))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4242 (setq k2 (vector (append mod (list c2)))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4243 (unless cannotshift
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4244 (define-key idlwave-mode-map k2 cmd)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4245 (unless only-buffer (define-key idlwave-shell-mode-map k2 cmd))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4246 ;; The electric debug single-keystroke map
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4247 (if (and electric (char-or-string-p c2))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4248 (define-key idlwave-shell-electric-debug-mode-map (char-to-string c2)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4249 cmd))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4250
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4251 ;; A few extras in the electric debug map
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4252 (define-key idlwave-shell-electric-debug-mode-map " " 'idlwave-shell-step)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4253 (define-key idlwave-shell-electric-debug-mode-map "+" 'idlwave-shell-stack-up)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4254 (define-key idlwave-shell-electric-debug-mode-map "=" 'idlwave-shell-stack-up)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4255 (define-key idlwave-shell-electric-debug-mode-map "-"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4256 'idlwave-shell-stack-down)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4257 (define-key idlwave-shell-electric-debug-mode-map "_"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4258 'idlwave-shell-stack-down)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4259 (define-key idlwave-shell-electric-debug-mode-map "e"
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4260 '(lambda () (interactive) (idlwave-shell-print '(16))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4261 (define-key idlwave-shell-electric-debug-mode-map "q" 'idlwave-shell-retall)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4262 (define-key idlwave-shell-electric-debug-mode-map "t"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4263 '(lambda () (interactive) (idlwave-shell-send-command "help,/TRACE")))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4264 (define-key idlwave-shell-electric-debug-mode-map [(control ??)]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4265 'idlwave-shell-electric-debug-help)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4266 (define-key idlwave-shell-electric-debug-mode-map "x"
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4267 '(lambda (arg) (interactive "P")
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4268 (idlwave-shell-print arg nil nil t)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4269
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4270
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4271 ; Enter the prefix map in two places.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4272 (fset 'idlwave-debug-map idlwave-mode-prefix-map)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4273 (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
4274
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4275 ;; The Electric Debug Minor Mode --------------------------------------------
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4276
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4277 (defun idlwave-shell-toggle-electric-debug-mode ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4278 "Toggle electric-debug-mode, suppressing re-entry into mode if turned off."
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4279 (interactive)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4280 ;; If turning it off, make sure it stays off throughout the debug
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4281 ;; session until we return or hit $MAIN$. Cancel this suppression
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4282 ;; if it's explicitly turned on.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4283 (if idlwave-shell-electric-debug-mode
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4284 (progn ;; Turn it off, and make sure it stays off.
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4285 (setq idlwave-shell-suppress-electric-debug t)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4286 (idlwave-shell-electric-debug-mode 0))
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4287 (setq idlwave-shell-suppress-electric-debug nil)
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4288 (idlwave-shell-electric-debug-mode t)))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4289
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4290 (defvar idlwave-shell-electric-debug-read-only)
58947
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
4291 (defvar idlwave-shell-electric-debug-buffers nil)
e5111e925bde Re-arrange variables to avoid compiler warnings. Change
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58307
diff changeset
4292
67297
7060bfa31573 (idlwave-shell-electric-debug-mode):
Juri Linkov <juri@jurta.org>
parents: 65689
diff changeset
4293 (define-minor-mode idlwave-shell-electric-debug-mode
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4294 "Toggle Electric Debug mode.
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4295 With no argument, this command toggles the mode.
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4296 Non-null prefix argument turns on the mode.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4297 Null prefix argument turns off the mode.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4298
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4299 When Electric Debug mode is enabled, the many debugging commands are
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4300 available as single key sequences."
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4301 nil
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4302 " *Debugging*"
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4303 idlwave-shell-electric-debug-mode-map)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4304
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4305 (add-hook
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4306 'idlwave-shell-electric-debug-mode-on-hook
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4307 (lambda ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4308 (set (make-local-variable 'idlwave-shell-electric-debug-read-only)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4309 buffer-read-only)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4310 (setq buffer-read-only t)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4311 (add-to-list 'idlwave-shell-electric-debug-buffers (current-buffer))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4312 (if idlwave-shell-stop-line-overlay
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4313 (overlay-put idlwave-shell-stop-line-overlay 'face
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4314 idlwave-shell-electric-stop-line-face))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4315 (if (facep 'fringe)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4316 (set-face-foreground 'fringe idlwave-shell-electric-stop-color
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4317 (selected-frame)))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4318
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4319 (add-hook
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4320 'idlwave-shell-electric-debug-mode-off-hook
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4321 (lambda ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4322 ;; Return to previous read-only state
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4323 (setq buffer-read-only (if (boundp 'idlwave-shell-electric-debug-read-only)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4324 idlwave-shell-electric-debug-read-only))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4325 (setq idlwave-shell-electric-debug-buffers
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4326 (delq (current-buffer) idlwave-shell-electric-debug-buffers))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4327 (if idlwave-shell-stop-line-overlay
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4328 (overlay-put idlwave-shell-stop-line-overlay 'face
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4329 idlwave-shell-stop-line-face)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4330 (if (facep 'fringe)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4331 (set-face-foreground 'fringe (face-foreground 'default))))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4332
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4333 ;; easy-mmode defines electric-debug-mode for us, so we need to advise it.
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4334 (defadvice idlwave-shell-electric-debug-mode (after print-enter activate)
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
4335 "Print out an entrance message."
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4336 (when idlwave-shell-electric-debug-mode
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4337 (message
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4338 "Electric Debugging mode entered. Press [C-?] for help, [q] to quit"))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4339 (force-mode-line-update))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4340
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4341 ;; Turn it off in all relevant buffers
64001
82d080bf4f42 Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents: 63450
diff changeset
4342 (defvar idlwave-shell-electric-debug-buffers nil)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4343 (defun idlwave-shell-electric-debug-all-off ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4344 (setq idlwave-shell-suppress-electric-debug nil)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4345 (let ((buffers idlwave-shell-electric-debug-buffers)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4346 buf)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4347 (save-excursion
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4348 (while (setq buf (pop buffers))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4349 (when (buffer-live-p buf)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4350 (set-buffer buf)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4351 (when (and (eq major-mode 'idlwave-mode)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4352 buffer-file-name
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4353 idlwave-shell-electric-debug-mode)
69822
84de63539ab8 Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents: 68773
diff changeset
4354 (idlwave-shell-electric-debug-mode 0))))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4355 (setq idlwave-shell-electric-debug-buffers nil))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4356
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4357 ;; Show the help text
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4358 (defun idlwave-shell-electric-debug-help ()
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4359 (interactive)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4360 (with-output-to-temp-buffer "*IDLWAVE Electric Debug Help*"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4361 (princ idlwave-shell-electric-debug-help))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4362 (let* ((current-window (selected-window))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4363 (window (get-buffer-window "*IDLWAVE Electric Debug Help*"))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4364 (window-lines (window-height window)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4365 (select-window window)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4366 (enlarge-window (1+ (- (count-lines 1 (point-max)) window-lines)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4367 (select-window current-window)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4368
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4369
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4370 ;; The Menus --------------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4371 (defvar idlwave-shell-menu-def
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4372 `("Debug"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4373 ["Electric Debug Mode"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4374 idlwave-shell-electric-debug-mode
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4375 :style toggle :selected idlwave-shell-electric-debug-mode
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4376 :included (eq major-mode 'idlwave-mode) :keys "C-c C-d C-v"]
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4377 "--"
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4378 ("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
4379 ["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
4380 (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
4381 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
4382 ["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
4383 (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
4384 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
4385 ["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
4386 (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
4387 idlwave-shell-last-save-and-action-file)]
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4388 "--"
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4389 ["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
4390 "--"
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4391 ["Compile and Run Region" idlwave-shell-run-region
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4392 (eq major-mode 'idlwave-mode)]
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4393 ["Evaluate Region" idlwave-shell-evaluate-region
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4394 (eq major-mode 'idlwave-mode)]
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4395 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4396 ["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
4397 ["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
4398 ("Breakpoints"
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4399 ["Set Breakpoint" idlwave-shell-break-here
71938
2bd94e447ecb Fix menu typo.
J.D. Smith <jdsmith@as.arizona.edu>
parents: 70573
diff changeset
4400 :keys "C-c C-d C-b" :active (eq major-mode 'idlwave-mode)]
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4401 ("Set Special Breakpoint"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4402 ["Set After Count Breakpoint"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4403 (progn
62402
a7e02ef1e3d6 Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents: 60925
diff changeset
4404 (let ((count (string-to-number (read-string "Break after count: "))))
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4405 (if (integerp count) (idlwave-shell-break-here count))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4406 :active (eq major-mode 'idlwave-mode)]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4407 ["Set Condition Breakpoint"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4408 (idlwave-shell-break-here '(4))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4409 :active (eq major-mode 'idlwave-mode)])
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4410 ["Break in Module" idlwave-shell-break-in
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4411 :keys "C-c C-d C-i" :active (eq major-mode 'idlwave-mode)]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4412 ["Break in this Module" idlwave-shell-break-this-module
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4413 :keys "C-c C-d C-j" :active (eq major-mode 'idlwave-mode)]
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4414 ["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
4415 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t]
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4416 ["Disable/Enable Breakpoint" idlwave-shell-toggle-enable-current-bp t]
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4417 ["Goto Previous Breakpoint" idlwave-shell-goto-previous-bp
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4418 :keys "C-c C-d [" :active (eq major-mode 'idlwave-mode)]
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4419 ["Goto Next Breakpoint" idlwave-shell-goto-next-bp
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4420 :keys "C-c C-d ]" :active (eq major-mode 'idlwave-mode)]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4421 ["List All Breakpoints" idlwave-shell-list-all-bp t]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4422 ["Resync Breakpoints" idlwave-shell-bp-query t])
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
4423 ("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
4424 ["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
4425 ["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
4426 ["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
4427 ["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
4428 ["... 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
4429 ["... 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
4430 ["... 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
4431 ["... to Here (Cursor Line)" idlwave-shell-to-here
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4432 :keys "C-c C-d C-h" :active (eq major-mode 'idlwave-mode)])
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4433 ("Examine Expressions"
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4434 ["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
4435 ["Help on expression" idlwave-shell-help-expression t]
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4436 ("Examine nearby expression with"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4437 ,@(mapcar (lambda(x)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4438 `[ ,(car x) (idlwave-shell-print nil ',x) t ])
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4439 idlwave-shell-examine-alist))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4440 ("Examine region with"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4441 ,@(mapcar (lambda(x)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4442 `[ ,(car x) (idlwave-shell-print '(4) ',x) t ])
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4443 idlwave-shell-examine-alist)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4444 ("Call Stack"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4445 ["Stack Up" idlwave-shell-stack-up t]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4446 ["Stack Down" idlwave-shell-stack-down t]
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4447 "--"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4448 ["Redisplay and Sync" idlwave-shell-redisplay t])
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4449 ("Show Commands"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4450 ["Everything" (if (eq idlwave-shell-show-commands 'everything)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4451 (progn
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4452 (setq idlwave-shell-show-commands
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4453 (get 'idlwave-shell-show-commands 'last-val))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4454 (put 'idlwave-shell-show-commands 'last-val nil))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4455 (put 'idlwave-shell-show-commands 'last-val
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4456 idlwave-shell-show-commands)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4457 (setq idlwave-shell-show-commands 'everything))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4458 :style toggle :selected (and (not (listp idlwave-shell-show-commands))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4459 (eq idlwave-shell-show-commands
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4460 'everything))]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4461 "--"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4462 ["Compiling Commands" (idlwave-shell-add-or-remove-show 'run)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4463 :style toggle
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4464 :selected (not (idlwave-shell-hide-p
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4465 'run
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4466 (get 'idlwave-shell-show-commands 'last-val)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4467 :active (not (eq idlwave-shell-show-commands 'everything))]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4468 ["Breakpoint Commands" (idlwave-shell-add-or-remove-show 'breakpoint)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4469 :style toggle
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4470 :selected (not (idlwave-shell-hide-p
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4471 'breakpoint
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4472 (get 'idlwave-shell-show-commands 'last-val)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4473 :active (not (eq idlwave-shell-show-commands 'everything))]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4474 ["Debug Commands" (idlwave-shell-add-or-remove-show 'debug)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4475 :style toggle
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4476 :selected (not (idlwave-shell-hide-p
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4477 'debug
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4478 (get 'idlwave-shell-show-commands 'last-val)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4479 :active (not (eq idlwave-shell-show-commands 'everything))]
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4480 ["Miscellaneous Commands" (idlwave-shell-add-or-remove-show 'misc)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4481 :style toggle
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4482 :selected (not (idlwave-shell-hide-p
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4483 'misc
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4484 (get 'idlwave-shell-show-commands 'last-val)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4485 :active (not (eq idlwave-shell-show-commands 'everything))])
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4486 ("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
4487 ["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
4488 ["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
4489 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4490 ["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
4491 (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
4492 (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
4493 :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
4494 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4495 ["Update Working Dir" idlwave-shell-resync-dirs t]
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4496 ["Save Path Info"
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4497 (idlwave-shell-send-command idlwave-shell-path-query
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4498 'idlwave-shell-get-path-info
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4499 'hide)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4500 t]
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4501 ["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
4502 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
4503 ["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
4504 ["Exit IDL" idlwave-shell-quit t]))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4505
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4506 (if (or (featurep 'easymenu) (load "easymenu" t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4507 (progn
85220
5d24da5e0deb (idlwave-shell-filter-bp, top level): Use mapc rather than mapcar.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
4508 (easy-menu-define
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4509 idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus"
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4510 idlwave-shell-menu-def)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4511 (easy-menu-define
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4512 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
4513 idlwave-shell-menu-def)
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4514 (save-current-buffer
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4515 (dolist (buf (buffer-list))
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4516 (set-buffer buf)
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4517 (if (eq major-mode 'idlwave-mode)
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4518 (progn
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4519 (easy-menu-remove idlwave-mode-debug-menu)
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4520 (easy-menu-add idlwave-mode-debug-menu)))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4521
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4522 ;; The Breakpoint Glyph -------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4523
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4524 (defvar idlwave-shell-bp-glyph nil
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4525 "The glyphs to mark breakpoint lines in the source code.")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4526
85220
5d24da5e0deb (idlwave-shell-filter-bp, top level): Use mapc rather than mapcar.
Glenn Morris <rgm@gnu.org>
parents: 78234
diff changeset
4527 (let ((image-alist
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4528 '((bp . "/* XPM */
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4529 static char * file[] = {
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4530 \"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
4531 \" c None s backgroundColor\",
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4532 \". c #4B4B4B4B4B4B\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4533 \"R c #FFFF00000000\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4534 \" \",
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4535 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4536 \" .RRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4537 \" .RRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4538 \" .RRRRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4539 \" .RRRRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4540 \" .RRRRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4541 \" .RRRRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4542 \" .RRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4543 \" .RRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4544 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4545 \" \"};")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4546 (bp-cond . "/* XPM */
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4547 static char * file[] = {
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4548 \"14 12 4 1\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4549 \" c None s backgroundColor\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4550 \". c #4B4B4B4B4B4B\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4551 \"R c #FFFF00000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4552 \"B c #000000000000\",
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4553 \" \",
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4554 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4555 \" .RRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4556 \" .RRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4557 \" .RRRRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4558 \" .RRBBBBRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4559 \" .RRRRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4560 \" .RRBBBBRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4561 \" .RRRRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4562 \" .RRRR. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4563 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4564 \" \"};")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4565 (bp-1 . "/* XPM */
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4566 static char * file[] = {
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4567 \"14 12 4 1\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4568 \" c None s backgroundColor\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4569 \". c #4B4B4B4B4B4B\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4570 \"X c #FFFF00000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4571 \"o c #000000000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4572 \" \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4573 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4574 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4575 \" .XXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4576 \" .XXoooXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4577 \" .XXXooXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4578 \" .XXXooXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4579 \" .XXooooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4580 \" .XooooX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4581 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4582 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4583 \" \"};")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4584 (bp-2 . "/* XPM */
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4585 static char * file[] = {
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4586 \"14 12 4 1\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4587 \" c None s backgroundColor\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4588 \". c #4B4B4B4B4B4B\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4589 \"X c #FFFF00000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4590 \"o c #000000000000\",
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4591 \" \",
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4592 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4593 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4594 \" .XoooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4595 \" .XXoXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4596 \" .XXXXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4597 \" .XXXooXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4598 \" .XXooXXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4599 \" .XooooX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4600 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4601 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4602 \" \"};")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4603 (bp-3 . "/* XPM */
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4604 static char * file[] = {
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4605 \"14 12 4 1\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4606 \" c None s backgroundColor\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4607 \". c #4B4B4B4B4B4B\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4608 \"X c #FFFF00000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4609 \"o c #000000000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4610 \" \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4611 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4612 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4613 \" .XoooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4614 \" .XXXXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4615 \" .XXXooXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4616 \" .XXXXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4617 \" .XXoXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4618 \" .XoooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4619 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4620 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4621 \" \"};")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4622 (bp-4 . "/* XPM */
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4623 static char * file[] = {
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4624 \"14 12 4 1\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4625 \" c None s backgroundColor\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4626 \". c #4B4B4B4B4B4B\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4627 \"X c #FFFF00000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4628 \"o c #000000000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4629 \" \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4630 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4631 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4632 \" .XoXXoX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4633 \" .XXoXXoXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4634 \" .XXooooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4635 \" .XXXXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4636 \" .XXXXooXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4637 \" .XXXooX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4638 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4639 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4640 \" \"};")
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4641 (bp-n . "/* XPM */
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4642 static char * file[] = {
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4643 \"14 12 4 1\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4644 \" c None s backgroundColor\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4645 \". c #4B4B4B4B4B4B\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4646 \"X c #FFFF00000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4647 \"o c #000000000000\",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4648 \" \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4649 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4650 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4651 \" .XXXXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4652 \" .XXoXoXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4653 \" .XXooXoXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4654 \" .XXoXXoXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4655 \" .XXoXXoXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4656 \" .XoXXoX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4657 \" .XXXX. \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4658 \" .... \",
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4659 \" \"};"))) im-cons im)
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4660
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4661 (while (setq im-cons (pop image-alist))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4662 (setq im (cond ((and (featurep 'xemacs)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4663 (featurep 'xpm))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4664 (list
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4665 (let ((data (cdr im-cons)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4666 (string-match "#FFFF00000000" data)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4667 (setq data (replace-match "#8F8F8F8F8F8F" t t data))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4668 (make-glyph data))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4669 (make-glyph (cdr im-cons))))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4670 ((and (not (featurep 'xemacs))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4671 (fboundp 'image-type-available-p)
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4672 (image-type-available-p 'xpm))
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4673 (list 'image :type 'xpm :data (cdr im-cons)
58293
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4674 :ascent 'center))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4675 (t nil)))
5b2b2365e698 Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents: 58002
diff changeset
4676 (if im (push (cons (car im-cons) im) idlwave-shell-bp-glyph))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4677
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4678 (provide 'idlw-shell)
27166
b2d17f0c1668 Also provide idlwave.shell, not only idlw-shell.
Carsten Dominik <dominik@science.uva.nl>
parents: 27108
diff changeset
4679 (provide 'idlwave-shell)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4680
105813
df4934f25eef * textmodes/two-column.el (2C-split):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105170
diff changeset
4681 ;; Load the toolbar when wanted by the user.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4682
91440
43e659e97106 Delete trailing whitespace.
Glenn Morris <rgm@gnu.org>
parents: 87649
diff changeset
4683 (autoload 'idlwave-toolbar-toggle "idlw-toolbar"
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
4684 "Toggle the IDLWAVE toolbar.")
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
4685 (autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar"
105170
f8ba8d6fd250 Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 104774
diff changeset
4686 "Add IDLWAVE toolbar.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4687 (defun idlwave-shell-toggle-toolbar ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4688 "Toggle the display of the debugging toolbar."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4689 (interactive)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
4690 (idlwave-toolbar-toggle))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4691
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
4692 (if idlwave-shell-use-toolbar
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
4693 (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere))
58296
4773953f1a10 Restore arch taglines
Miles Bader <miles@gnu.org>
parents: 58293
diff changeset
4694
4773953f1a10 Restore arch taglines
Miles Bader <miles@gnu.org>
parents: 58293
diff changeset
4695 ;; arch-tag: 20c2e8ce-0709-41d8-a5b6-bb039148440a
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4696 ;;; idlw-shell.el ends here