Mercurial > emacs
annotate lisp/progmodes/idlw-shell.el @ 34260:b4bcb9d9875a
*** empty log message ***
author | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Wed, 06 Dec 2000 13:43:00 +0000 |
parents | 4ee57139dc05 |
children | dd613770eb0f |
rev | line source |
---|---|
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1 ;;; idlw-shell.el --- Run IDL or WAVE as an inferior process of Emacs. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2 ;; Copyright (c) 1994-1996 Chris Chase |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3 ;; Copyright (c) 1999 Carsten Dominik |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
4 ;; Copyright (c) 1999, 2000 Free Software Foundation |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
5 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
6 ;; Author: Chris Chase <chase@att.com> |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
7 ;; Maintainer: Carsten Dominik <dominik@strw.leidenuniv.nl> |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
8 ;; Version: 4.2 |
30648
4ee57139dc05
(idlwave-shell-send-command): When looking for a prompt, (forward-line 0)
Miles Bader <miles@gnu.org>
parents:
29774
diff
changeset
|
9 ;; Date: $Date: 2000/06/20 12:49:42 $ |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
10 ;; Keywords: processes |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
11 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
12 ;; This file is part of GNU Emacs. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
13 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
14 ;; GNU Emacs is free software; you can redistribute it and/or modify |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
15 ;; it under the terms of the GNU General Public License as published by |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
16 ;; the Free Software Foundation; either version 2, or (at your option) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
17 ;; any later version. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
18 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
19 ;; 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
|
20 ;; 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
|
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
22 ;; GNU General Public License for more details. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
23 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
24 ;; You should have received a copy of the GNU General Public License |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
27 ;; Boston, MA 02111-1307, USA. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
28 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
29 ;;; Commentary: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
30 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
31 ;; This mode is for IDL version 4 or later. It should work on Emacs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
32 ;; or XEmacs version 19 or later. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
33 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
34 ;; Runs IDL as an inferior process of Emacs, much like the emacs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
35 ;; `shell' or `telnet' commands. Provides command history and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
36 ;; searching. Provides debugging commands available in buffers |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
37 ;; visiting IDL procedure files, e.g., breakpoint setting, stepping, |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
38 ;; execution until a certain line, printing expressions under point, |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
39 ;; visual line pointer for current execution line, etc. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
40 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
41 ;; Documentation should be available online with `M-x idlwave-info'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
42 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
43 ;; INSTALLATION: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
44 ;; ============= |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
45 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
46 ;; 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
|
47 ;; 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
|
48 ;; lines to your .emacs file: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
49 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
50 ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
51 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
52 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
53 ;; SOURCE |
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 ;; 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
|
57 ;; web site. |
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 ;; http://www.strw.leidenuniv.el/~dominik/Tools/idlwave |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
60 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
61 ;; DOCUMENTATION |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
62 ;; ============= |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
63 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
64 ;; IDLWAVE is documented online in info format. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
65 ;; 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
|
66 ;; maintainers webpage (see under SOURCE) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
67 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
68 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
69 ;; KNOWN PROBLEMS |
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 ;; I don't plan on implementing directory tracking by watching the IDL |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
73 ;; commands entered at the prompt, since too often an IDL procedure |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
74 ;; will change the current directory. If you want the the idl process |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
75 ;; buffer to match the IDL current working just execute `M-x |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
76 ;; idlwave-shell-resync-dirs' (bound to "\C-c\C-d\C-w" by default.) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
77 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
78 ;; 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
|
79 ;; 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
|
80 ;; it is a bug in XEmacs. |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
81 ;; 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
|
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 ;; CUSTOMIZATION VARIABLES |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
85 ;; ======================= |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
86 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
87 ;; 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
|
88 ;; 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
|
89 ;; `M-x idlwave-customize'. |
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 ;;-------------------------------------------------------------------------- |
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 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
94 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
95 ;;; Code: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
96 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
97 (require 'comint) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
98 (require 'idlwave) |
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 (eval-when-compile (require 'cl)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
101 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
102 (defvar idlwave-shell-have-new-custom nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
103 (eval-and-compile |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
104 ;; Kludge to allow `defcustom' for Emacs 19. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
105 (condition-case () (require 'custom) (error nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
106 (if (and (featurep 'custom) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
107 (fboundp 'custom-declare-variable) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
108 (fboundp 'defface)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
109 ;; We've got what we needed |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
110 (setq idlwave-shell-have-new-custom t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
111 ;; We have the old or no custom-library, hack around it! |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
112 (defmacro defgroup (&rest args) nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
113 (defmacro defcustom (var value doc &rest args) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
114 (` (defvar (, var) (, value) (, doc)))))) |
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 ;;; Customizations: idlwave-shell group |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
117 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
118 (defgroup idlwave-shell-general-setup nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
119 "Indentation options for IDL/WAVE mode." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
120 :prefix "idlwave" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
121 :group 'idlwave) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
122 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
123 (defcustom idlwave-shell-prompt-pattern "^ ?IDL> " |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
124 "*Regexp to match IDL prompt at beginning of a line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
125 For example, \"^IDL> \" or \"^WAVE> \". |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
126 The \"^\" means beginning of line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
127 This variable is used to initialise `comint-prompt-regexp' in the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
128 process buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
129 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
130 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
|
131 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
132 :type 'regexp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
133 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
134 (defcustom idlwave-shell-process-name "idl" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
135 "*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
|
136 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
|
137 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
138 :type 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
139 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
140 (defcustom idlwave-shell-automatic-start nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
141 "*If non-nil attempt invoke idlwave-shell if not already running. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
142 This is checked when an attempt to send a command to an |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
143 IDL process is made." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
144 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
145 :type 'boolean) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
146 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
147 (defcustom idlwave-shell-initial-commands "!more=0" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
148 "Initial commands, separated by newlines, to send to IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
149 This string is sent to the IDL process by `idlwave-shell-mode' which is |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
150 invoked by `idlwave-shell'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
151 :group 'idlwave-shell-initial-commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
152 :type 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
153 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
154 (defcustom idlwave-shell-use-dedicated-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
155 "*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
|
156 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
157 :type 'boolean) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
158 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
159 (defcustom idlwave-shell-frame-parameters |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
160 '((height . 30) (unsplittable . nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
161 "The frame parameters for a dedicated idlwave-shell frame. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
162 See also `idlwave-shell-use-dedicated-frame'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
163 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
|
164 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
165 :type '(repeat |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
166 (cons symbol sexp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
167 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
168 (defcustom idlwave-shell-use-toolbar t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
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. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
181 The full temporary file name is obtained by to using `make-temp-name' |
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. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
195 Seting it in the mode-hook is too late." |
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 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
206 (defcustom idlwave-shell-activate-alt-keybindings nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
207 "Non-nil means, the debug commands will be bound to alternate keys. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
208 So for example setting a breakpoint will be on A-b." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
209 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
210 :type 'boolean) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
211 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
212 (defcustom idlwave-shell-use-truename nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
213 "*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
|
214 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
|
215 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
|
216 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
|
217 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
|
218 reuse that buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
219 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
|
220 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
|
221 to set this option to nil." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
222 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
223 :type 'boolean) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
224 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
225 (defcustom idlwave-shell-file-name-chars "~/A-Za-z0-9+@:_.$#%={}-" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
226 "The characters allowed in file names, as a string. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
227 Used for file name completion. Must not contain `'', `,' and `\"' |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
228 because these are used as separators by IDL." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
229 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
230 :type 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
231 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
232 (defcustom idlwave-shell-mode-hook '() |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
233 "*Hook for customising `idlwave-shell-mode'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
234 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
235 :type 'hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
236 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
237 (defcustom idlwave-shell-print-expression-function nil |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
238 "When non-nil, a function to handle display of evaluated expressions. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
239 This can be used to arrange for displaying the value of an expression |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
240 in (e.g.) a special frame. The function must accept one argument: |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
241 the expression which was evaluated. The output from IDL will be |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
242 available in the variable `idlwave-shell-command-output'." |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
243 :group 'idlwave-shell-highlighting-and-faces |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
244 :type 'symbol) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
245 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
246 (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
|
247 "*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
|
248 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
|
249 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
|
250 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
|
251 back, respectively. See `idlwave-shell-input-mode-spells' for details." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
252 :group 'idlwave-shell-general-setup |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
253 :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
|
254 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
255 (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
|
256 '("^<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
|
257 "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
|
258 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
259 When the first regexp matches in the output streem of IDL, IDLWAVE |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
260 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
|
261 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
|
262 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
263 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
|
264 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
|
265 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
|
266 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
|
267 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
|
268 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
269 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
|
270 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
|
271 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
|
272 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
273 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
|
274 GET_KBRD, because in normal operation IDLWAVE only sends \\n terminated |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
275 strings. Here is some example code which makes use of teh default spells. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
276 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
277 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
|
278 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
|
279 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
|
280 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
|
281 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
|
282 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
|
283 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
284 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
|
285 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
|
286 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
|
287 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
288 Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION', |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
289 you could actually check if you are running under Emacs before printing |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
290 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
|
291 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
292 Usage: |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
293 ====== |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
294 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
|
295 idlwave_char_input,/on ; Start the loop to send characters |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
296 idlwave_char_input,/off ; End the loop to send chracters |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
297 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
298 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
299 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
|
300 ;; 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
|
301 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
|
302 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
|
303 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
|
304 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
|
305 else print,'<onechar>' |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
306 endif |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
307 end" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
308 :group 'idlwave-shell-general-setup |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
309 :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
|
310 (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
|
311 (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
|
312 (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
|
313 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
314 ;;; Breakpoint Overlays etc |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
315 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
316 (defgroup idlwave-shell-highlighting-and-faces nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
317 "Indentation options for IDL/WAVE mode." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
318 :prefix "idlwave" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
319 :group 'idlwave) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
320 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
321 (defcustom idlwave-shell-mark-stop-line t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
322 "*Non-nil means, mark the source code line where IDL is currently stopped. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
323 Value decides about the method which is used to mark the line. Legal values |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
324 are: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
325 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
326 nil Do not mark the line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
327 'arrow Use the overlay arrow |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
328 'face Use `idlwave-shell-stop-line-face' to highlight the line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
329 t Use what IDLWAVE things is best. Will be a face where possible, |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
330 otherwise the overlay arrow. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
331 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
|
332 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
|
333 a face highlighting may be better. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
334 On Emacs 21, the overlay arrow is displayed in a special area and never |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
335 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
|
336 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
337 :type '(choice |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
338 (const :tag "No marking" nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
339 (const :tag "Use overlay arrow" arrow) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
340 (const :tag "Highlight with face" face) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
341 (const :tag "Face or arrow." t))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
342 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
343 (defcustom idlwave-shell-overlay-arrow ">" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
344 "*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
|
345 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
|
346 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
|
347 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
|
348 See also `idlwave-shell-use-overlay-arrow'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
349 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
350 :type 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
351 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
352 (defcustom idlwave-shell-stop-line-face 'highlight |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
353 "*The face for `idlwave-shell-stop-line-overlay'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
354 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
|
355 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
|
356 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
357 :type 'symbol) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
358 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
359 (defcustom idlwave-shell-mark-breakpoints t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
360 "*Non-nil means, mark breakpoints in the source files. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
361 Legal values are: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
362 nil Do not mark breakpoints. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
363 'face Highlight line with `idlwave-shell-breakpoint-face'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
364 '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
|
365 support glyphs, will use 'face instead. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
366 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
|
367 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
368 :type '(choice |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
369 (const :tag "No marking" nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
370 (const :tag "Highlight with face" face) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
371 (const :tag "Display glyph (red dot)" glyph) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
372 (const :tag "Glyph or face." t))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
373 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
374 (defvar idlwave-shell-use-breakpoint-glyph t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
375 "Obsolete variable. See `idlwave-shell-mark-breakpoints.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
376 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
377 (defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp-face |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
378 "*The face for breakpoint lines in the source code. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
379 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
|
380 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
|
381 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
382 :type 'symbol) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
383 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
384 (if idlwave-shell-have-new-custom |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
385 ;; We have the new customize - use it to define a customizable face |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
386 (defface idlwave-shell-bp-face |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
387 '((((class color)) (:foreground "Black" :background "Pink")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
388 (t (:underline t))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
389 "Face for highlighting lines-with-breakpoints." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
390 :group 'idlwave-shell-highlighting-and-faces) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
391 ;; Just copy the underline face to be on the safe side. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
392 (copy-face 'underline 'idlwave-shell-bp-face)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
393 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
394 (defcustom idlwave-shell-expression-face 'secondary-selection |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
395 "*The face for `idlwave-shell-expression-overlay'. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
396 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
|
397 the expression printed by IDL." |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
398 :group 'idlwave-shell-highlighting-and-faces |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
399 :type 'symbol) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
400 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
401 ;;; End user customization variables |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
402 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
403 ;;; External variables |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
404 (defvar comint-last-input-start) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
405 (defvar comint-last-input-end) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
406 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
407 ;; Other variables |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
408 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
409 (defvar idlwave-shell-temp-file-base |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
410 (make-temp-name idlwave-shell-temp-pro-prefix) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
411 "Base name of the temporary files.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
412 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
413 (defvar 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
|
414 (concat idlwave-shell-temp-file-base ".pro") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
415 "Absolute pathname for temporary IDL file for compiling regions") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
416 |
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 (defvar 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
|
418 (concat idlwave-shell-temp-file-base ".sav") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
419 "Absolute pathname for temporary IDL file save file for routine_info. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
420 This is used to speed up the reloading of the routine info procedure |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
421 before use by the shell.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
422 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
423 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
424 (defvar idlwave-shell-dirstack-query "printd" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
425 "Command used by `idlwave-shell-resync-dirs' to query IDL for |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
426 the directory stack.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
427 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
428 (defvar idlwave-shell-path-query "__pa=expand_path(!path,/array)&for i=0,n_elements(__pa)-1 do print,'PATH:',__pa[i]&print,'SYSDIR:',!dir" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
429 "The command which gets !PATH and !DIR infor from the shell.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
430 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
431 (defvar idlwave-shell-mode-line-info nil |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
432 "Additional info displayed in the mode line") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
433 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
434 (defvar idlwave-shell-default-directory nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
435 "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
|
436 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
437 (defvar idlwave-shell-last-save-and-action-file nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
438 "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
|
439 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
440 ;; Highlighting uses overlays. When necessary, require the emulation. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
441 (if (not (fboundp 'make-overlay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
442 (condition-case nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
443 (require 'overlay) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
444 (error nil))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
445 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
446 (defvar idlwave-shell-stop-line-overlay nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
447 "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
|
448 (defvar idlwave-shell-is-stopped nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
449 (defvar idlwave-shell-expression-overlay nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
450 "The overlay for where IDL is currently stopped.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
451 ;; 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
|
452 ;; are reloading this file. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
453 (if (overlayp idlwave-shell-stop-line-overlay) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
454 (delete-overlay idlwave-shell-stop-line-overlay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
455 (if (overlayp idlwave-shell-expression-overlay) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
456 (delete-overlay idlwave-shell-expression-overlay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
457 ;; Set to nil initially |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
458 (setq idlwave-shell-stop-line-overlay nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
459 idlwave-shell-expression-overlay nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
460 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
461 ;; 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
|
462 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
463 ((or (null idlwave-shell-mark-stop-line) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
464 (eq idlwave-shell-mark-stop-line 'arrow)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
465 ;; Leave the overlay nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
466 nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
467 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
468 ((eq idlwave-shell-mark-stop-line 'face) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
469 ;; 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
|
470 ;; So who can display faces? |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
471 (when (or (featurep 'xemacs) ; XEmacs can do also ttys |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
472 (fboundp 'tty-defined-colors) ; Emacs 21 as well |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
473 window-system) ; Window systems always |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
474 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
475 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
476 (overlay-put idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
477 'face idlwave-shell-stop-line-face)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
478 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
479 (t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
480 ;; 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
|
481 (if window-system |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
482 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
483 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
484 (overlay-put idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
485 'face idlwave-shell-stop-line-face))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
486 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
487 ;; Now the expression overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
488 (setq idlwave-shell-expression-overlay (make-overlay 1 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
489 (overlay-put idlwave-shell-expression-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
490 'face idlwave-shell-expression-face) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
491 (defvar idlwave-shell-bp-query "help,/breakpoints" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
492 "Command to obtain list of breakpoints") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
493 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
494 (defvar idlwave-shell-command-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
495 "String for accumulating current command output.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
496 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
497 (defvar idlwave-shell-post-command-hook nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
498 "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
|
499 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
|
500 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
|
501 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
502 (defvar idlwave-shell-hide-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
503 "If non-nil the process output is not inserted into the output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
504 buffer.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
505 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
506 (defvar idlwave-shell-accumulation nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
507 "Accumulate last line of output.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
508 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
509 (defvar idlwave-shell-command-line-to-execute nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
510 (defvar idlwave-shell-cleanup-hook nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
511 "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
|
512 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
513 (defvar idlwave-shell-pending-commands nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
514 "List of commands to be sent to IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
515 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
|
516 string to be sent to IDL and PCMD is a post-command to be placed on |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
517 `idlwave-shell-post-command-hook'. If HIDE is non-nil, hide the output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
518 from command CMD. PCMD and HIDE are optional.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
519 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
520 (defun idlwave-shell-buffer () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
521 "Name of buffer associated with IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
522 The name of the buffer is made by surrounding `idlwave-shell-process-name |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
523 with `*'s." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
524 (concat "*" idlwave-shell-process-name "*")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
525 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
526 (defvar idlwave-shell-ready nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
527 "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
|
528 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
529 ;;; 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
|
530 ;;; resync our idea of where IDL execution currently is. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
531 ;;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
532 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
533 (defvar idlwave-shell-halt-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
534 "The frame associated with halt/breakpoint messages.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
535 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
536 (defvar idlwave-shell-step-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
537 "The frame associated with step messages.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
538 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
539 (defvar idlwave-shell-trace-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
540 "The frame associated with trace messages.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
541 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
542 (defconst idlwave-shell-halt-messages |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
543 '("^% Execution halted at" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
544 "^% Interrupted at:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
545 "^% Stepped to:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
546 "^% At " |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
547 "^% Stop encountered:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
548 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
549 "*A list of regular expressions matching IDL messages. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
550 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
|
551 IDL is currently stopped.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
552 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
553 (defconst idlwave-shell-halt-messages-re |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
554 (mapconcat 'identity idlwave-shell-halt-messages "\\|") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
555 "The regular expression computed from idlwave-shell-halt-messages") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
556 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
557 (defconst idlwave-shell-trace-messages |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
558 '("^% At " ;; First line of a trace message |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
559 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
560 "*A list of regular expressions matching IDL trace messages. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
561 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
|
562 IDL will begin looking for the next statement to execute.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
563 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
564 (defconst idlwave-shell-step-messages |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
565 '("^% Stepped to:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
566 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
567 "*A list of regular expressions matching stepped execution messages. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
568 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
|
569 IDL has currently stepped.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
570 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
571 (defvar idlwave-shell-break-message "^% Breakpoint at:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
572 "*Regular expression matching an IDL breakpoint message line.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
573 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
574 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
575 (defvar idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
576 ;(defvar idlwave-shell-post-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
577 (defvar idlwave-shell-sources-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
578 (defvar idlwave-shell-menu-def) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
579 (defvar idlwave-shell-mode-menu) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
580 (defvar idlwave-shell-initial-commands) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
581 (defvar idlwave-shell-syntax-error) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
582 (defvar idlwave-shell-other-error) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
583 (defvar idlwave-shell-error-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
584 (defvar idlwave-shell-error-last) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
585 (defvar idlwave-shell-bp-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
586 (defvar idlwave-shell-sources-query) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
587 (defvar idlwave-shell-mode-map) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
588 (defvar idlwave-shell-calling-stack-index) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
589 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
590 (defun idlwave-shell-mode () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
591 "Major mode for interacting with an inferior IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
592 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
593 1. Shell Interaction |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
594 ----------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
595 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
|
596 end of process to the end of the current line. RET before end of |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
597 process output copies the current line (except for the prompt) to the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
598 end of the buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
599 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
600 Command history, searching of previous commands, command line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
601 editing are available via the comint-mode key bindings, by default |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
602 mostly on the key `C-c'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
603 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
604 2. Completion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
605 ---------- |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
606 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
|
607 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
|
608 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
|
609 like in `idlwave-mode'. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
610 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
611 3. Routine Info |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
612 ------------ |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
613 `\\[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
|
614 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
|
615 the one whose argument list is being edited. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
616 To update IDLWAVE's knowledge about compiled or edited modules, use |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
617 \\[idlwave-update-routine-info]. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
618 \\[idlwave-find-module] find the source of a module. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
619 \\[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
|
620 \\[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
|
621 point, if online help has been installed. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
622 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
623 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
624 4. Debugging |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
625 --------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
626 A complete set of commands for compiling and debugging IDL programs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
627 is available from the menu. Also keybindings starting with a |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
628 `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
|
629 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
|
630 keybindings is again the menu. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
631 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
632 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
|
633 installed. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
634 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
635 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
|
636 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
|
637 window. Breakpoints are also highlighted in the source. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
638 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
639 \\[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
|
640 to correspond to the IDL process current directory. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
641 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
642 5. Hooks |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
643 ----- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
644 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
|
645 `idlwave-shell-mode-hook' (in that order). |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
646 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
647 6. Documentation and Customization |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
648 ------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
649 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
|
650 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
|
651 For Postscript and HTML versions of the documentation, check IDLWAVE's |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
652 homepage at `http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
653 IDLWAVE has customize support - see the group `idlwave'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
654 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
655 7. Keybindings |
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 \\{idlwave-shell-mode-map}" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
658 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
659 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
660 (setq comint-prompt-regexp idlwave-shell-prompt-pattern) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
661 (setq comint-process-echoes t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
662 ;; 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
|
663 (setq comint-input-autoexpand nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
664 (setq comint-input-ring-size 64) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
665 (make-local-variable 'comint-completion-addsuffix) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
666 (set (make-local-variable 'completion-ignore-case) t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
667 (setq comint-completion-addsuffix '("/" . "")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
668 (setq comint-input-ignoredups t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
669 (setq major-mode 'idlwave-shell-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
670 (setq mode-name "IDL-Shell") |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
671 (setq idlwave-shell-mode-line-info nil) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
672 (setq mode-line-format |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
673 '("" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
674 mode-line-modified |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
675 mode-line-buffer-identification |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
676 " " |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
677 global-mode-string |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
678 " %[(" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
679 mode-name |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
680 mode-line-process |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
681 minor-mode-alist |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
682 "%n" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
683 ")%]-" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
684 idlwave-shell-mode-line-info |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
685 "---" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
686 (line-number-mode "L%l--") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
687 (column-number-mode "C%c--") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
688 (-3 . "%p") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
689 "-%-")) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
690 ;; (make-local-variable 'idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
691 (setq idlwave-shell-halt-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
692 idlwave-shell-trace-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
693 idlwave-shell-command-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
694 idlwave-shell-step-frame nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
695 (idlwave-shell-display-line nil) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
696 (setq idlwave-shell-calling-stack-index 0) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
697 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
698 ;; 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
|
699 ;; 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
|
700 (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
|
701 (setq idlwave-idlwave_routine_info-compiled nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
702 (setq idlwave-shell-ready nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
703 (setq idlwave-shell-bp-alist nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
704 (idlwave-shell-update-bp-overlays) ; Throw away old overlays |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
705 (setq idlwave-shell-sources-alist nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
706 (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
|
707 (setq idlwave-shell-hide-output nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
708 (make-local-hook 'kill-buffer-hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
709 (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
|
710 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
|
711 (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
|
712 (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
|
713 (use-local-map idlwave-shell-mode-map) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
714 (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
|
715 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
716 ;; 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
|
717 (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
|
718 (set-syntax-table idlwave-mode-syntax-table) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
719 (setq comment-start ";") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
720 (setq abbrev-mode t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
721 (make-local-hook 'post-command-hook) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
722 (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
|
723 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
724 ;; Run the hooks. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
725 (run-hooks 'idlwave-shell-mode-hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
726 (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
727 ;; Define a system variable which knows the version of IDLWAVE |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
728 (idlwave-shell-send-command |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
729 (format "defsysv,'!idlwave_version','%s',1" idlwave-mode-version) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
730 nil 'hide) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
731 (if (and (not idlwave-path-alist) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
732 (not idlwave-sys-dir)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
733 (idlwave-shell-send-command idlwave-shell-path-query |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
734 'idlwave-shell-get-path-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
735 'hide))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
736 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
737 (defun idlwave-shell-get-path-info () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
738 (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
|
739 (sysdir (car rpl)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
740 (dirs (cdr rpl))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
741 (setq idlwave-sys-dir sysdir) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
742 (setq idlwave-path-alist (mapcar (lambda(x) (cons x nil)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
743 dirs)))) |
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 (if (not (fboundp 'idl-shell)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
746 (fset 'idl-shell 'idlwave-shell)) |
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-idl-wframe nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
749 "Frame for displaying the idl shell window.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
750 (defvar idlwave-shell-display-wframe nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
751 "Frame for displaying the idl source files.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
752 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
753 (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
|
754 (defvar idlwave-shell-calling-stack-routine nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
755 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
756 (defun idlwave-shell-source-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
757 "Return the frame to be used for source display." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
758 (if idlwave-shell-use-dedicated-frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
759 ;; We want separate frames for source and shell |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
760 (if (frame-live-p idlwave-shell-display-wframe) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
761 ;; The frame exists, so we use it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
762 idlwave-shell-display-wframe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
763 ;; The frame does not exist. We use the current frame. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
764 ;; However, if the current is the shell frame, we make a new frame. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
765 (setq idlwave-shell-display-wframe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
766 (if (eq (selected-frame) idlwave-shell-idl-wframe) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
767 (make-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
768 (selected-frame)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
769 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
770 (defun idlwave-shell-shell-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
771 "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
|
772 (if idlwave-shell-use-dedicated-frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
773 ;; We want a dedicated frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
774 (if (frame-live-p idlwave-shell-idl-wframe) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
775 ;; It does exist, so we use it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
776 idlwave-shell-idl-wframe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
777 ;; 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
|
778 (if (not (frame-live-p idlwave-shell-display-wframe)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
779 ;; 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
|
780 (setq idlwave-shell-display-wframe (selected-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
781 ;; Return a new frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
782 (setq idlwave-shell-idl-wframe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
783 (make-frame idlwave-shell-frame-parameters))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
784 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
785 ;;;###autoload |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
786 (defun idlwave-shell (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
787 "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
|
788 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
|
789 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
|
790 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
791 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
|
792 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
|
793 separate frames. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
794 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
795 The command to run comes from variable `idlwave-shell-explicit-file-name'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
796 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
797 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
|
798 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
|
799 See also the variable `idlwave-shell-prompt-pattern'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
800 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
801 \(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
|
802 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
803 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
804 ;; A non-nil arg means, we want a dedicated frame. This will last |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
805 ;; for the current editing session. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
806 (if arg (setq idlwave-shell-use-dedicated-frame t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
807 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil)) |
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 ;; Check if the process still exists. If not, create it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
810 (unless (comint-check-proc (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
811 (let* ((prg (or idlwave-shell-explicit-file-name "idl")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
812 (buf (apply 'make-comint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
813 idlwave-shell-process-name prg nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
814 idlwave-shell-command-line-options)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
815 ;; FIXME: the next line can go? |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
816 ;(buf (make-comint idlwave-shell-process-name prg)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
817 (process (get-buffer-process buf))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
818 (setq idlwave-idlwave_routine_info-compiled nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
819 (set-process-filter process 'idlwave-shell-filter) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
820 (set-process-sentinel process 'idlwave-shell-sentinel) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
821 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
822 (idlwave-shell-mode))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
823 (let ((window (idlwave-display-buffer (idlwave-shell-buffer) nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
824 (idlwave-shell-shell-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
825 (current-window (selected-window))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
826 (select-window window) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
827 (goto-char (point-max)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
828 (select-window current-window) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
829 (raise-frame (window-frame window)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
830 (if (eq (selected-frame) (window-frame window)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
831 (select-window window)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
832 )) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
833 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
834 (defun idlwave-shell-recenter-shell-window (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
835 "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
|
836 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
837 (let ((window (selected-window))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
838 (idlwave-shell arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
839 (select-window window))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
840 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
841 (defun idlwave-shell-send-command (&optional cmd pcmd hide preempt) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
842 "Send a command to IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
843 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
844 \(CMD PCMD HIDE\) are placed at the end of `idlwave-shell-pending-commands'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
845 If IDL is ready the first command, CMD, in |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
846 `idlwave-shell-pending-commands' is sent to the IDL process. If optional |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
847 second argument PCMD is non-nil it will be placed on |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
848 `idlwave-shell-post-command-hook' when CMD is executed. If the optional |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
849 third argument HIDE is non-nil, then hide output from CMD. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
850 If optional fourth argument PREEMPT is non-nil CMD is put at front of |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
851 `idlwave-shell-pending-commands'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
852 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
853 IDL is considered ready if the prompt is present |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
854 and if `idlwave-shell-ready' is non-nil." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
855 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
856 ;(setq hide nil) ; FIXME: turn this on for debugging only |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
857 (let (buf proc) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
858 ;; Get or make the buffer and its process |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
859 (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
|
860 (not (setq proc (get-buffer-process buf)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
861 (if (not idlwave-shell-automatic-start) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
862 (error |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
863 (substitute-command-keys |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
864 "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
|
865 (idlwave-shell-recenter-shell-window) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
866 (setq buf (get-buffer (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
867 (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
|
868 (not (setq proc (get-buffer-process buf)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
869 ;; Still nothing |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
870 (error "Problem with autostarting IDL shell")))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
871 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
872 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
873 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
874 (goto-char (process-mark proc)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
875 ;; 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
|
876 (if cmd |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
877 (setq idlwave-shell-pending-commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
878 (if preempt |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
879 ;; Put at front. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
880 (append (list (list cmd pcmd hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
881 idlwave-shell-pending-commands) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
882 ;; Put at end. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
883 (append idlwave-shell-pending-commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
884 (list (list cmd pcmd hide)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
885 ;; Check if IDL ready |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
886 (if (and idlwave-shell-ready |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
887 ;; Check for IDL prompt |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
888 (save-excursion |
30648
4ee57139dc05
(idlwave-shell-send-command): When looking for a prompt, (forward-line 0)
Miles Bader <miles@gnu.org>
parents:
29774
diff
changeset
|
889 ;; Using (forward-line 0) instead of beginning-of-line |
4ee57139dc05
(idlwave-shell-send-command): When looking for a prompt, (forward-line 0)
Miles Bader <miles@gnu.org>
parents:
29774
diff
changeset
|
890 ;; avoids any field constraints. |
4ee57139dc05
(idlwave-shell-send-command): When looking for a prompt, (forward-line 0)
Miles Bader <miles@gnu.org>
parents:
29774
diff
changeset
|
891 (forward-line 0) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
892 (looking-at idlwave-shell-prompt-pattern))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
893 ;; IDL ready for command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
894 (if idlwave-shell-pending-commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
895 ;; execute command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
896 (let* ((lcmd (car idlwave-shell-pending-commands)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
897 (cmd (car lcmd)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
898 (pcmd (nth 1 lcmd)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
899 (hide (nth 2 lcmd))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
900 ;; If this is an executive command, reset the stack pointer |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
901 (if (eq (string-to-char cmd) ?.) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
902 (setq idlwave-shell-calling-stack-index 0)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
903 ;; Set post-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
904 (setq idlwave-shell-post-command-hook pcmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
905 ;; Output hiding |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
906 ;;; Debug code |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
907 ;;; (setq idlwave-shell-hide-output nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
908 (setq idlwave-shell-hide-output hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
909 ;; Pop command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
910 (setq idlwave-shell-pending-commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
911 (cdr idlwave-shell-pending-commands)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
912 ;; Send command for execution |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
913 (set-marker comint-last-input-start (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
914 (set-marker comint-last-input-end (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
915 (comint-simple-send proc cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
916 (setq idlwave-shell-ready nil))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
917 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
918 (defun idlwave-shell-send-char (c &optional no-error) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
919 "Send one character to the shell, without a newline." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
920 (interactive "cChar to send to IDL: ") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
921 (let ((errf (if (interactive-p) 'error 'message)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
922 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
|
923 (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
|
924 (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
|
925 (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
|
926 (if (equal c ?\C-g) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
927 (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
|
928 (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
|
929 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
930 (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
|
931 (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
|
932 "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
|
933 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
|
934 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
935 ((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
|
936 (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
|
937 ((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
|
938 (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
|
939 (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
|
940 ((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
|
941 ;; 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
|
942 (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
|
943 (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
|
944 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
|
945 (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
|
946 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
947 (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
|
948 (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
|
949 "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
|
950 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
|
951 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
|
952 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
|
953 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
|
954 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
|
955 (interactive) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
956 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
957 ;; 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
|
958 (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
|
959 (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
|
960 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
|
961 (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
|
962 (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
|
963 (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
|
964 (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
|
965 (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
|
966 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
967 ;; OK, start 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
|
968 (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
|
969 (message |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
970 (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
|
971 (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
|
972 ;; 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
|
973 ;; 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
|
974 (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
|
975 ;; 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
|
976 (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
|
977 (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
|
978 (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
|
979 (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
|
980 (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
|
981 ;; 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
|
982 (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
|
983 (setq c (read-char)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
984 (error (setq c nil))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
985 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
986 ((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
|
987 (ding)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
988 ((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
|
989 (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
|
990 (ding) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
991 (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
|
992 (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
|
993 (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
|
994 (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
|
995 (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
|
996 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
997 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
998 ;; There was a report that a newer version of comint.el changed the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
999 ;; name of comint-filter to comint-output-filter. Unfortunately, we |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1000 ;; have yet to upgrade. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1001 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1002 (defun idlwave-shell-comint-filter (process string) nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1003 (if (fboundp 'comint-output-filter) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1004 (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
|
1005 (fset 'idlwave-shell-comint-filter (symbol-function 'comint-filter))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1006 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1007 (defun idlwave-shell-is-running () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1008 "Return t if the shell process is running." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1009 (eq (process-status idlwave-shell-process-name) 'run)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1010 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1011 (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
|
1012 "Buffer containing hidden output from IDL commands.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1013 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1014 (defun idlwave-shell-filter (proc string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1015 "Replace Carriage returns in output. Watch for prompt. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1016 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
|
1017 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
|
1018 ;; We no longer do the cleanup here - this is done by the process sentinel |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1019 (when (eq (process-status idlwave-shell-process-name) 'run) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1020 ;; OK, process is still running, so we can use it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1021 (let ((data (match-data))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1022 (unwind-protect |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1023 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1024 ;; May change the original match data. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1025 (let (p) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1026 (while (setq p (string-match "\C-M" string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1027 (aset string p ? ))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1028 ;;; Test/Debug code |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1029 ;; (save-excursion (set-buffer (get-buffer-create "*test*")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1030 ;; (goto-char (point-max)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1031 ;; (insert "%%%" string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1032 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1033 ;; Keep output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1034 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1035 ; Should not keep output because the concat is costly. If hidden put |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1036 ; the output in a hide-buffer. Then when the output is needed in post |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1037 ; processing can access either the hide buffer or the idlwave-shell |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1038 ; buffer. Then watching for the prompt is easier. Furthermore, if it |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1039 ; is hidden and there is no post command, could throw away output. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1040 ; (setq idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1041 ; (concat idlwave-shell-command-output string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1042 ;; Insert the string. Do this before getting the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1043 ;; state. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1044 (if idlwave-shell-hide-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1045 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1046 (set-buffer |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1047 (get-buffer-create idlwave-shell-hidden-output-buffer)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1048 (goto-char (point-max)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1049 (insert string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1050 (idlwave-shell-comint-filter proc string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1051 ;; Watch for prompt - need to accumulate the current line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1052 ;; since it may not be sent all at once. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1053 (if (string-match "\n" string) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1054 (progn |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1055 (if idlwave-shell-use-input-mode-magic |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1056 (idlwave-shell-input-mode-magic |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1057 (concat idlwave-shell-accumulation string))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1058 (setq idlwave-shell-accumulation |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1059 (substring string |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1060 (progn (string-match "\\(.*\n\\)*" string) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1061 (match-end 0))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1062 (setq idlwave-shell-accumulation |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1063 (concat idlwave-shell-accumulation 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
|
1064 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1065 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1066 ;; Check for prompt in current line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1067 (if (setq idlwave-shell-ready |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1068 (string-match idlwave-shell-prompt-pattern |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1069 idlwave-shell-accumulation)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1070 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1071 (if idlwave-shell-hide-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1072 (save-excursion |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1073 (set-buffer idlwave-shell-hidden-output-buffer) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1074 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1075 (re-search-forward idlwave-shell-prompt-pattern nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1076 (setq idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1077 (buffer-substring (point-min) (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1078 (delete-region (point-min) (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1079 (setq idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1080 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1081 (set-buffer |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1082 (process-buffer proc)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1083 (buffer-substring |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1084 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1085 (goto-char (process-mark proc)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1086 (beginning-of-line nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1087 (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1088 comint-last-input-end)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1089 ;;; Test/Debug code |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1090 ;; (save-excursion (set-buffer |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1091 ;; (get-buffer-create "*idlwave-shell-output*")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1092 ;; (goto-char (point-max)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1093 ;; (insert "%%%" string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1094 ;; Scan for state and do post command - bracket them |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1095 ;; with idlwave-shell-ready=nil since they |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1096 ;; may call idlwave-shell-send-command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1097 (let ((idlwave-shell-ready nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1098 (idlwave-shell-scan-for-state) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1099 ;; Unset idlwave-shell-ready to prevent sending |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1100 ;; commands to IDL while running hook. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1101 (if (listp idlwave-shell-post-command-hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1102 (eval idlwave-shell-post-command-hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1103 (funcall idlwave-shell-post-command-hook)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1104 ;; Reset to default state for next command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1105 ;; Also we do not want to find this prompt again. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1106 (setq idlwave-shell-accumulation nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1107 idlwave-shell-command-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1108 idlwave-shell-post-command-hook nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1109 idlwave-shell-hide-output nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1110 ;; Done with post command. Do pending command if |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1111 ;; any. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1112 (idlwave-shell-send-command)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1113 (store-match-data data))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1114 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1115 (defun idlwave-shell-sentinel (process event) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1116 "The sentinel function for the IDLWAVE shell process." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1117 (let* ((buf (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1118 (win (get-buffer-window buf))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1119 (when (get-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1120 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1121 (set-buffer (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1122 (goto-char (point-max)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1123 (insert (format "\n\n Process %s %s" process event)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1124 (when (and (> (length (frame-list)) 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1125 (frame-live-p idlwave-shell-idl-wframe)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1126 (delete-frame idlwave-shell-idl-wframe) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1127 (setq idlwave-shell-idl-wframe nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1128 idlwave-shell-display-wframe 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
|
1129 (when (and (window-live-p win) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1130 (not (one-window-p))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1131 (delete-window win)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1132 (idlwave-shell-cleanup))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1133 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1134 (defun idlwave-shell-scan-for-state () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1135 "Scan for state info. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1136 Looks for messages in output from last IDL command indicating where |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1137 IDL has stopped. The types of messages we are interested in are |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1138 execution halted, stepped, breakpoint, interrupted at and trace |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1139 messages. We ignore error messages otherwise. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1140 For breakpoint messages process any attached count or command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1141 parameters. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1142 Update the windows if a message is found." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1143 (let (update) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1144 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1145 ;; Make sure we have output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1146 ((not idlwave-shell-command-output)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1147 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1148 ;; Various types of HALT messages. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1149 ((string-match idlwave-shell-halt-messages-re |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1150 idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1151 ;; Grab the file and line state info. |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1152 (setq idlwave-shell-calling-stack-index 0) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1153 (setq idlwave-shell-halt-frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1154 (idlwave-shell-parse-line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1155 (substring idlwave-shell-command-output (match-end 0))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1156 update t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1157 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1158 ;; Handle breakpoints separately |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1159 ((string-match idlwave-shell-break-message |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1160 idlwave-shell-command-output) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1161 (setq idlwave-shell-calling-stack-index 0) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1162 (setq idlwave-shell-halt-frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1163 (idlwave-shell-parse-line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1164 (substring idlwave-shell-command-output (match-end 0))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1165 update t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1166 ;; We used to to counting hits on breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1167 ;; this is no longer supported since IDL breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1168 ;; have learned counting. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1169 ;; Do breakpoint command processing |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1170 (let ((bp (assoc |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1171 (list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1172 (nth 0 idlwave-shell-halt-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1173 (nth 1 idlwave-shell-halt-frame)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1174 idlwave-shell-bp-alist))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1175 (if bp |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1176 (let ((cmd (idlwave-shell-bp-get bp 'cmd))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1177 (if cmd |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1178 ;; Execute command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1179 (if (listp cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1180 (eval cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1181 (funcall cmd)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1182 ;; A breakpoint that we did not know about - perhaps it was |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1183 ;; set by the user or IDL isn't reporting breakpoints like |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1184 ;; we expect. Lets update our list. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1185 (idlwave-shell-bp-query))))) |
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 ;; Handle compilation errors in addition to the above |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1188 (if (and idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1189 (or (string-match |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1190 idlwave-shell-syntax-error idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1191 (string-match |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1192 idlwave-shell-other-error idlwave-shell-command-output))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1193 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1194 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1195 (set-buffer |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1196 (get-buffer-create idlwave-shell-error-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1197 (erase-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1198 (insert idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1199 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1200 (setq idlwave-shell-error-last (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1201 (idlwave-shell-goto-next-error))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1202 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1203 ;; Do update |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1204 (when update |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1205 (idlwave-shell-display-line (idlwave-shell-pc-frame))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1206 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1207 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1208 (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1209 "Buffer containing syntax errors from IDL compilations.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1210 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1211 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1212 ;; FIXME: the following two variables do not currently allow line breaks |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1213 ;; in module and file names. I am not sure if it will be necessary to |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1214 ;; change this. Currently it seems to work the way it is. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1215 (defvar idlwave-shell-syntax-error |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1216 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1217 "A regular expression to match an IDL syntax error. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1218 The first \(..\) pair should match the file name. The second pair |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1219 should match the line number.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1220 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1221 (defvar idlwave-shell-other-error |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1222 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1223 "A regular expression to match any IDL error. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1224 The first \(..\) pair should match the file name. The second pair |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1225 should match the line number.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1226 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1227 (defvar idlwave-shell-file-line-message |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1228 (concat |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1229 "\\(" ; program name group (1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1230 "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter, followed by [..] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1231 "\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1232 "\\)" ; end program name group (1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1233 "[ \t\n]+" ; white space |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1234 "\\(" ; line number group (3) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1235 "[0-9]+" ; the line number (the fix point) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1236 "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1237 "\\)" ; end line number group (3) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1238 "[ \t\n]+" ; white space |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1239 "\\(" ; file name group (5) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1240 "[^ \t\n]+" ; file names can contain any non-white |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1241 "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1242 "\\)" ; end line number group (5) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1243 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1244 "*A regular expression to parse out the file name and line number. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1245 The 1st group should match the subroutine name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1246 The 3rd group is the line number. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1247 The 5th group is the file name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1248 All parts may contain linebreaks surrounded by spaces. This is important |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1249 in IDL5 which inserts random linebreaks in long module and file names.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1250 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1251 (defun idlwave-shell-parse-line (string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1252 "Parse IDL message for the subroutine, file name and line number. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1253 We need to work hard here to remove the stupid line breaks inserted by |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1254 IDL5. These line breaks can be right in the middle of procedure |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1255 or file names. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1256 It is very difficult to come up with a robust solution. This one seems |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1257 to be pretty good though. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1258 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1259 Here is in what ways it improves over the previous solution: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1260 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1261 1. The procedure name can be split and will be restored. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1262 2. The number can be split. I have never seen this, but who knows. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1263 3. We do not require the `.pro' extension for files. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1264 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1265 This function can still break when the file name ends on a end line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1266 and the message line contains an additional line with garbage. Then |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1267 the first part of that garbage will be added to the file name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1268 However, the function checks the existence of the files with and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1269 without this last part - thus the function only breaks if file name |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1270 plus garbage match an existing regular file. This is hopefully very |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1271 unlikely." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1272 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1273 (let (number procedure file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1274 (when (string-match idlwave-shell-file-line-message string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1275 (setq procedure (match-string 1 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1276 number (match-string 3 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1277 file (match-string 5 string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1278 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1279 ;; Repair the strings |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1280 (setq procedure (idlwave-shell-repair-string procedure)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1281 (setq number (idlwave-shell-repair-string number)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1282 (setq file (idlwave-shell-repair-file-name file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1283 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1284 ;; If we have a file, return the frame list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1285 (if file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1286 (list (idlwave-shell-file-name file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1287 (string-to-int number) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1288 procedure) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1289 ;; No success finding a file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1290 nil)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1291 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1292 (defun idlwave-shell-repair-string (string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1293 "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
|
1294 (while (string-match "[ \t]*\n[ \t]*" string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1295 (setq string (replace-match "" t t string))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1296 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1297 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1298 (defun idlwave-shell-repair-file-name (file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1299 "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
|
1300 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
|
1301 file name." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1302 (let ((file1 "") (file2 "") (start 0)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1303 ;; We scan no further than to the next "^%" line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1304 (if (string-match "^%" file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1305 (setq file (substring file 0 (match-beginning 0)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1306 ;; Take out the line breaks |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1307 (while (string-match "[ \t]*\n[ \t]*" file start) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1308 (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
|
1309 start (match-end 0))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1310 (setq file2 (concat file1 (substring file start))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1311 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1312 ((file-regular-p file2) file2) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1313 ((file-regular-p file1) file1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1314 ;; 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
|
1315 ;; 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
|
1316 ;; 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
|
1317 ;; 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
|
1318 ((not (string= "" file1)) file1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1319 ((not (string= "" file2)) file2) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1320 (t nil)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1321 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1322 (defun idlwave-shell-cleanup () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1323 "Do necessary cleanup for a terminated IDL process." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1324 (setq idlwave-shell-step-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1325 idlwave-shell-halt-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1326 idlwave-shell-pending-commands nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1327 idlwave-shell-command-line-to-execute nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1328 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
|
1329 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
|
1330 idlwave-idlwave_routine_info-compiled nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1331 (idlwave-shell-delete-temp-files) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1332 (idlwave-shell-display-line nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1333 (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
|
1334 (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
|
1335 (idlwave-shell-kill-buffer idlwave-shell-bp-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1336 (idlwave-shell-kill-buffer idlwave-shell-error-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1337 ;; (idlwave-shell-kill-buffer (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1338 (and (get-buffer (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1339 (bury-buffer (get-buffer (idlwave-shell-buffer)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1340 (run-hooks 'idlwave-shell-cleanup-hook)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1341 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1342 (defun idlwave-shell-kill-buffer (buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1343 "Kill buffer BUF if it exists." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1344 (if (setq buf (get-buffer buf)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1345 (kill-buffer buf))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1346 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1347 (defun idlwave-shell-kill-shell-buffer-confirm () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1348 (when (idlwave-shell-is-running) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1349 (ding) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1350 (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
|
1351 (error "Abort")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1352 (message "Killing buffer *idl* and the associated process"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1353 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1354 (defun idlwave-shell-resync-dirs () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1355 "Resync the buffer's idea of the current directory stack. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1356 This command queries IDL with the command bound to |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1357 `idlwave-shell-dirstack-query' (default \"printd\"), reads the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1358 output for the new directory stack." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1359 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1360 (idlwave-shell-send-command idlwave-shell-dirstack-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1361 'idlwave-shell-filter-directory |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1362 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1363 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1364 (defun idlwave-shell-retall (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1365 "Return from the entire calling stack." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1366 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1367 (idlwave-shell-send-command "retall")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1368 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1369 (defun idlwave-shell-closeall (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1370 "Close all open files." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1371 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1372 (idlwave-shell-send-command "close,/all")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1373 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1374 (defun idlwave-shell-quit (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1375 "Exit the idl process after confirmation. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1376 With prefix ARG, exit without confirmation." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1377 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1378 (if (not (idlwave-shell-is-running)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1379 (error "Shell is not running") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1380 (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
|
1381 (condition-case nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1382 (idlwave-shell-send-command "exit") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1383 (error nil))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1384 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1385 (defun idlwave-shell-reset (&optional hidden) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1386 "Reset IDL. Return to main level and destroy the leaftover variables. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1387 This issues the following commands: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1388 RETALL |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1389 WIDGET_CONTROL,/RESET |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1390 CLOSE, /ALL |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1391 HEAP_GC, /VERBOSE" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1392 ;; OBJ_DESTROY, OBJ_VALID() FIXME: should this be added? |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1393 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1394 (message "Resetting IDL") |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1395 (setq idlwave-shell-calling-stack-index 0) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1396 (idlwave-shell-send-command "retall" nil hidden) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1397 (idlwave-shell-send-command "widget_control,/reset" nil hidden) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1398 (idlwave-shell-send-command "close,/all" nil hidden) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1399 ;; (idlwave-shell-send-command "obj_destroy, obj_valid()" nil hidden) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1400 (idlwave-shell-send-command "heap_gc,/verbose" nil hidden) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1401 (idlwave-shell-display-line nil)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1402 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1403 (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
|
1404 ;; 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
|
1405 (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
|
1406 (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
|
1407 (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
|
1408 dirs sysdir) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1409 (while (string-match "^PATH:[ \t]*\\(.*\\)\n" path-string start) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1410 (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
|
1411 (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
|
1412 (setq dirs (mapcar 'file-name-as-directory dirs)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1413 (if (string-match "^SYSDIR:[ \t]*\\(.*\\)\n" 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
|
1414 (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
|
1415 (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
|
1416 (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
|
1417 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1418 (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
|
1419 "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
|
1420 (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
|
1421 (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
|
1422 sep sep-re file type spec specs name cs key keys class entry) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1423 ;; 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
|
1424 (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
|
1425 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
|
1426 ;; 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
|
1427 (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
|
1428 "^>>>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
|
1429 text) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1430 (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
|
1431 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
|
1432 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
|
1433 ;; 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
|
1434 (setq sep "@" sep-re "@ *" text "") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1435 (message "Routine Info warning: No match for BEGIN line")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1436 (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
|
1437 (setq text (substring text 0 (match-beginning 0))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1438 (message "Routine Info warning: No match for END line")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1439 (if (string-match "\\S-" text) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1440 ;; Obviously, the pro worked. Make a note that we have it now. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1441 (setq idlwave-idlwave_routine_info-compiled t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1442 ;; 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
|
1443 (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
|
1444 (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
|
1445 (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
|
1446 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
|
1447 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
|
1448 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
|
1449 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
|
1450 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
|
1451 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
|
1452 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
|
1453 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
|
1454 (not (string-match "\\` *\\'" key))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1455 (mapcar 'list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1456 (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
|
1457 (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
|
1458 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
|
1459 file (if (equal file "") nil file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1460 keys (mapcar (lambda (x) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1461 (list (idlwave-sintern-keyword (car x) t))) keys)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1462 ;; Make sure we use the same string object for the same file |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1463 (setq file (idlwave-sintern-file file t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1464 ;; FIXME: What should I do with routines from the temp file??? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1465 ;; Maybe just leave it in - there is a chance that the |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1466 ;; routine is still in there. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1467 ;; (if (equal file idlwave-shell-temp-pro-file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1468 ;; (setq file nil)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1469 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1470 ;; 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
|
1471 ;; assuming that if the buffer stuff differs, it is a "new" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1472 ;; version. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1473 ;; 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
|
1474 ;; but I think frequently a user might have several versions of |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1475 ;; the same function in different programs, and in this case the |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1476 ;; compiled one will be the best guess of all version. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1477 ;; 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
|
1478 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1479 (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
|
1480 ((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
|
1481 ;; 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
|
1482 (or t (null file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1483 (not (idlwave-rinfo-assq name 'pro class |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1484 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
|
1485 ;; FIXME: is it OK to make the library 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
|
1486 ;;(not (idlwave-rinfo-assq name 'pro class |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1487 ;; 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
|
1488 ) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1489 (setq entry (list name 'pro class (cons 'compiled file) cs keys)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1490 (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
|
1491 (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
|
1492 (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
|
1493 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1494 ((and (string= type "FUN") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1495 ;; 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
|
1496 (or t (not file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1497 (not (idlwave-rinfo-assq name 'fun class |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1498 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
|
1499 ;; FIXME: is it OK to make the library 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
|
1500 ;; (not (idlwave-rinfo-assq name 'fun class |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1501 ;; 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
|
1502 ) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1503 (setq entry (list name 'fun class (cons 'compiled file) cs keys)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1504 (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
|
1505 (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
|
1506 (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
|
1507 ;; 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
|
1508 (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
|
1509 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
|
1510 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1511 (defun idlwave-shell-filter-directory () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1512 "Get the current directory from `idlwave-shell-command-output'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1513 Change the default directory for the process buffer to concur." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1514 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1515 (set-buffer (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1516 (if (string-match "Current Directory: *\\(\\S-*\\) *$" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1517 idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1518 (let ((dir (substring idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1519 (match-beginning 1) (match-end 1)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1520 (message "Setting Emacs wd to %s" dir) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1521 (setq idlwave-shell-default-directory dir) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1522 (setq default-directory (file-name-as-directory dir)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1523 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1524 (defun idlwave-shell-complete (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1525 "Do completion in the idlwave-shell buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1526 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
|
1527 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
|
1528 keywords." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1529 ;;FIXME: batch files? |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1530 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1531 (let (cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1532 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1533 ((setq cmd (idlwave-shell-executive-command)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1534 ;; We are in a command line with an executive command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1535 (if (member (upcase cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1536 '(".R" ".RU" ".RUN" ".RN" ".RNE" ".RNEW" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1537 ".COM" ".COMP" ".COMPI" ".COMPIL" ".COMPILE")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1538 ;; This command expects file names |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1539 (idlwave-shell-complete-filename))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1540 ((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
|
1541 (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
|
1542 (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
|
1543 (let ((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
|
1544 (not (looking-at ".*obj_new")))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1545 ;; In a string, could be a file name to here |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1546 (idlwave-shell-complete-filename))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1547 (t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1548 ;; 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
|
1549 (idlwave-complete arg))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1550 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1551 (defun idlwave-shell-complete-filename (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1552 "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
|
1553 We assume that we are after a file name when completing one of the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1554 args of an executive .run, .rnew or .compile. Also, in a string |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1555 constant we complete file names. Otherwise return nil, so that |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1556 other completion functions can do thier work." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1557 (let* ((comint-file-name-chars idlwave-shell-file-name-chars) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1558 (completion-ignore-case (default-value 'completion-ignore-case))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1559 (comint-dynamic-complete-filename))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1560 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1561 (defun idlwave-shell-executive-command () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1562 "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
|
1563 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1564 (idlwave-beginning-of-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1565 (if (looking-at "[ \t]*\\([.][^ \t\n\r]*\\)") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1566 (match-string 1)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1567 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1568 (defun idlwave-shell-filename-string () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1569 "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
|
1570 (let ((limit (save-excursion (beginning-of-line) (point)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1571 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1572 ;; Skip backwards over file name chars |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1573 (skip-chars-backward idlwave-shell-file-name-chars limit) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1574 ;; Check of the next char is a string delimiter |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1575 (memq (preceding-char) '(?\' ?\"))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1576 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1577 ;;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1578 ;;; This section contains code for debugging IDL programs. -------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1579 ;;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1580 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1581 (defun idlwave-shell-redisplay (&optional hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1582 "Tries to resync the display with where execution has stopped. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1583 Issues a \"help,/trace\" command followed by a call to |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1584 `idlwave-shell-display-line'. Also updates the breakpoint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1585 overlays." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1586 (interactive) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1587 (setq idlwave-shell-calling-stack-index 0) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1588 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1589 "help,/trace" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1590 '(idlwave-shell-display-line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1591 (idlwave-shell-pc-frame)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1592 hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1593 (idlwave-shell-bp-query)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1594 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1595 (defun idlwave-shell-display-level-in-calling-stack (&optional hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1596 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1597 "help,/trace" |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1598 `(progn |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1599 ;; 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
|
1600 (setq idlwave-shell-calling-stack-index |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1601 ,idlwave-shell-calling-stack-index) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1602 ;; 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
|
1603 (idlwave-shell-parse-stack-and-display)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1604 hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1605 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1606 (defun idlwave-shell-parse-stack-and-display () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1607 (let* ((lines (delete "" (idlwave-split-string |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1608 idlwave-shell-command-output "^%"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1609 (stack (delq nil (mapcar 'idlwave-shell-parse-line lines))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1610 (nmax (1- (length stack))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1611 (nmin 0) message) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1612 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1613 ((< 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
|
1614 (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
|
1615 (ding) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1616 (message "Problem with calling stack")) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1617 ((> idlwave-shell-calling-stack-index nmax) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1618 (ding) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1619 (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
|
1620 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
|
1621 (- nmax)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1622 ((< idlwave-shell-calling-stack-index nmin) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1623 (ding) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1624 (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
|
1625 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
|
1626 (- nmin))))) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1627 (setq idlwave-shell-calling-stack-routine |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1628 (nth 2 (nth idlwave-shell-calling-stack-index stack))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1629 (idlwave-shell-display-line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1630 (nth idlwave-shell-calling-stack-index stack)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1631 (message (or message |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1632 (format "In routine %s (stack level %d)" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1633 idlwave-shell-calling-stack-routine |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1634 (- idlwave-shell-calling-stack-index)))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1635 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1636 (defun idlwave-shell-stack-up () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1637 "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
|
1638 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1639 (incf idlwave-shell-calling-stack-index) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1640 (idlwave-shell-display-level-in-calling-stack 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1641 (defun idlwave-shell-stack-down () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1642 "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
|
1643 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1644 (decf idlwave-shell-calling-stack-index) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1645 (idlwave-shell-display-level-in-calling-stack 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1646 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1647 (defun idlwave-shell-goto-frame (&optional frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1648 "Set buffer to FRAME with point at the frame line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1649 If the optional argument FRAME is nil then idlwave-shell-pc-frame is |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1650 used. Does nothing if the resulting frame is nil." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1651 (if frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1652 (setq frame (idlwave-shell-pc-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1653 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1654 (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
|
1655 (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
|
1656 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1657 (goto-line (nth 1 frame))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1658 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1659 (defun idlwave-shell-pc-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1660 "Returns the frame for IDL execution." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1661 (and idlwave-shell-halt-frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1662 (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
|
1663 (nth 1 idlwave-shell-halt-frame) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1664 (nth 2 idlwave-shell-halt-frame)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1665 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1666 (defun idlwave-shell-valid-frame (frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1667 "Check that frame is for an existing file." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1668 (file-readable-p (car frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1669 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1670 (defun idlwave-shell-display-line (frame &optional col) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1671 "Display FRAME file in other window with overlay arrow. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1672 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1673 FRAME is a list of file name, line number, and subroutine name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1674 If FRAME is nil then remove overlay." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1675 (if (not frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1676 ;; Remove stop-line overlay from old position |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1677 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1678 (setq overlay-arrow-string nil) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1679 (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
|
1680 (setq idlwave-shell-is-stopped nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1681 (if idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1682 (delete-overlay idlwave-shell-stop-line-overlay))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1683 (if (not (idlwave-shell-valid-frame frame)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1684 ;; FIXME: errors are dangerous in shell filters. But I think I |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1685 ;; have never encountered this one. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1686 (error (concat "Invalid frame - unable to access file: " (car frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1687 ;;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1688 ;;; buffer : the buffer to display a line in. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1689 ;;; select-shell: current buffer is the shell. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1690 ;;; |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1691 (setq idlwave-shell-mode-line-info |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1692 (if (nth 2 frame) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1693 (format "[%d:%s]" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1694 (- idlwave-shell-calling-stack-index) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1695 (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
|
1696 (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
|
1697 (select-shell (equal (buffer-name) (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1698 window pos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1699 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1700 ;; First make sure the shell window is visible |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1701 (idlwave-display-buffer (idlwave-shell-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1702 nil (idlwave-shell-shell-frame)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1703 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1704 ;; Now display the buffer and remember which window it is. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1705 (setq window (idlwave-display-buffer buffer |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1706 nil (idlwave-shell-source-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1707 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1708 ;; Enter the buffer and mark the line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1709 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1710 (set-buffer buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1711 (save-restriction |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1712 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1713 (goto-line (nth 1 frame)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1714 (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
|
1715 (setq idlwave-shell-is-stopped t) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1716 (if idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1717 ;; Move overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1718 (move-overlay idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1719 (point) (save-excursion (end-of-line) (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1720 (current-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1721 ;; Use the arrow instead, but only if marking is wanted. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1722 (if idlwave-shell-mark-stop-line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1723 (setq overlay-arrow-string idlwave-shell-overlay-arrow)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1724 (or overlay-arrow-position ; create the marker if necessary |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1725 (setq overlay-arrow-position (make-marker))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1726 (set-marker overlay-arrow-position (point) buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1727 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1728 ;; If the point is outside the restriction, widen the buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1729 (if (or (< pos (point-min)) (> pos (point-max))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1730 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1731 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1732 (goto-char pos))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1733 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1734 ;; If we have the column of the error, move the cursor there. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1735 (if col (move-to-column col)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1736 (setq pos (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1737 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1738 ;; Make sure pos is really displayed in the window. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1739 (set-window-point window pos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1740 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1741 ;; FIXME: the following frame redraw was taken out because it |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1742 ;; flashes. I think it is not needed. The code is left here in |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1743 ;; case we have to put it back in. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1744 ;; (redraw-frame (window-frame window)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1745 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1746 ;; If we came from the shell, go back there. Otherwise select |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1747 ;; the window where the error is displayed. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1748 (if (and (equal (buffer-name) (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1749 (not select-shell)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1750 (select-window window)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1751 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1752 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1753 (defun idlwave-shell-step (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1754 "Step one source line. If given prefix argument ARG, step ARG source lines." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1755 (interactive "p") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1756 (or (not arg) (< arg 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1757 (setq arg 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1758 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1759 (concat ".s " (if (integerp arg) (int-to-string arg) arg)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1760 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1761 (defun idlwave-shell-stepover (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1762 "Stepover one source line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1763 If given prefix argument ARG, step ARG source lines. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1764 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
|
1765 (interactive "p") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1766 (or (not arg) (< arg 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1767 (setq arg 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1768 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1769 (concat ".so " (if (integerp arg) (int-to-string arg) arg)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1770 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1771 (defun idlwave-shell-break-here (&optional count cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1772 "Set breakpoint at current line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1773 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1774 If Count is nil then an ordinary breakpoint is set. We treat a count |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1775 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
|
1776 than 1 use the IDL AFTER=count keyword to break only after reaching |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1777 the statement count times. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1778 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1779 Optional argument CMD is a list or function to evaluate upon reaching |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1780 the breakpoint." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1781 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1782 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1783 (if (listp count) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1784 (setq count nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1785 (idlwave-shell-set-bp |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1786 ;; Create breakpoint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1787 (idlwave-shell-bp (idlwave-shell-current-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1788 (list count cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1789 (idlwave-shell-current-module)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1790 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1791 (defun idlwave-shell-set-bp-check (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1792 "Check for failure to set breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1793 This is run on `idlwave-shell-post-command-hook'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1794 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
|
1795 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
|
1796 ;; Scan for message |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1797 (if (and idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1798 (string-match "% BREAKPOINT: *Unable to find code" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1799 idlwave-shell-command-output)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1800 ;; Offer to recompile |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1801 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1802 (if (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1803 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1804 (y-or-n-p |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1805 (concat "Okay to recompile file " |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1806 (idlwave-shell-bp-get bp 'file) " "))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1807 ;; Recompile |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1808 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1809 ;; Clean up before retrying |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1810 (idlwave-shell-command-failure) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1811 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1812 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1813 ;; Try setting breakpoint again |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1814 (idlwave-shell-set-bp bp)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1815 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1816 (message "Unable to set breakpoint.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1817 (idlwave-shell-command-failure) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1818 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1819 ;; return non-nil if no error found |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1820 nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1821 'okay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1822 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1823 (defun idlwave-shell-command-failure () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1824 "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
|
1825 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
|
1826 that detects the failure of a command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1827 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
|
1828 breakpoint can not be set." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1829 ;; Clear pending commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1830 (setq idlwave-shell-pending-commands nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1831 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1832 (defun idlwave-shell-cont () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1833 "Continue executing." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1834 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1835 (idlwave-shell-send-command ".c" '(idlwave-shell-redisplay 'hide))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1836 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1837 (defun idlwave-shell-go () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1838 "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
|
1839 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1840 (idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide))) |
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-return () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1843 "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
|
1844 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1845 (idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1846 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1847 (defun idlwave-shell-skip () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1848 "Run .SKIP (skip one line, then step)." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1849 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1850 (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1851 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1852 (defun idlwave-shell-clear-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1853 "Clear breakpoint BP. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1854 Clears in IDL and in `idlwave-shell-bp-alist'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1855 (let ((index (idlwave-shell-bp-get bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1856 (if index |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1857 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1858 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1859 (concat "breakpoint,/clear," |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1860 (if (integerp index) (int-to-string index) index))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1861 (idlwave-shell-bp-query))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1862 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1863 (defun idlwave-shell-current-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1864 "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
|
1865 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
|
1866 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1867 ;; In IDL shell |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1868 (idlwave-shell-pc-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1869 ;; In source |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1870 (list (idlwave-shell-file-name (buffer-file-name)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1871 (save-restriction |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1872 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1873 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1874 (beginning-of-line) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1875 (1+ (count-lines 1 (point)))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1876 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1877 (defun idlwave-shell-current-module () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1878 "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
|
1879 Returns nil if unable to obtain a module name." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1880 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1881 ;; In IDL shell |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1882 (nth 2 idlwave-shell-halt-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1883 ;; In pro file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1884 (save-restriction |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1885 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1886 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1887 (if (idlwave-prev-index-position) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1888 (upcase (idlwave-unit-name))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1889 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1890 (defun idlwave-shell-clear-current-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1891 "Remove breakpoint at current line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1892 This command can be called from the shell buffer if IDL is currently stopped |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1893 at a breakpoint." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1894 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1895 (let ((bp (idlwave-shell-find-bp (idlwave-shell-current-frame)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1896 (if bp (idlwave-shell-clear-bp bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1897 ;; Try moving to beginning of statement |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1898 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1899 (idlwave-shell-goto-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1900 (idlwave-beginning-of-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1901 (setq bp (idlwave-shell-find-bp (idlwave-shell-current-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1902 (if bp (idlwave-shell-clear-bp bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1903 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1904 (message "Cannot identify breakpoint for this line")))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1905 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1906 (defun idlwave-shell-to-here () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1907 "Set a breakpoint with count 1 then continue." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1908 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1909 (idlwave-shell-break-here 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1910 (idlwave-shell-cont)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1911 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1912 (defun idlwave-shell-break-in (&optional module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1913 "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
|
1914 The command looks for an identifier near point and sets a breakpoint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1915 for the first line of the corresponding module." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1916 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1917 ;; get the identifier |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1918 (let (module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1919 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1920 (skip-chars-backward "a-zA-Z0-9_$") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1921 (if (looking-at idlwave-identifier) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1922 (setq module (match-string 0)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1923 (error "No identifier at point"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1924 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1925 idlwave-shell-sources-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1926 `(progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1927 (idlwave-shell-sources-filter) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1928 (idlwave-shell-set-bp-in-module ,module)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1929 'hide))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1930 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1931 (defun idlwave-shell-set-bp-in-module (module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1932 "Set breakpoint in module. Assumes that `idlwave-shell-sources-alist' |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1933 contains an entry for that module." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1934 (let ((source-file (car-safe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1935 (cdr-safe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1936 (assoc (upcase module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1937 idlwave-shell-sources-alist)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1938 buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1939 (if (or (not source-file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1940 (not (file-regular-p source-file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1941 (not (setq buf |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1942 (or (idlwave-get-buffer-visiting source-file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1943 (find-file-noselect source-file))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1944 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1945 (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
|
1946 module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1947 (beep)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1948 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1949 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1950 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1951 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1952 (let ((case-fold-search t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1953 (if (re-search-forward |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1954 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1955 (downcase module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1956 "[ \t\n,]") nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1957 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1958 (goto-char (match-beginning 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1959 (message "Setting breakpoint for module %s" module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1960 (idlwave-shell-break-here)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1961 (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
|
1962 (beep)))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1963 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1964 (defun idlwave-shell-up () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1965 "Run to end of current block. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1966 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
|
1967 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1968 (if (idlwave-shell-pc-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1969 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1970 (idlwave-shell-goto-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1971 ;; find end of subprogram |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1972 (let ((eos (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1973 (idlwave-beginning-of-subprogram) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1974 (idlwave-forward-block) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1975 (point)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1976 (idlwave-backward-up-block -1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1977 ;; 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
|
1978 ;; 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
|
1979 ;; 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
|
1980 (idlwave-next-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1981 (idlwave-end-of-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1982 ;; Make sure we are not beyond subprogram |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1983 (if (< (point) eos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1984 ;; okay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1985 () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1986 ;; Move back inside subprogram |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1987 (goto-char eos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1988 (idlwave-previous-statement)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1989 (idlwave-shell-to-here))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1990 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1991 (defun idlwave-shell-out () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1992 "Attempt to run until this procedure exits. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1993 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
|
1994 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1995 (idlwave-shell-send-command (concat ".o"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1996 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1997 (defun idlwave-shell-help-expression (arg) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1998 "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
|
1999 (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
|
2000 (idlwave-shell-print arg 'help)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2001 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2002 (defun idlwave-shell-mouse-print (event) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2003 "Call `idlwave-shell-print' at the mouse position." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2004 (interactive "e") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2005 (mouse-set-point event) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2006 (idlwave-shell-print nil nil 'mouse)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2007 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2008 (defun idlwave-shell-mouse-help (event) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2009 "Call `idlwave-shell-print' at the mouse position." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2010 (interactive "e") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2011 (mouse-set-point event) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2012 (idlwave-shell-print nil 'help 'mouse)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2013 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2014 (defun idlwave-shell-print (arg &optional help mouse) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2015 "Print current expression. With HELP, show help on expression. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2016 An expression is an identifier plus 1 pair of matched parentheses |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2017 directly following the identifier - an array or function |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2018 call. Alternatively, an expression is the contents of any matched |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2019 parentheses when the open parentheses is not directly preceded by an |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2020 identifier. If point is at the beginning or within an expression |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2021 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
|
2022 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
|
2023 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2024 With prefix arg ARG, or when called from the shell buffer, prompt |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2025 for an expression." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2026 (interactive "P") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2027 (save-excursion |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2028 (let (expr beg end cmd) |
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 (if (and (not mouse) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2030 (or arg (eq major-mode 'idlwave-shell-mode))) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2031 (setq expr (read-string "Expression: ")) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2032 ;; Move to beginning of current or previous expression |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2033 (if (looking-at "\\<\\|(") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2034 ;; At beginning of expression, don't move backwards unless |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2035 ;; this is at the end of an indentifier. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2036 (if (looking-at "\\>") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2037 (backward-sexp)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2038 (backward-sexp)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2039 (if (looking-at "\\>") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2040 ;; Move to beginning of identifier - must be an array or |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2041 ;; function expression. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2042 (backward-sexp)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2043 ;; Move to end of expression |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2044 (setq beg (point)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2045 (forward-sexp) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2046 (while (looking-at "\\>[[(]\\|\\.") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2047 ;; an array |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2048 (forward-sexp)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2049 (setq end (point)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2050 (setq expr (buffer-substring beg end))) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2051 (when (and beg end idlwave-shell-expression-overlay) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2052 (move-overlay idlwave-shell-expression-overlay beg end |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2053 (current-buffer)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2054 (add-hook 'pre-command-hook 'idlwave-shell-delete-expression-overlay)) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2055 (if (and (integerp idlwave-shell-calling-stack-index) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2056 (> idlwave-shell-calling-stack-index 0)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2057 (setq cmd (idlwave-retrieve-expression-from-level |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2058 expr |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2059 idlwave-shell-calling-stack-index |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2060 idlwave-shell-calling-stack-routine |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2061 help)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2062 (setq cmd (concat (if help "help," "print,") expr))) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2063 (if idlwave-shell-print-expression-function |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2064 (idlwave-shell-send-command |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2065 cmd |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2066 (list idlwave-shell-print-expression-function expr) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2067 'hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2068 (idlwave-shell-recenter-shell-window) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2069 (idlwave-shell-send-command cmd))))) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2070 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2071 (defun idlwave-retrieve-expression-from-level (expr level routine help) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2072 "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
|
2073 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2074 It does not seem possible to evaluate an expression on a differnt |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2075 level than the current. Therefore, this function retrieves *copies* of |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2076 the variables involved in the expression from the desired level in the |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2077 calling stack. The copies are given some unlikely names on the |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2078 *current* level, and the expression is then evaluated on the *current* |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2079 level. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2080 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2081 Since this function depends upon the undocumented IDL routine routine_names, |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2082 there is no guarantie that this will work with future versions of IDL." |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2083 (let ((prefix "___") ;; No real variables should starts with this. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2084 (fetch (- 0 level)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2085 (start 0) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2086 var tvar fetch-vars pre post) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2087 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2088 ;; FIXME: In the following we try to find the variables in expression |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2089 ;; This is quite empirical - I don't know in what situations this will |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2090 ;; break. We will look for identifiers and exclude cases where we |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2091 ;; know it is not a variable. To distinguish array references from |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2092 ;; function calls, we require that arrays use [] instead of () |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2093 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2094 (while (string-match |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2095 "\\(\\`\\|[^a-zA-Z0-9$_]\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([^a-zA-Z0-9$_]\\|\\'\\)" expr start) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2096 (setq var (match-string 2 expr) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2097 tvar (concat prefix var) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2098 start (match-beginning 2) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2099 pre (substring expr 0 (match-beginning 2)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2100 post (substring expr (match-end 2))) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2101 (cond |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2102 ;; Exclude identifiers which are not variables |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2103 ((string-match ",[ \t]*/\\'" pre)) ;; a `/' KEYWORD |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2104 ((and (string-match "[,(][ \t]*\\'" pre) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2105 (string-match "\\`[ \t]*=" post))) ;; a `=' KEYWORD |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2106 ((string-match "\\`(" post)) ;; a function |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2107 ((string-match "->[ \t]*\\'" pre)) ;; a method |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2108 ((string-match "\\.\\'" pre)) ;; structure member |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2109 (t ;; seems to be a variable - arrange to get it and replace |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2110 ;; its name in the expression with the temproary name. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2111 (push (cons var tvar) fetch-vars) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2112 (setq expr (concat pre tvar post))))) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2113 ;; Make a command line that first copies the relevant variables |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2114 ;; and then prints the expression. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2115 (concat |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2116 (mapconcat |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2117 (lambda (x) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2118 (format "%s = routine_names('%s',fetch=%d)" (cdr x) (car x) fetch)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2119 (nreverse fetch-vars) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2120 " & ") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2121 (if idlwave-shell-print-expression-function " & " "\n") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2122 (if help "help, " "print, ") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2123 expr |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2124 (format " ; [-%d:%s]" level routine)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2125 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2126 (defun idlwave-shell-delete-expression-overlay () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2127 (condition-case nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2128 (if idlwave-shell-expression-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2129 (delete-overlay idlwave-shell-expression-overlay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2130 (error nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2131 (remove-hook 'pre-command-hook 'idlwave-shell-delete-expression-overlay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2132 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2133 (defvar idlwave-shell-bp-alist nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2134 "Alist of breakpoints. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2135 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
|
2136 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2137 The car is the frame for the breakpoint: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2138 file - full path file name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2139 line - line number of breakpoint - integer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2140 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2141 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
|
2142 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
|
2143 module - the module for breakpoint internal to IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2144 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2145 Remaining elements of the cdr: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2146 data - Data associated with the breakpoint by idlwave-shell currently |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2147 contains two items: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2148 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2149 count - number of times to execute breakpoint. When count reaches 0 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2150 the breakpoint is cleared and removed from the alist. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2151 command - command to execute when breakpoint is reached, either a |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2152 lisp function to be called with `funcall' with no arguments or a |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2153 list to be evaluated with `eval'.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2154 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2155 (defun idlwave-shell-run-region (beg end &optional n) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2156 "Compile and run the region using the IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2157 Copies the region to a temporary file `idlwave-shell-temp-pro-file' |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2158 and issues the IDL .run command for the file. Because the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2159 region is compiled and run as a main program there is no |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2160 problem with begin-end blocks extending over multiple |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2161 lines - which would be a problem if `idlwave-shell-evaluate-region' |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2162 was used. An END statement is appended to the region if necessary. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2163 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2164 If there is a prefix argument, display IDL process." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2165 (interactive "r\nP") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2166 (let ((oldbuf (current-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2167 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2168 (set-buffer (idlwave-find-file-noselect |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2169 idlwave-shell-temp-pro-file 'tmp)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2170 (erase-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2171 (insert-buffer-substring oldbuf beg end) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2172 (if (not (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2173 (idlwave-previous-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2174 (idlwave-look-at "\\<end\\>"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2175 (insert "\nend\n")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2176 (save-buffer 0))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2177 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2178 (if n |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2179 (idlwave-display-buffer (idlwave-shell-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2180 nil (idlwave-shell-shell-frame)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2181 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2182 (defun idlwave-shell-evaluate-region (beg end &optional n) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2183 "Send region to the IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2184 If there is a prefix argument, display IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2185 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
|
2186 `idlwave-shell-run-region' for this." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2187 (interactive "r\nP") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2188 (idlwave-shell-send-command (buffer-substring beg end)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2189 (if n |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2190 (idlwave-display-buffer (idlwave-shell-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2191 nil (idlwave-shell-shell-frame)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2192 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2193 (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
|
2194 "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
|
2195 (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
|
2196 (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
|
2197 (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
|
2198 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
|
2199 (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
|
2200 (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
|
2201 (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
|
2202 (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
|
2203 (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
|
2204 (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
|
2205 (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
|
2206 (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
|
2207 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2208 (defun idlwave-display-buffer (buf not-this-window-p &optional frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2209 (if (or (< emacs-major-version 20) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2210 (and (= emacs-major-version 20) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2211 (< emacs-minor-version 3))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2212 ;; Only two args. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2213 (display-buffer buf not-this-window-p) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2214 ;; Three ares possible. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2215 (display-buffer buf not-this-window-p frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2216 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2217 (defvar idlwave-shell-bp-buffer " *idlwave-shell-bp*" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2218 "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
|
2219 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2220 (defun idlwave-shell-bp-query () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2221 "Reconcile idlwave-shell's breakpoint list with IDL's. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2222 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
|
2223 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2224 (idlwave-shell-send-command idlwave-shell-bp-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2225 'idlwave-shell-filter-bp |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2226 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2227 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2228 (defun idlwave-shell-bp-get (bp &optional item) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2229 "Get a value for a breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2230 BP has the form of elements in idlwave-shell-bp-alist. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2231 Optional second arg ITEM is the particular value to retrieve. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2232 ITEM can be 'file, 'line, 'index, 'module, 'count, 'cmd, or 'data. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2233 'data returns a list of 'count and 'cmd. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2234 Defaults to 'index." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2235 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2236 ;; Frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2237 ((eq item 'line) (nth 1 (car bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2238 ((eq item 'file) (nth 0 (car bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2239 ;; idlwave-shell breakpoint data |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2240 ((eq item 'data) (cdr (cdr bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2241 ((eq item 'count) (nth 0 (cdr (cdr bp)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2242 ((eq item 'cmd) (nth 1 (cdr (cdr bp)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2243 ;; IDL breakpoint info |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2244 ((eq item 'module) (nth 1 (car (cdr bp)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2245 ;; index - default |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2246 (t (nth 0 (car (cdr bp)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2247 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2248 (defun idlwave-shell-filter-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2249 "Get the breakpoints from `idlwave-shell-command-output'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2250 Create `idlwave-shell-bp-alist' updating breakpoint count and command data |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2251 from previous breakpoint list." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2252 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2253 (set-buffer (get-buffer-create idlwave-shell-bp-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2254 (erase-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2255 (insert idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2256 (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
|
2257 (let ((old-bp-alist 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
|
2258 file line index module) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2259 (setq idlwave-shell-bp-alist (list 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
|
2260 (when (re-search-forward "^\\s-*Index.*\n\\s-*-" 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
|
2261 ;; There seems to be a breakpoint listing here. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2262 ;; Parse breakpoint lines. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2263 ;; Breakpoints have the form: |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2264 ;; Index Module Line File |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2265 ;; All seperated by whitespace. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2266 ;; Module may be missing if the file is not compiled. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2267 ;; |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2268 (while (re-search-forward |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2269 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)" 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
|
2270 (setq index (match-string 1) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2271 module (match-string 2) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2272 line (string-to-int (match-string 3)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2273 file (idlwave-shell-file-name (match-string 4))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2274 ;; 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
|
2275 (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
|
2276 (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
|
2277 (list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2278 (list index module) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2279 ;; idlwave-shell data: count, command |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2280 nil nil)))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2281 (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2282 ;; Update count, commands of breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2283 (mapcar 'idlwave-shell-update-bp old-bp-alist))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2284 ;; Update the breakpoint overlays |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2285 (idlwave-shell-update-bp-overlays) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2286 ;; Return the new list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2287 idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2288 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2289 (defun idlwave-shell-update-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2290 "Update BP data in breakpoint list. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2291 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
|
2292 (let ((match (assoc (car bp) idlwave-shell-bp-alist))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2293 (if match (setcdr (cdr match) (cdr (cdr bp)))))) |
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-set-bp-data (bp data) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2296 "Set the data of BP to DATA." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2297 (setcdr (cdr bp) data)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2298 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2299 (defun idlwave-shell-bp (frame &optional data module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2300 "Create a breakpoint structure containing FRAME and DATA. Second |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2301 and third args, DATA and MODULE, are optional. Returns a breakpoint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2302 of the format used in `idlwave-shell-bp-alist'. Can be used in commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2303 attempting match a breakpoint in `idlwave-shell-bp-alist'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2304 (cons frame (cons (list nil module) data))) |
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 (defvar idlwave-shell-old-bp nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2307 "List of breakpoints previous to setting a new breakpoint.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2308 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2309 (defun idlwave-shell-sources-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2310 "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
|
2311 If an equivalency is found, return the IDL internal source name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2312 Otherwise return the filename in bp." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2313 (let* |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2314 ((bp-file (idlwave-shell-bp-get bp 'file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2315 (bp-module (idlwave-shell-bp-get bp 'module)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2316 (internal-file-list (cdr (assoc bp-module idlwave-shell-sources-alist)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2317 (if (and internal-file-list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2318 (equal bp-file (nth 0 internal-file-list))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2319 (nth 1 internal-file-list) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2320 bp-file))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2321 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2322 (defun idlwave-shell-set-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2323 "Try to set a breakpoint BP. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2324 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2325 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
|
2326 line specified by BP or at the next IDL statement if that line is not |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2327 a statement. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2328 Determines IDL's internal representation for the breakpoint which may |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2329 have occured at a different line then used with the breakpoint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2330 command." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2331 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2332 ;; Get and save the old breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2333 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2334 idlwave-shell-bp-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2335 '(progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2336 (idlwave-shell-filter-bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2337 (setq idlwave-shell-old-bp idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2338 'hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2339 ;; Get sources for IDL compiled procedures followed by setting |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2340 ;; breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2341 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2342 idlwave-shell-sources-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2343 (` (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2344 (idlwave-shell-sources-filter) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2345 (idlwave-shell-set-bp2 (quote (, bp))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2346 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2347 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2348 (defun idlwave-shell-set-bp2 (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2349 "Use results of breakpoint and sources query to set bp. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2350 Use the count argument with IDLs breakpoint command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2351 We treat a count of 1 as a temporary breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2352 Counts greater than 1 use the IDL AFTER=count keyword to break |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2353 only after reaching the statement count times." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2354 (let* |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2355 ((arg (idlwave-shell-bp-get bp 'count)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2356 (key (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2357 ((not (and arg (numberp arg))) "") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2358 ((= arg 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2359 ",/once") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2360 ((> arg 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2361 (format ",after=%d" arg)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2362 (line (idlwave-shell-bp-get bp 'line))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2363 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2364 (concat "breakpoint,'" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2365 (idlwave-shell-sources-bp bp) "'," |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2366 (if (integerp line) (setq line (int-to-string line))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2367 key) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2368 ;; Check for failure and look for breakpoint in IDL's list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2369 (` (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2370 (if (idlwave-shell-set-bp-check (quote (, bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2371 (idlwave-shell-set-bp3 (quote (, bp))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2372 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2373 ;; do not hide output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2374 nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2375 'preempt))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2376 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2377 (defun idlwave-shell-set-bp3 (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2378 "Find the breakpoint in IDL's internal list of breakpoints." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2379 (idlwave-shell-send-command idlwave-shell-bp-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2380 (` (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2381 (idlwave-shell-filter-bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2382 (idlwave-shell-new-bp (quote (, bp))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2383 'hide |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2384 'preempt)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2385 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2386 (defun idlwave-shell-find-bp (frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2387 "Return breakpoint from `idlwave-shell-bp-alist' for frame. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2388 Returns nil if frame not found." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2389 (assoc frame idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2390 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2391 (defun idlwave-shell-new-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2392 "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
|
2393 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
|
2394 the line number used with the IDL breakpoint command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2395 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
|
2396 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
|
2397 (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
|
2398 (bpl idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2399 (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
|
2400 (setq bpl (cdr bpl)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2401 (if (and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2402 (not bpl) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2403 ;; No additional breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2404 ;; 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
|
2405 (setq bpl (assoc (car bp) idlwave-shell-bp-alist))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2406 (setq bpl (list bpl))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2407 (if (and bpl |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2408 (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
|
2409 (idlwave-shell-bp-get bp 'file))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2410 ;; Got the breakpoint - add count, command to it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2411 ;; 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
|
2412 ;; not done for bpl. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2413 (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
|
2414 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2415 (message "Failed to identify breakpoint in IDL")))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2416 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2417 (defvar idlwave-shell-bp-overlays nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2418 "List of overlays marking breakpoints") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2419 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2420 (defun idlwave-shell-update-bp-overlays () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2421 "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
|
2422 Existing overlays are recycled, in order to minimize consumption." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2423 ;; FIXME: we could cache them all, but that would be more work. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2424 (when idlwave-shell-mark-breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2425 (let ((bp-list idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2426 (ov-list idlwave-shell-bp-overlays) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2427 ov bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2428 ;; Delete the old overlays from their buffers |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2429 (while (setq ov (pop ov-list)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2430 (delete-overlay ov)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2431 (setq ov-list idlwave-shell-bp-overlays |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2432 idlwave-shell-bp-overlays nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2433 (while (setq bp (pop bp-list)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2434 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2435 (idlwave-shell-goto-frame (car bp)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2436 (let* ((end (progn (end-of-line 1) (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2437 (beg (progn (beginning-of-line 1) (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2438 (ov (or (pop ov-list) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2439 (idlwave-shell-make-new-bp-overlay)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2440 (move-overlay ov beg end) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2441 (push ov idlwave-shell-bp-overlays))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2442 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2443 (defvar idlwave-shell-bp-glyph) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2444 (defun idlwave-shell-make-new-bp-overlay () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2445 "Make a new overlay for highlighting breakpoints. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2446 This stuff is stringly dependant upon the version of Emacs." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2447 (let ((ov (make-overlay 1 1))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2448 (if (featurep 'xemacs) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2449 ;; This is XEmacs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2450 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2451 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2452 ((eq (console-type) 'tty) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2453 ;; tty's cannot display glyphs |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2454 (set-extent-property ov 'face idlwave-shell-breakpoint-face)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2455 ((and (memq idlwave-shell-mark-breakpoints '(t glyph)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2456 idlwave-shell-bp-glyph) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2457 ;; use the glyph |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2458 (set-extent-property ov 'begin-glyph idlwave-shell-bp-glyph)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2459 (idlwave-shell-mark-breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2460 ;; use the face |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2461 (set-extent-property ov 'face idlwave-shell-breakpoint-face)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2462 (t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2463 ;; no marking |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2464 nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2465 (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
|
2466 ;; This is Emacs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2467 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2468 (window-system |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2469 (if (and (memq idlwave-shell-mark-breakpoints '(t glyph)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2470 idlwave-shell-bp-glyph) ; this var knows if glyph's possible |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2471 ;; use a glyph |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2472 (let ((string "@")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2473 (put-text-property 0 1 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2474 'display idlwave-shell-bp-glyph |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2475 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2476 (overlay-put ov 'before-string string)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2477 (overlay-put ov 'face idlwave-shell-breakpoint-face))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2478 (idlwave-shell-mark-breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2479 ;; use a face |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2480 (overlay-put ov 'face idlwave-shell-breakpoint-face)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2481 (t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2482 ;; No marking |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2483 nil))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2484 ov)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2485 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2486 (defun idlwave-shell-edit-default-command-line (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2487 "Edit the current execute command." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2488 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2489 (setq idlwave-shell-command-line-to-execute |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2490 (read-string "IDL> " idlwave-shell-command-line-to-execute))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2491 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2492 (defun idlwave-shell-execute-default-command-line (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2493 "Execute a command line. On first use, ask for the command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2494 Also with prefix arg, ask for the command. You can also uase the command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2495 `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
|
2496 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2497 (if (or (not idlwave-shell-command-line-to-execute) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2498 arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2499 (setq idlwave-shell-command-line-to-execute |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2500 (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
|
2501 (idlwave-shell-reset 'hidden) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2502 (idlwave-shell-send-command idlwave-shell-command-line-to-execute |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2503 '(idlwave-shell-redisplay 'hide))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2504 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2505 (defun idlwave-shell-save-and-run () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2506 "Save file and run it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2507 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
|
2508 When called from the shell buffer, re-run the file which was last handled by |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2509 one of the save-and-.. commands." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2510 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2511 (idlwave-shell-save-and-action 'run)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2512 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2513 (defun idlwave-shell-save-and-compile () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2514 "Save file and run it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2515 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
|
2516 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
|
2517 one of the save-and-.. commands." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2518 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2519 (idlwave-shell-save-and-action 'compile)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2520 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2521 (defun idlwave-shell-save-and-batch () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2522 "Save file and batch it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2523 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
|
2524 When called from the shell buffer, re-batch the file which was last handled by |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2525 one of the save-and-.. commands." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2526 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2527 (idlwave-shell-save-and-action 'batch)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2528 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2529 (defun idlwave-shell-save-and-action (action) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2530 "Save file and compile it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2531 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
|
2532 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
|
2533 handled by this command." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2534 ;; Remove the stop overlay. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2535 (if idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2536 (delete-overlay idlwave-shell-stop-line-overlay)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2537 (setq idlwave-shell-is-stopped nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2538 (setq overlay-arrow-string nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2539 (let (buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2540 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2541 ((eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2542 (save-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2543 (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
|
2544 (idlwave-shell-last-save-and-action-file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2545 (if (setq buf (idlwave-get-buffer-visiting |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2546 idlwave-shell-last-save-and-action-file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2547 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2548 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2549 (save-buffer)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2550 (t (setq idlwave-shell-last-save-and-action-file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2551 (read-file-name "File: "))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2552 (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
|
2553 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2554 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2555 (concat (cond ((eq action 'run) ".run ") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2556 ((eq action 'compile) ".compile ") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2557 ((eq action 'batch) "@") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2558 (t (error "Unknown action %s" action))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2559 idlwave-shell-last-save-and-action-file) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2560 'idlwave-shell-maybe-update-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
|
2561 nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2562 (idlwave-shell-bp-query)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2563 (let ((msg (format "No such file %s" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2564 idlwave-shell-last-save-and-action-file))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2565 (setq idlwave-shell-last-save-and-action-file nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2566 (error msg)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2567 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2568 (defun idlwave-shell-maybe-update-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
|
2569 "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
|
2570 (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
|
2571 (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
|
2572 (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
|
2573 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
|
2574 idlwave-routines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2575 (idlwave-shell-update-routine-info t))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2576 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2577 (defvar idlwave-shell-sources-query "help,/source" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2578 "IDL command to obtain source files for compiled procedures.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2579 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2580 (defvar idlwave-shell-sources-alist nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2581 "Alist of IDL procedure names and compiled source files. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2582 Elements of the alist have the form: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2583 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2584 (module name . (source-file-truename idlwave-internal-filename)).") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2585 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2586 (defun idlwave-shell-sources-query () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2587 "Determine source files for IDL compiled procedures. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2588 Queries IDL using the string in `idlwave-shell-sources-query'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2589 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2590 (idlwave-shell-send-command idlwave-shell-sources-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2591 'idlwave-shell-sources-filter |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2592 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2593 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2594 (defun idlwave-shell-sources-filter () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2595 "Get source files from `idlwave-shell-sources-query' output. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2596 Create `idlwave-shell-sources-alist' consisting of |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2597 list elements of the form: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2598 (module name . (source-file-truename idlwave-internal-filename))." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2599 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2600 (set-buffer (get-buffer-create idlwave-shell-bp-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2601 (erase-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2602 (insert idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2603 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2604 (let (cpro cfun) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2605 (if (re-search-forward "Compiled Procedures:" nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2606 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2607 (forward-line) ; Skip $MAIN$ |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2608 (setq cpro (point)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2609 (if (re-search-forward "Compiled Functions:" nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2610 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2611 (setq cfun (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2612 (setq idlwave-shell-sources-alist |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2613 (append |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2614 ;; compiled procedures |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2615 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2616 (beginning-of-line) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2617 (narrow-to-region cpro (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2618 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2619 (idlwave-shell-sources-grep)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2620 ;; compiled functions |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2621 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2622 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2623 (goto-char cfun) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2624 (idlwave-shell-sources-grep))))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2625 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2626 (defun idlwave-shell-sources-grep () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2627 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2628 (let ((al (list nil))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2629 (while (and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2630 (not (progn (forward-line) (eobp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2631 (re-search-forward |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2632 "\\s-*\\(\\S-+\\)\\s-+\\(\\S-+\\)" nil t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2633 (nconc al |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2634 (list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2635 (cons |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2636 (buffer-substring ; name |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2637 (match-beginning 1) (match-end 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2638 (let ((internal-filename |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2639 (buffer-substring ; source |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2640 (match-beginning 2) (match-end 2)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2641 (list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2642 (idlwave-shell-file-name internal-filename) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2643 internal-filename)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2644 )))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2645 (cdr al)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2646 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2647 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2648 (defun idlwave-shell-clear-all-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2649 "Remove all breakpoints in IDL." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2650 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2651 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2652 idlwave-shell-bp-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2653 '(progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2654 (idlwave-shell-filter-bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2655 (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2656 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2657 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2658 (defun idlwave-shell-list-all-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2659 "List all breakpoints in IDL." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2660 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2661 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2662 idlwave-shell-bp-query)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2663 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2664 (defvar idlwave-shell-error-last 0 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2665 "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
|
2666 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2667 (defun idlwave-shell-goto-next-error () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2668 "Move point to next IDL syntax error." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2669 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2670 (let (frame col) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2671 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2672 (set-buffer idlwave-shell-error-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2673 (goto-char idlwave-shell-error-last) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2674 (if (or (re-search-forward idlwave-shell-syntax-error nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2675 (re-search-forward idlwave-shell-other-error nil t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2676 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2677 (setq frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2678 (list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2679 (save-match-data |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2680 (idlwave-shell-file-name |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2681 (buffer-substring (match-beginning 1) (match-end 1)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2682 (string-to-int |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2683 (buffer-substring (match-beginning 2) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2684 (match-end 2))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2685 ;; Try to find the column of the error |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2686 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2687 (setq col |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2688 (if (re-search-backward "\\^" nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2689 (current-column) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2690 0))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2691 (setq idlwave-shell-error-last (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2692 (if frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2693 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2694 (idlwave-shell-display-line frame col)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2695 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2696 (message "No more errors.")))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2697 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2698 (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
|
2699 "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
|
2700 Otherwise, just expand the file name." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2701 (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
|
2702 default-directory |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2703 idlwave-shell-default-directory))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2704 (if idlwave-shell-use-truename |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2705 (file-truename name def-dir) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2706 (expand-file-name name def-dir)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2707 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2708 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2709 ;; Keybindings -------------------------------------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2710 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2711 (defvar idlwave-shell-mode-map (copy-keymap comint-mode-map) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2712 "Keymap for idlwave-mode.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2713 (defvar idlwave-shell-mode-prefix-map (make-sparse-keymap)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2714 (fset 'idlwave-shell-mode-prefix-map idlwave-shell-mode-prefix-map) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2715 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2716 ;(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
|
2717 ;(define-key idlwave-shell-mode-map "\t" 'comint-dynamic-complete) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2718 (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
|
2719 (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
|
2720 (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
|
2721 (define-key idlwave-shell-mode-map "\C-c?" 'idlwave-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
|
2722 (define-key idlwave-shell-mode-map "\M-?" 'idlwave-context-help) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2723 (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
|
2724 (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
|
2725 (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
|
2726 (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
|
2727 (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
|
2728 (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
|
2729 (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
|
2730 'idlwave-shell-debug-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
|
2731 (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
|
2732 (define-key idlwave-mode-map "\C-c\C-x" '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
|
2733 (define-key idlwave-mode-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2734 (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2735 'idlwave-shell-mouse-print) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2736 (define-key idlwave-mode-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2737 (if (featurep 'xemacs) [(shift control button2)] [(shift control mouse-2)]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2738 'idlwave-shell-mouse-help) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2739 (define-key idlwave-shell-mode-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2740 (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2741 'idlwave-shell-mouse-print) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2742 (define-key idlwave-shell-mode-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2743 (if (featurep 'xemacs) [(shift control button2)] [(shift control mouse-2)]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2744 'idlwave-shell-mouse-help) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2745 (define-key idlwave-shell-mode-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2746 (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2747 '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
|
2748 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2749 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2750 ;; The following set of bindings is used to bind the debugging keys. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2751 ;; If `idlwave-shell-activate-prefix-keybindings' is non-nil, the first key |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2752 ;; in the list gets bound the C-c C-d prefix map. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2753 ;; If `idlwave-shell-activate-alt-keybindings' is non-nil, the second key |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2754 ;; in the list gets bound directly in both idlwave-mode-map and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2755 ;; idlwave-shell-mode-map. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2756 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2757 ;; Used keys: abcde hi klmnopqrs u wxyz |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2758 ;; Unused keys: fg j t v |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2759 (let ((specs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2760 '(([(control ?b)] [(alt ?b)] idlwave-shell-break-here) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2761 ([(control ?i)] [(alt ?i)] idlwave-shell-break-in) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2762 ([(control ?d)] [(alt ?d)] idlwave-shell-clear-current-bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2763 ([(control ?a)] [(alt ?a)] idlwave-shell-clear-all-bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2764 ([(control ?s)] [(alt ?s)] idlwave-shell-step) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2765 ([(control ?n)] [(alt ?n)] idlwave-shell-stepover) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2766 ([(control ?k)] [(alt ?k)] idlwave-shell-skip) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2767 ([(control ?u)] [(alt ?u)] idlwave-shell-up) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2768 ([(control ?o)] [(alt ?o)] idlwave-shell-out) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2769 ([(control ?m)] [(alt ?m)] idlwave-shell-return) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2770 ([(control ?h)] [(alt ?h)] idlwave-shell-to-here) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2771 ([(control ?r)] [(alt ?r)] idlwave-shell-cont) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2772 ([(control ?y)] [(alt ?y)] idlwave-shell-execute-default-command-line) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2773 ([(control ?z)] [(alt ?z)] idlwave-shell-reset) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2774 ([(control ?q)] [(alt ?q)] idlwave-shell-quit) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2775 ([(control ?p)] [(alt ?p)] idlwave-shell-print) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2776 ([(??)] [(alt ??)] idlwave-shell-help-expression) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2777 ([(control ?c)] [(alt ?c)] idlwave-shell-save-and-run) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2778 ([( ?@)] [(alt ?@)] idlwave-shell-save-and-batch) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2779 ([(control ?x)] [(alt ?x)] idlwave-shell-goto-next-error) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2780 ([(control ?e)] [(alt ?e)] idlwave-shell-run-region) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2781 ([(control ?w)] [(alt ?w)] idlwave-shell-resync-dirs) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2782 ([(control ?l)] [(alt ?l)] idlwave-shell-redisplay) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2783 ([(control ?t)] [(alt ?t)] idlwave-shell-toggle-toolbar) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2784 ([(control up)] [(alt up)] idlwave-shell-stack-up) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2785 ([(control down)] [(alt down)] idlwave-shell-stack-down) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2786 )) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2787 s k1 k2 cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2788 (while (setq s (pop specs)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2789 (setq k1 (nth 0 s) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2790 k2 (nth 1 s) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2791 cmd (nth 2 s)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2792 (when idlwave-shell-activate-prefix-keybindings |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2793 (and k1 (define-key idlwave-shell-mode-prefix-map k1 cmd))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2794 (when idlwave-shell-activate-alt-keybindings |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2795 (and k2 (define-key idlwave-mode-map k2 cmd)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2796 (and k2 (define-key idlwave-shell-mode-map k2 cmd))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2797 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2798 ;; Enter the prefix map at the two places. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2799 (fset 'idlwave-debug-map idlwave-shell-mode-prefix-map) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2800 (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
|
2801 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2802 ;; The Menus -------------------------------------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2803 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2804 (defvar idlwave-shell-menu-def |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2805 '("Debug" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2806 ["Save and .RUN" idlwave-shell-save-and-run |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2807 (or (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2808 idlwave-shell-last-save-and-action-file)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2809 ["Save and .COMPILE" idlwave-shell-save-and-compile |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2810 (or (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2811 idlwave-shell-last-save-and-action-file)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2812 ["Save and @Batch" idlwave-shell-save-and-batch |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2813 (or (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2814 idlwave-shell-last-save-and-action-file)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2815 ["Goto Next Error" idlwave-shell-goto-next-error t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2816 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2817 ["Execute Default Cmd" idlwave-shell-execute-default-command-line t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2818 ["Edit Default Cmd" idlwave-shell-edit-default-command-line t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2819 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2820 ["Set Breakpoint" idlwave-shell-break-here |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2821 (eq major-mode 'idlwave-mode)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2822 ["Break in Module" idlwave-shell-break-in t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2823 ["Clear Breakpoint" idlwave-shell-clear-current-bp t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2824 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2825 ["List All Breakpoints" idlwave-shell-list-all-bp t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2826 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2827 ["Step (into)" idlwave-shell-step t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2828 ["Step (over)" idlwave-shell-stepover t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2829 ["Skip One Statement" idlwave-shell-skip t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2830 ["Continue" idlwave-shell-cont t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2831 ("Continue to" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2832 ["End of Block" idlwave-shell-up t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2833 ["End of Subprog" idlwave-shell-return t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2834 ["End of Subprog+1" idlwave-shell-out t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2835 ["Here (Cursor Line)" idlwave-shell-to-here |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2836 (eq major-mode 'idlwave-mode)]) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2837 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2838 ["Print expression" idlwave-shell-print t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2839 ["Help on expression" idlwave-shell-help-expression t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2840 ["Evaluate Region" idlwave-shell-evaluate-region |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2841 (eq major-mode 'idlwave-mode)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2842 ["Run Region" idlwave-shell-run-region (eq major-mode 'idlwave-mode)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2843 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2844 ["Redisplay" idlwave-shell-redisplay t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2845 ["Stack Up" idlwave-shell-stack-up t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2846 ["Stack Down" idlwave-shell-stack-down t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2847 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2848 ["Update Working Dir" idlwave-shell-resync-dirs t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2849 ["Reset IDL" idlwave-shell-reset t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2850 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2851 ["Toggle Toolbar" idlwave-shell-toggle-toolbar t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2852 ["Exit IDL" idlwave-shell-quit 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
|
2853 ;;FIXME: Which menu??? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2854 (setq idlwave-shell-menu-def |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2855 '("Debug" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2856 ("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
|
2857 ["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
|
2858 (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
|
2859 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
|
2860 ["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
|
2861 (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
|
2862 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
|
2863 ["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
|
2864 (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
|
2865 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
|
2866 ["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
|
2867 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2868 ["Run Region" idlwave-shell-run-region (eq major-mode 'idlwave-mode)] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2869 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2870 ["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
|
2871 ["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
|
2872 ("Breakpoints" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2873 ["Set Breakpoint" idlwave-shell-break-here |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2874 (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
|
2875 ["Break in Module" idlwave-shell-break-in t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2876 ["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
|
2877 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2878 ["List All Breakpoints" idlwave-shell-list-all-bp t]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2879 ("Step" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2880 ["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
|
2881 ["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
|
2882 ["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
|
2883 ["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
|
2884 ["... 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
|
2885 ["... 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
|
2886 ["... 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
|
2887 ["... to Here (Cursor Line)" idlwave-shell-to-here |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2888 (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
|
2889 ("Print Expression" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2890 ["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
|
2891 ["Help on expression" idlwave-shell-help-expression t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2892 ["Evaluate Region" idlwave-shell-evaluate-region |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2893 (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
|
2894 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2895 ["Redisplay" idlwave-shell-redisplay t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2896 ["Stack Up" idlwave-shell-stack-up t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2897 ["Stack Down" idlwave-shell-stack-down t]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2898 ("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
|
2899 ["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
|
2900 ["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
|
2901 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2902 ["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
|
2903 (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
|
2904 (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
|
2905 :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
|
2906 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2907 ["Update Working Dir" idlwave-shell-resync-dirs t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2908 ["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
|
2909 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2910 ["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
|
2911 ["Exit IDL" idlwave-shell-quit t])) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2912 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2913 (if (or (featurep 'easymenu) (load "easymenu" t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2914 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2915 (easy-menu-define |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2916 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
|
2917 idlwave-shell-menu-def) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2918 (easy-menu-define |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2919 idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2920 idlwave-shell-menu-def) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2921 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2922 (mapcar (lambda (buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2923 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2924 (if (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2925 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2926 (easy-menu-remove idlwave-mode-debug-menu) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2927 (easy-menu-add idlwave-mode-debug-menu)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2928 (buffer-list))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2929 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2930 ;; The Breakpoint Glyph ------------------------------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2931 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2932 (defvar idlwave-shell-bp-glyph nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2933 "The glyph to mark breakpoint lines in the source code.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2934 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2935 (let ((image-string "/* XPM */ |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2936 static char * file[] = { |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2937 \"14 12 3 1\", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2938 \" c #FFFFFFFFFFFF s backgroundColor\", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2939 \". c #4B4B4B4B4B4B\", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2940 \"R c #FFFF00000000\", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2941 \" \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2942 \" \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2943 \" RRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2944 \" RRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2945 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2946 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2947 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2948 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2949 \" RRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2950 \" RRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2951 \" \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2952 \" \"};")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2953 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2954 (setq idlwave-shell-bp-glyph |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2955 (cond ((and (featurep 'xemacs) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2956 (featurep 'xpm)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2957 (make-glyph image-string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2958 ((and (not (featurep 'xemacs)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2959 (fboundp 'image-type-available-p) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2960 (image-type-available-p 'xpm)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2961 (list 'image :type 'xpm :data image-string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2962 (t nil)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2963 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2964 (provide 'idlw-shell) |
27166
b2d17f0c1668
Also provide idlwave.shell, not only idlw-shell.
Carsten Dominik <dominik@science.uva.nl>
parents:
27108
diff
changeset
|
2965 (provide 'idlwave-shell) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2966 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2967 ;;; Load the toolbar when wanted by the user. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2968 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2969 (autoload 'idlwave-toolbar-toggle "idlw-toolbar" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2970 "Toggle the IDLWAVE toolbar") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2971 (autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2972 "Add IDLWAVE toolbar") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2973 (defun idlwave-shell-toggle-toolbar () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2974 "Toggle the display of the debugging toolbar." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2975 (interactive) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2976 (idlwave-toolbar-toggle)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2977 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2978 (if idlwave-shell-use-toolbar |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2979 (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2980 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2981 ;;; idlw-shell.el ends here |