Mercurial > emacs
annotate lisp/progmodes/idlw-shell.el @ 53682:7b5a4f5f9b52
*** empty log message ***
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 23 Jan 2004 00:14:48 +0000 |
parents | 695cf19ef79e |
children | f0eb34e60705 e8824c4f5f7e 375f2633d815 |
rev | line source |
---|---|
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1 ;; idlw-shell.el --- run IDL as an inferior process of Emacs. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2 ;; Copyright (c) 1999, 2000, 2001,2002 Free Software Foundation |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
4 ;; Author: Carsten Dominik <dominik@astro.uva.nl> |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
5 ;; Chris Chase <chase@att.com> |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
6 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
7 ;; Version: 4.15 |
52401 | 8 ;; Date: $Date: 2002/10/17 15:41:01 $ |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
9 ;; Keywords: processes |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
10 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
11 ;; This file is part of GNU Emacs. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
12 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
13 ;; 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
|
14 ;; 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
|
15 ;; 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
|
16 ;; any later version. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
17 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
18 ;; 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
|
19 ;; 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
|
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
21 ;; GNU General Public License for more details. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
22 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
23 ;; 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
|
24 ;; 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
|
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
26 ;; Boston, MA 02111-1307, USA. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
27 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
28 ;;; Commentary: |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
29 ;; |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
30 ;; This mode is for IDL version 5 or later. It should work on |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
31 ;; Emacs>20.3 or XEmacs>20.4. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
32 ;; |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
33 ;; 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
|
34 ;; `shell' or `telnet' commands. Provides command history and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
35 ;; searching. Provides debugging commands available in buffers |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
36 ;; visiting IDL procedure files, e.g., breakpoint setting, stepping, |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
37 ;; execution until a certain line, printing expressions under point, |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
38 ;; visual line pointer for current execution line, etc. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
39 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
40 ;; Documentation should be available online with `M-x idlwave-info'. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
41 ;; |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
42 ;; New versions of IDLWAVE, documentation, and more information |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
43 ;; available from: |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
44 ;; http://idlwave.org |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
45 ;; |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
46 ;; INSTALLATION: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
47 ;; ============= |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
48 ;; |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
49 ;; Follow the instructions in the INSTALL file of the distribution. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
50 ;; In short, put this file on your load path and add the following |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
51 ;; lines to your .emacs file: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
52 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
53 ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
54 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
55 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
56 ;; SOURCE |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
57 ;; ====== |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
58 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
59 ;; The newest version of this file can be found on the maintainers |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
60 ;; web site. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
61 ;; |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
62 ;; http://idlwave.org |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
63 ;; |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
64 ;; DOCUMENTATION |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
65 ;; ============= |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
66 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
67 ;; IDLWAVE is documented online in info format. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
68 ;; A printable version of the documentation is available from the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
69 ;; maintainers webpage (see under SOURCE) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
70 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
71 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
72 ;; KNOWN PROBLEMS |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
73 ;; ============== |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
74 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
75 ;; Under XEmacs the Debug menu in the shell does not display the |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
76 ;; keybindings in the prefix map. There bindings are available anyway - so |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
77 ;; it is a bug in XEmacs. |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
78 ;; The Debug menu in source buffers *does* display the bindings correctly. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
79 ;; |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
80 ;; |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
81 ;; CUSTOMIZATION VARIABLES |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
82 ;; ======================= |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
83 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
84 ;; IDLWAVE has customize support - so if you want to learn about |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
85 ;; the variables which control the behavior of the mode, use |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
86 ;; `M-x idlwave-customize'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
87 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
88 ;;-------------------------------------------------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
89 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
90 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
91 ;;; Code: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
92 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
93 (require 'comint) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
94 (require 'idlwave) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
95 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
96 (eval-when-compile (require 'cl)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
97 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
98 (defvar idlwave-shell-have-new-custom nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
99 (eval-and-compile |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
100 ;; Kludge to allow `defcustom' for Emacs 19. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
101 (condition-case () (require 'custom) (error nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
102 (if (and (featurep 'custom) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
103 (fboundp 'custom-declare-variable) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
104 (fboundp 'defface)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
105 ;; We've got what we needed |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
106 (setq idlwave-shell-have-new-custom t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
107 ;; We have the old or no custom-library, hack around it! |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
108 (defmacro defgroup (&rest args) nil) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
109 (defmacro defcustom (var value doc &rest args) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
110 `(defvar ,var ,value ,doc)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
111 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
112 ;;; Customizations: idlwave-shell group |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
113 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
114 ;; General/Misc. customizations |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
115 (defgroup idlwave-shell-general-setup nil |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
116 "General setup of the Shell interaction for IDLWAVE/Shell." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
117 :prefix "idlwave-shell" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
118 :group 'idlwave) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
119 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
120 (defcustom idlwave-shell-prompt-pattern "^ ?IDL> " |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
121 "*Regexp to match IDL prompt at beginning of a line. |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
122 For example, \"^IDL> \" or \"^WAVE> \". |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
123 The \"^\" means beginning of line. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
124 This variable is used to initialise `comint-prompt-regexp' in the |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
125 process buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
126 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
127 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
|
128 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
129 :type 'regexp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
130 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
131 (defcustom idlwave-shell-process-name "idl" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
132 "*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
|
133 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
|
134 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
135 :type 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
136 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
137 ;; (defcustom idlwave-shell-automatic-start...) See idlwave.el |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
138 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
139 (defcustom idlwave-shell-use-dedicated-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
140 "*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
|
141 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
142 :type 'boolean) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
143 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
144 (defcustom idlwave-shell-frame-parameters |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
145 '((height . 30) (unsplittable . nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
146 "The frame parameters for a dedicated idlwave-shell frame. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
147 See also `idlwave-shell-use-dedicated-frame'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
148 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
|
149 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
150 :type '(repeat |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
151 (cons symbol sexp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
152 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
153 (defcustom idlwave-shell-raise-frame t |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
154 "*Non-nil means, `idlwave-shell' raises the frame showing the shell window." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
155 :group 'idlwave-shell-general-setup |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
156 :type 'boolean) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
157 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
158 (defcustom idlwave-shell-arrows-do-history t |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
159 "*Non-nil means UP and DOWN arrows move through command history. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
160 This variable can have 3 values: |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
161 nil Arrows just move the cursor |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
162 t Arrows force the cursor back to the current command line and |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
163 walk the history |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
164 'cmdline When the cursor is in the current command line, arrows walk the |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
165 history. Everywhere else in the buffer, arrows move the cursor." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
166 :group 'idlwave-shell-general-setup |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
167 :type '(choice |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
168 (const :tag "never" nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
169 (const :tag "everywhere" t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
170 (const :tag "in command line only" cmdline))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
171 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
172 ;; FIXME: add comint-input-ring-size? |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
173 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
174 (defcustom idlwave-shell-use-toolbar t |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
175 "*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
|
176 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
|
177 Exiting the shell will removed everywhere. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
178 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
|
179 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
|
180 `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
|
181 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
182 :type 'boolean) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
183 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
184 (defcustom idlwave-shell-temp-pro-prefix "/tmp/idltemp" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
185 "*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
|
186 It should be an absolute pathname. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
187 The full temporary file name is obtained by using `make-temp-file' |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
188 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
|
189 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
190 :type 'string) |
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 (defvar idlwave-shell-fix-inserted-breaks nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
193 "*OBSOLETE VARIABLE, is no longer used. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
194 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
195 The documentation of this variable used to be: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
196 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
|
197 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
198 (defcustom idlwave-shell-prefix-key "\C-c\C-d" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
199 "*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
|
200 This variable must already be set when idlwave-shell.el is loaded. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
201 Setting it in the mode-hook is too late." |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
202 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
203 :type 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
204 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
205 (defcustom idlwave-shell-activate-prefix-keybindings t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
206 "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
|
207 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
|
208 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
|
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 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
212 ;; (defcustom idlwave-shell-debug-modifiers... See idlwave.el |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
213 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
214 (defvar idlwave-shell-activate-alt-keybindings nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
215 "Obsolete variable. See `idlwave-shell-debug-modifiers'.") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
216 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
217 (defcustom idlwave-shell-use-truename nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
218 "*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
|
219 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
|
220 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
|
221 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
|
222 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
|
223 reuse that buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
224 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
|
225 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
|
226 to set this option to nil." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
227 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
228 :type 'boolean) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
229 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
230 (defcustom idlwave-shell-file-name-chars "~/A-Za-z0-9+:_.$#%={}\\-" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
231 "The characters allowed in file names, as a string. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
232 Used for file name completion. Must not contain `'', `,' and `\"' |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
233 because these are used as separators by IDL." |
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 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
236 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
237 (defcustom idlwave-shell-mode-hook '() |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
238 "*Hook for customising `idlwave-shell-mode'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
239 :group 'idlwave-shell-general-setup |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
240 :type 'hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
241 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
242 (defcustom idlwave-shell-graphics-window-size '(500 400) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
243 "Size of IDL graphics windows popped up by special IDLWAVE command. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
244 The command is `C-c C-d C-f' and accepts as a prefix the window nr. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
245 A command like `WINDOW,N,xsize=XX,ysize=YY' is sent to IDL." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
246 :group 'idlwave-shell-general-setup |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
247 :type '(list |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
248 (integer :tag "x size") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
249 (integer :tag "y size"))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
250 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
251 ;; Commands Sent to Shell... etc. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
252 (defgroup idlwave-shell-command-setup nil |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
253 "Setup for command parameters of the Shell interaction for IDLWAVE." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
254 :prefix "idlwave-shell" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
255 :group 'idlwave) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
256 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
257 (defcustom idlwave-shell-initial-commands "!more=0" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
258 "Initial commands, separated by newlines, to send to IDL. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
259 This string is sent to the IDL process by `idlwave-shell-mode' which is |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
260 invoked by `idlwave-shell'." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
261 :group 'idlwave-shell-command-setup |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
262 :type 'string) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
263 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
264 (defcustom idlwave-shell-save-command-history t |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
265 "Non-nil means preserve command history between sessions. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
266 The file `idlwave-shell-command-history-file' is used to save and restore |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
267 the history." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
268 :group 'idlwave-shell-command-setup |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
269 :type 'boolean) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
270 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
271 (defcustom idlwave-shell-command-history-file "~/.idlwhist" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
272 "The file in which the command history of the idlwave shell is saved. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
273 In order to change the size of the history, see the variable |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
274 `comint-input-ring-size'. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
275 The history is only saved if the variable `idlwave-shell-save-command-history' |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
276 is non-nil." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
277 :group 'idlwave-shell-command-setup |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
278 :type 'file) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
279 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
280 (defcustom idlwave-shell-show-commands |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
281 '(run misc breakpoint) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
282 "*A list of command types to show output from in the shell. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
283 Possibilities are 'run, 'debug, 'breakpoint, and 'misc . Unlisted |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
284 types are not displayed in the shell. The single type 'everything |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
285 causes all the copious shell traffic to be displayed." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
286 :group 'idlwave-shell-command-setup |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
287 :type '(choice |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
288 (const everything) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
289 (set :tag "Checklist" :greedy t |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
290 (const :tag "All .run and .compile commands" run) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
291 (const :tag "All breakpoint commands" breakpoint) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
292 (const :tag "All debug and stepping commands" debug) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
293 (const :tag "Return, close, etc. commands" misc)))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
294 |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
295 (defcustom idlwave-shell-examine-alist |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
296 '(("Print" . "print,___") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
297 ("Help" . "help,___") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
298 ("Structure Help" . "help,___,/STRUCTURE") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
299 ("Dimensions" . "print,size(___,/DIMENSIONS)") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
300 ("Type" . "print,size(___,/TNAME)") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
301 ("N_Elements" . "print,n_elements(___)") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
302 ("All Size Info" . "help,(__IWsz__=size(___,/STRUCTURE)),/STRUCTURE & print,__IWsz__.DIMENSIONS") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
303 ("Ptr Valid" . "print,ptr_valid(___)") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
304 ("Widget Valid" . "print,widget_info(___,/VALID)") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
305 ("Widget Geometry" . "help,widget_info(___,/GEOMETRY)")) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
306 "Alist of special examine commands for popup selection. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
307 The keys are used in the selection popup created by |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
308 `idlwave-shell-examine-select', and the corresponding value is sent as |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
309 a command to the shell, with special sequence `___' replaced by the |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
310 expression being examined." |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
311 :group 'idlwave-shell-command-setup |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
312 :type '(repeat |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
313 (cons |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
314 (string :tag "Label ") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
315 (string :tag "Command")))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
316 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
317 (defvar idlwave-shell-print-expression-function nil |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
318 "*OBSOLETE VARIABLE, is no longer used.") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
319 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
320 (defcustom idlwave-shell-separate-examine-output t |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
321 "*Non-nil mean, put output of examine commands in their own buffer." |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
322 :group 'idlwave-shell-command-setup |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
323 :type 'boolean) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
324 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
325 (defcustom idlwave-shell-comint-settings |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
326 '((comint-scroll-to-bottom-on-input . t) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
327 (comint-scroll-to-bottom-on-output . t) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
328 (comint-scroll-show-maximum-output . nil)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
329 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
330 "Alist of special settings for the comint variables in the IDLWAVE Shell. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
331 Each entry is a cons cell with the name of a variable and a value. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
332 The function `idlwave-shell-mode' will make local variables out of each entry. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
333 Changes to this variable will only be active when the shell buffer is |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
334 newly created." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
335 :group 'idlwave-shell-command-setup |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
336 :type '(repeat |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
337 (cons variable sexp))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
338 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
339 (defcustom idlwave-shell-query-for-class t |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
340 "*Non-nil means query the shell for object class on object completions." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
341 :group 'idlwave-shell-command-setup |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
342 :type 'boolean) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
343 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
344 (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
|
345 "*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
|
346 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
|
347 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
|
348 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
|
349 back, respectively. See `idlwave-shell-input-mode-spells' for details." |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
350 :group 'idlwave-shell-command-setup |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
351 :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
|
352 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
353 (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
|
354 '("^<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
|
355 "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
|
356 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
357 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
|
358 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
|
359 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
|
360 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
361 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
|
362 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
|
363 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
|
364 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
|
365 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
|
366 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
367 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
|
368 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
|
369 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
|
370 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
371 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
|
372 GET_KBRD, because in normal operation IDLWAVE only sends \\n terminated |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
373 strings. Here is some example code which makes use of the default spells. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
374 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
375 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
|
376 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
|
377 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
|
378 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
|
379 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
|
380 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
|
381 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
382 print,'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
|
383 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
|
384 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
|
385 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
386 Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION', |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
387 you could actually check if you are running under Emacs before printing |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
388 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
|
389 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
390 Usage: |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
391 ====== |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
392 idlwave_char_input ; 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
|
393 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
|
394 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
|
395 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
396 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
397 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
|
398 ;; 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
|
399 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
|
400 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
|
401 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
|
402 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
|
403 else print,'<onechar>' |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
404 endif |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
405 end" |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
406 :group 'idlwave-shell-command-setup |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
407 :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
|
408 (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
|
409 (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
|
410 (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
|
411 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
412 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
413 ;; Breakpoint Overlays etc |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
414 (defgroup idlwave-shell-highlighting-and-faces nil |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
415 "Highlighting and Faces used by the IDLWAVE Shell mode." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
416 :prefix "idlwave-shell" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
417 :group 'idlwave) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
418 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
419 (defcustom idlwave-shell-mark-stop-line t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
420 "*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
|
421 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
|
422 are: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
423 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
424 nil Do not mark the line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
425 'arrow Use the overlay arrow |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
426 'face Use `idlwave-shell-stop-line-face' to highlight the line. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
427 t Use what IDLWAVE thinks is best. Will be a face where possible, |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
428 otherwise the overlay arrow. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
429 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
|
430 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
|
431 a face highlighting may be better. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
432 In Emacs 21, the overlay arrow is displayed in a special area and never |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
433 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
|
434 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
435 :type '(choice |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
436 (const :tag "No marking" nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
437 (const :tag "Use overlay arrow" arrow) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
438 (const :tag "Highlight with face" face) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
439 (const :tag "Face or arrow." t))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
440 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
441 (defcustom idlwave-shell-overlay-arrow ">" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
442 "*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
|
443 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
|
444 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
|
445 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
|
446 See also `idlwave-shell-use-overlay-arrow'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
447 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
448 :type 'string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
449 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
450 (defcustom idlwave-shell-stop-line-face 'highlight |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
451 "*The face for `idlwave-shell-stop-line-overlay'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
452 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
|
453 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
|
454 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
455 :type 'symbol) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
456 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
457 (defcustom idlwave-shell-mark-breakpoints t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
458 "*Non-nil means, mark breakpoints in the source files. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
459 Legal values are: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
460 nil Do not mark breakpoints. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
461 'face Highlight line with `idlwave-shell-breakpoint-face'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
462 '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
|
463 support glyphs, will use 'face instead. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
464 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
|
465 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
466 :type '(choice |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
467 (const :tag "No marking" nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
468 (const :tag "Highlight with face" face) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
469 (const :tag "Display glyph (red dot)" glyph) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
470 (const :tag "Glyph or face." t))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
471 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
472 (defvar idlwave-shell-use-breakpoint-glyph t |
47262
1c1d47728dc8
(idlwave-shell-use-breakpoint-glyph): Fix spacing.
Juanma Barranquero <lekktu@gmail.com>
parents:
46529
diff
changeset
|
473 "Obsolete variable. See `idlwave-shell-mark-breakpoints.") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
474 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
475 (defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp-face |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
476 "*The face for breakpoint lines in the source code. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
477 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
|
478 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
|
479 :group 'idlwave-shell-highlighting-and-faces |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
480 :type 'symbol) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
481 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
482 (if idlwave-shell-have-new-custom |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
483 ;; 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
|
484 (defface idlwave-shell-bp-face |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
485 '((((class color)) (:foreground "Black" :background "Pink")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
486 (t (:underline t))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
487 "Face for highlighting lines-with-breakpoints." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
488 :group 'idlwave-shell-highlighting-and-faces) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
489 ;; 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
|
490 (copy-face 'underline 'idlwave-shell-bp-face)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
491 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
492 (defcustom idlwave-shell-expression-face 'secondary-selection |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
493 "*The face for `idlwave-shell-expression-overlay'. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
494 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
|
495 the expression printed by IDL." |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
496 :group 'idlwave-shell-highlighting-and-faces |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
497 :type 'symbol) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
498 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
499 (defcustom idlwave-shell-output-face 'secondary-selection |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
500 "*The face for `idlwave-shell-output-overlay'. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
501 Allows you to choose the font, color and other properties for |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
502 the expression output by IDL." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
503 :group 'idlwave-shell-highlighting-and-faces |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
504 :type 'symbol) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
505 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
506 ;;; End user customization variables |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
507 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
508 ;;; External variables |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
509 (defvar comint-last-input-start) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
510 (defvar comint-last-input-end) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
511 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
512 (defun idlwave-shell-temp-file (type) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
513 "Return a temp file, creating it if necessary. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
514 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
515 TYPE is either 'pro or 'rinfo, and idlwave-shell-temp-pro-file or |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
516 idlwave-shell-temp-rinfo-save-file is set (respectively)." |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
517 (cond |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
518 ((eq type 'rinfo) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
519 (or idlwave-shell-temp-rinfo-save-file |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
520 (setq idlwave-shell-temp-rinfo-save-file |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
521 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
522 ((eq type 'pro) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
523 (or idlwave-shell-temp-pro-file |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
524 (setq idlwave-shell-temp-pro-file |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
525 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
526 (t (error "Wrong argument (idlwave-shell-temp-file): %s" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
527 (symbol-name type))))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
528 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
529 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
530 (defun idlwave-shell-make-temp-file (prefix) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
531 "Create a temporary file." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
532 ; Hard coded make-temp-file for Emacs<21 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
533 (if (fboundp 'make-temp-file) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
534 (make-temp-file prefix) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
535 (let (file |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
536 (temp-file-dir (if (boundp 'temporary-file-directory) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
537 temporary-file-directory |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
538 "/tmp"))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
539 (while (condition-case () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
540 (progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
541 (setq file |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
542 (make-temp-name |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
543 (expand-file-name prefix temp-file-dir))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
544 (if (featurep 'xemacs) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
545 (write-region "" nil file nil 'silent nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
546 (write-region "" nil file nil 'silent nil 'excl)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
547 nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
548 (file-already-exists t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
549 ;; the file was somehow created by someone else between |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
550 ;; `make-temp-name' and `write-region', let's try again. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
551 nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
552 file))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
553 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
554 ;; Other variables |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
555 (defvar idlwave-shell-temp-pro-file |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
556 nil |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
557 "Absolute pathname for temporary IDL file for compiling regions") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
558 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
559 (defvar idlwave-shell-temp-rinfo-save-file |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
560 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
|
561 "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
|
562 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
|
563 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
|
564 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
565 (defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur" |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
566 "Command used by `idlwave-shell-resync-dirs' to query IDL for |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
567 the directory stack.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
568 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
569 (defvar idlwave-shell-path-query "__pa=expand_path(!path,/array)&for i=0,n_elements(__pa)-1 do print,'PATH:<'+__pa[i]+'>'&print,'SYSDIR:<'+!dir+'>'" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
570 "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
|
571 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
572 (defvar idlwave-shell-mode-line-info nil |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
573 "Additional info displayed in the mode line") |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
574 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
575 (defvar idlwave-shell-default-directory nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
576 "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
|
577 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
578 (defvar idlwave-shell-last-save-and-action-file nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
579 "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
|
580 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
581 ;; Highlighting uses overlays. When necessary, require the emulation. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
582 (if (not (fboundp 'make-overlay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
583 (condition-case nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
584 (require 'overlay) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
585 (error nil))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
586 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
587 (defvar idlwave-shell-stop-line-overlay nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
588 "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
|
589 (defvar idlwave-shell-is-stopped nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
590 (defvar idlwave-shell-expression-overlay nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
591 "The overlay for where IDL is currently stopped.") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
592 (defvar idlwave-shell-output-overlay nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
593 "The overlay for the last IDL output.") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
594 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
595 ;; 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
|
596 ;; are reloading this file. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
597 (if (overlayp idlwave-shell-stop-line-overlay) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
598 (delete-overlay idlwave-shell-stop-line-overlay)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
599 (if (overlayp idlwave-shell-expression-overlay) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
600 (delete-overlay idlwave-shell-expression-overlay)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
601 (if (overlayp idlwave-shell-output-overlay) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
602 (delete-overlay idlwave-shell-output-overlay)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
603 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
604 ;; Set to nil initially |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
605 (setq idlwave-shell-stop-line-overlay nil |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
606 idlwave-shell-expression-overlay nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
607 idlwave-shell-output-overlay nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
608 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
609 ;; 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
|
610 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
611 ((or (null idlwave-shell-mark-stop-line) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
612 (eq idlwave-shell-mark-stop-line 'arrow)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
613 ;; Leave the overlay nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
614 nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
615 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
616 ((eq idlwave-shell-mark-stop-line 'face) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
617 ;; 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
|
618 ;; So who can display faces? |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
619 (when (or (featurep 'xemacs) ; XEmacs can do also ttys |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
620 (fboundp 'tty-defined-colors) ; Emacs 21 as well |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
621 window-system) ; Window systems always |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
622 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
623 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
624 (overlay-put idlwave-shell-stop-line-overlay |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
625 'face idlwave-shell-stop-line-face)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
626 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
627 (t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
628 ;; 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
|
629 (if window-system |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
630 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
631 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
632 (overlay-put idlwave-shell-stop-line-overlay |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
633 'face idlwave-shell-stop-line-face))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
634 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
635 ;; Now the expression and output overlays |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
636 (setq idlwave-shell-expression-overlay (make-overlay 1 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
637 (overlay-put idlwave-shell-expression-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
638 'face idlwave-shell-expression-face) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
639 (setq idlwave-shell-output-overlay (make-overlay 1 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
640 (overlay-put idlwave-shell-output-overlay |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
641 'face idlwave-shell-output-face) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
642 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
643 (defvar idlwave-shell-bp-query "help,/breakpoints" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
644 "Command to obtain list of breakpoints") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
645 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
646 (defvar idlwave-shell-command-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
647 "String for accumulating current command output.") |
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 (defvar idlwave-shell-post-command-hook nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
650 "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
|
651 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
|
652 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
|
653 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
654 (defvar idlwave-shell-sentinel-hook nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
655 "Hook run when the idl process exits.") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
656 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
657 (defvar idlwave-shell-hide-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
658 "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
|
659 buffer.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
660 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
661 (defvar idlwave-shell-accumulation nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
662 "Accumulate last line of output.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
663 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
664 (defvar idlwave-shell-command-line-to-execute nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
665 (defvar idlwave-shell-cleanup-hook nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
666 "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
|
667 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
668 (defvar idlwave-shell-pending-commands nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
669 "List of commands to be sent to IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
670 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
|
671 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
|
672 `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
|
673 from command CMD. PCMD and HIDE are optional.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
674 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
675 (defun idlwave-shell-buffer () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
676 "Name of buffer associated with IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
677 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
|
678 with `*'s." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
679 (concat "*" idlwave-shell-process-name "*")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
680 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
681 (defvar idlwave-shell-ready nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
682 "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
|
683 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
684 (defvar idlwave-shell-wait-for-output nil |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
685 "Whether to wait for output to accumulate.") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
686 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
687 ;;; 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
|
688 ;;; resync our idea of where IDL execution currently is. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
689 ;;; |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
690 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
691 (defvar idlwave-shell-halt-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
692 "The frame associated with halt/breakpoint messages.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
693 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
694 (defvar idlwave-shell-step-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
695 "The frame associated with step messages.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
696 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
697 (defvar idlwave-shell-trace-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
698 "The frame associated with trace messages.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
699 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
700 (defconst idlwave-shell-halt-messages |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
701 '("^% Execution halted at" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
702 "^% Interrupted at:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
703 "^% Stepped to:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
704 "^% At " |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
705 "^% Stop encountered:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
706 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
707 "*A list of regular expressions matching IDL messages. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
708 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
|
709 IDL is currently stopped.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
710 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
711 (defconst idlwave-shell-halt-messages-re |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
712 (mapconcat 'identity idlwave-shell-halt-messages "\\|") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
713 "The regular expression computed from idlwave-shell-halt-messages") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
714 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
715 (defconst idlwave-shell-trace-messages |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
716 '("^% At " ;; First line of a trace message |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
717 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
718 "*A list of regular expressions matching IDL trace messages. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
719 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
|
720 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
|
721 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
722 (defconst idlwave-shell-step-messages |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
723 '("^% Stepped to:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
724 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
725 "*A list of regular expressions matching stepped execution messages. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
726 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
|
727 IDL has currently stepped.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
728 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
729 (defvar idlwave-shell-break-message "^% Breakpoint at:" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
730 "*Regular expression matching an IDL breakpoint message line.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
731 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
732 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
733 (defvar idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
734 ;(defvar idlwave-shell-post-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
735 (defvar idlwave-shell-sources-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
736 (defvar idlwave-shell-menu-def) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
737 (defvar idlwave-shell-mode-menu) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
738 (defvar idlwave-shell-initial-commands) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
739 (defvar idlwave-shell-syntax-error) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
740 (defvar idlwave-shell-other-error) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
741 (defvar idlwave-shell-error-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
742 (defvar idlwave-shell-error-last) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
743 (defvar idlwave-shell-bp-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
744 (defvar idlwave-shell-sources-query) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
745 (defvar idlwave-shell-mode-map) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
746 (defvar idlwave-shell-calling-stack-index) |
27107
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 (defun idlwave-shell-mode () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
749 "Major mode for interacting with an inferior IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
750 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
751 1. Shell Interaction |
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 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
|
754 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
|
755 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
|
756 end of the buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
757 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
758 Command history, searching of previous commands, command line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
759 editing are available via the comint-mode key bindings, by default |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
760 mostly on the key `C-c'. Command history is also available with |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
761 the arrow keys UP and DOWN. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
762 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
763 2. Completion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
764 ---------- |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
765 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
|
766 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
|
767 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
|
768 like in `idlwave-mode'. |
27107
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 3. Routine Info |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
771 ------------ |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
772 `\\[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
|
773 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
|
774 the one whose argument list is being edited. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
775 To update IDLWAVE's knowledge about compiled or edited modules, use |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
776 \\[idlwave-update-routine-info]. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
777 \\[idlwave-find-module] find the source of a module. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
778 \\[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
|
779 \\[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
|
780 point, if online help has been installed. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
781 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
782 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
783 4. Debugging |
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 A complete set of commands for compiling and debugging IDL programs |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
786 is available from the menu. Also keybindings starting with a |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
787 `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
|
788 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
|
789 keybindings is again the menu. |
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 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
|
792 installed. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
793 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
794 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
|
795 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
|
796 window. Breakpoints are also highlighted in the source. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
797 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
798 \\[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
|
799 to correspond to the IDL process current directory. |
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 5. Hooks |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
802 ----- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
803 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
|
804 `idlwave-shell-mode-hook' (in that order). |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
805 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
806 6. Documentation and Customization |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
807 ------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
808 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
|
809 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
|
810 For Postscript and HTML versions of the documentation, check IDLWAVE's |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
811 homepage at `http://idlwave.org'. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
812 IDLWAVE has customize support - see the group `idlwave'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
813 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
814 7. Keybindings |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
815 ----------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
816 \\{idlwave-shell-mode-map}" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
817 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
818 (interactive) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
819 ;; We don't do `kill-all-local-variables' here, because this is done by |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
820 ;; comint - idlwave-shell-mode only add on top of that. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
821 (setq comint-prompt-regexp idlwave-shell-prompt-pattern) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
822 (setq comint-process-echoes t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
823 ;; 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
|
824 (setq comint-input-autoexpand nil) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
825 ; (setq comint-input-ring-size 64) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
826 (make-local-variable 'comint-completion-addsuffix) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
827 (set (make-local-variable 'completion-ignore-case) t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
828 (setq comint-completion-addsuffix '("/" . "")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
829 (setq comint-input-ignoredups t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
830 (setq major-mode 'idlwave-shell-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
831 (setq mode-name "IDL-Shell") |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
832 (setq idlwave-shell-mode-line-info nil) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
833 (setq mode-line-format |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
834 '("" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
835 mode-line-modified |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
836 mode-line-buffer-identification |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
837 " " |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
838 global-mode-string |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
839 " %[(" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
840 mode-name |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
841 mode-line-process |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
842 minor-mode-alist |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
843 "%n" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
844 ")%]-" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
845 idlwave-shell-mode-line-info |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
846 "---" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
847 (line-number-mode "L%l--") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
848 (column-number-mode "C%c--") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
849 (-3 . "%p") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
850 "-%-")) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
851 ;; (make-local-variable 'idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
852 (setq idlwave-shell-halt-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
853 idlwave-shell-trace-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
854 idlwave-shell-command-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
855 idlwave-shell-step-frame nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
856 (idlwave-shell-display-line nil) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
857 (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
|
858 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
859 (when idlwave-shell-query-for-class |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
860 (add-to-list (make-local-variable 'idlwave-determine-class-special) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
861 'idlwave-shell-get-object-class) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
862 (setq idlwave-store-inquired-class t)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
863 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
864 ;; 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
|
865 ;; 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
|
866 (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
|
867 (setq idlwave-idlwave_routine_info-compiled nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
868 (setq idlwave-shell-ready nil) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
869 (setq idlwave-shell-wait-for-output nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
870 (setq idlwave-shell-bp-alist nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
871 (idlwave-shell-update-bp-overlays) ; Throw away old overlays |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
872 (setq idlwave-shell-sources-alist nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
873 (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
|
874 (setq idlwave-shell-hide-output nil) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
875 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
876 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
877 (make-local-hook 'kill-buffer-hook) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
878 (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
|
879 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
|
880 (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
|
881 (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
|
882 (use-local-map idlwave-shell-mode-map) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
883 (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
|
884 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
885 ;; Set the optional comint variables |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
886 (when idlwave-shell-comint-settings |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
887 (let ((list idlwave-shell-comint-settings) entry) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
888 (while (setq entry (pop list)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
889 (set (make-local-variable (car entry)) (cdr entry))))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
890 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
891 ;; 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
|
892 (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
|
893 (set-syntax-table idlwave-mode-syntax-table) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
894 (set (make-local-variable 'comment-start) ";") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
895 (setq abbrev-mode t) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
896 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
897 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
898 (make-local-hook 'post-command-hook) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
899 (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
|
900 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
901 ;; Read the command history? |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
902 (when (and idlwave-shell-save-command-history |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
903 (stringp idlwave-shell-command-history-file)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
904 (set (make-local-variable 'comint-input-ring-file-name) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
905 idlwave-shell-command-history-file) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
906 (if (file-regular-p idlwave-shell-command-history-file) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
907 (comint-read-input-ring))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
908 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
909 ;; Run the hooks. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
910 (run-hooks 'idlwave-shell-mode-hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
911 (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
|
912 ;; Define a system variable which knows the version of IDLWAVE |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
913 (idlwave-shell-send-command |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
914 (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
|
915 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
|
916 (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
|
917 (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
|
918 (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
|
919 '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
|
920 'hide))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
921 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
922 (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
|
923 (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
|
924 (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
|
925 (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
|
926 (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
|
927 (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
|
928 dirs)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
929 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
930 (if (not (fboundp 'idl-shell)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
931 (fset 'idl-shell 'idlwave-shell)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
932 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
933 (defvar idlwave-shell-idl-wframe nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
934 "Frame for displaying the idl shell window.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
935 (defvar idlwave-shell-display-wframe nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
936 "Frame for displaying the idl source files.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
937 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
938 (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
|
939 (defvar idlwave-shell-calling-stack-routine nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
940 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
941 (defun idlwave-shell-source-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
942 "Return the frame to be used for source display." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
943 (if idlwave-shell-use-dedicated-frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
944 ;; We want separate frames for source and shell |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
945 (if (frame-live-p idlwave-shell-display-wframe) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
946 ;; The frame exists, so we use it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
947 idlwave-shell-display-wframe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
948 ;; The frame does not exist. We use the current frame. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
949 ;; However, if the current is the shell frame, we make a new frame, |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
950 ;; or recycle the first existing visible frame |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
951 (setq idlwave-shell-display-wframe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
952 (if (eq (selected-frame) idlwave-shell-idl-wframe) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
953 (or |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
954 (let ((flist (visible-frame-list)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
955 (frame (selected-frame))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
956 (catch 'exit |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
957 (while flist |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
958 (if (not (eq (car flist) |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
959 idlwave-shell-idl-wframe)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
960 (throw 'exit (car flist)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
961 (setq flist (cdr flist)))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
962 (make-frame)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
963 (selected-frame)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
964 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
965 (defun idlwave-shell-shell-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
966 "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
|
967 (if idlwave-shell-use-dedicated-frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
968 ;; We want a dedicated frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
969 (if (frame-live-p idlwave-shell-idl-wframe) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
970 ;; It does exist, so we use it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
971 idlwave-shell-idl-wframe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
972 ;; 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
|
973 (if (not (frame-live-p idlwave-shell-display-wframe)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
974 ;; 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
|
975 (setq idlwave-shell-display-wframe (selected-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
976 ;; Return a new frame |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
977 (setq idlwave-shell-idl-wframe |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
978 (make-frame idlwave-shell-frame-parameters))))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
979 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
980 ;;;###autoload |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
981 (defun idlwave-shell (&optional arg quick) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
982 "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
|
983 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
|
984 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
|
985 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
986 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
|
987 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
|
988 separate frames. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
989 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
990 The command to run comes from variable `idlwave-shell-explicit-file-name', |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
991 with options taken from `idlwave-shell-command-line-options'. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
992 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
993 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
|
994 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
|
995 See also the variable `idlwave-shell-prompt-pattern'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
996 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
997 \(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
|
998 (interactive "P") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
999 (if (eq arg 'quick) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1000 (progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1001 (let ((idlwave-shell-use-dedicated-frame nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1002 (idlwave-shell nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1003 (delete-other-windows)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1004 (and idlwave-shell-use-dedicated-frame |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1005 (setq idlwave-shell-idl-wframe (selected-frame))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1006 (add-hook 'idlwave-shell-sentinel-hook |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1007 'save-buffers-kill-emacs t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1008 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1009 ;; A non-nil arg means, we want a dedicated frame. This will last |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1010 ;; for the current editing session. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1011 (if arg (setq idlwave-shell-use-dedicated-frame t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1012 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1013 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1014 ;; Check if the process still exists. If not, create it. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1015 (unless (comint-check-proc (idlwave-shell-buffer)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1016 (let* ((prg (or idlwave-shell-explicit-file-name "idl")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1017 (buf (apply 'make-comint |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1018 idlwave-shell-process-name prg nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1019 (if (stringp idlwave-shell-command-line-options) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1020 (idlwave-split-string |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1021 idlwave-shell-command-line-options) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1022 idlwave-shell-command-line-options))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1023 (process (get-buffer-process buf))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1024 (setq idlwave-idlwave_routine_info-compiled nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1025 (set-process-filter process 'idlwave-shell-filter) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1026 (set-process-sentinel process 'idlwave-shell-sentinel) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1027 (set-buffer buf) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1028 (idlwave-shell-mode))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1029 (let ((window (idlwave-display-buffer (idlwave-shell-buffer) nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1030 (idlwave-shell-shell-frame))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1031 (current-window (selected-window))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1032 (select-window window) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1033 (goto-char (point-max)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1034 (select-window current-window) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1035 (if idlwave-shell-ready |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1036 (raise-frame (window-frame window))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1037 (if (eq (selected-frame) (window-frame window)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1038 (select-window window)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1039 ))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1040 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1041 (defun idlwave-shell-recenter-shell-window (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1042 "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
|
1043 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1044 (let ((window (selected-window))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1045 (idlwave-shell arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1046 (select-window window))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1047 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1048 (defun idlwave-shell-hide-p (type) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1049 "Whether to hide this type of command. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1050 Return either nil or 'hide." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1051 (if (listp idlwave-shell-show-commands) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1052 (if (not (memq type idlwave-shell-show-commands)) 'hide))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1053 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1054 (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
|
1055 "Send a command to IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1056 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1057 \(CMD PCMD HIDE\) are placed at the end of |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1058 ` idlwave-shell-pending-commands'. If IDL is ready the first command, |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1059 CMD, in `idlwave-shell-pending-commands' is sent to the IDL process. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1060 If optional second argument PCMD is non-nil it will be placed on |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1061 `idlwave-shell-post-command-hook' when CMD is executed. If the |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1062 optional third argument HIDE is non-nil, then hide output from CMD. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1063 If optional fourth argument PREEMPT is non-nil CMD is put at front of |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1064 `idlwave-shell-pending-commands'. If PREEMPT is 'wait, wait for all |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1065 output to complete and the next prompt to arrive before returning |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1066 \(useful if you need an answer now\). IDL is considered ready if the |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1067 prompt is present and if `idlwave-shell-ready' is non-nil." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1068 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1069 ; (setq hide nil) ; FIXME: turn this on for debugging only |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1070 ; (if (null cmd) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1071 ; (progn |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1072 ; (message "SENDING Pending commands: %s" |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1073 ; (prin1-to-string idlwave-shell-pending-commands))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1074 ; (message "SENDING %s|||%s" cmd pcmd)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1075 (if (and (symbolp idlwave-shell-show-commands) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1076 (eq idlwave-shell-show-commands 'everything)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1077 (setq hide nil)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1078 (let ((save-buffer (current-buffer)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1079 buf proc) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1080 ;; Get or make the buffer and its process |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1081 (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
|
1082 (not (setq proc (get-buffer-process buf)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1083 (if (not idlwave-shell-automatic-start) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1084 (error |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1085 (substitute-command-keys |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1086 "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
|
1087 (idlwave-shell-recenter-shell-window) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1088 (setq buf (get-buffer (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1089 (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
|
1090 (not (setq proc (get-buffer-process buf)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1091 ;; Still nothing |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1092 (error "Problem with autostarting IDL shell")))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1093 (when (or cmd idlwave-shell-pending-commands) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1094 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1095 ;; 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
|
1096 (if cmd |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1097 (setq idlwave-shell-pending-commands |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1098 (if preempt |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1099 ;; Put at front. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1100 (append (list (list cmd pcmd hide)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1101 idlwave-shell-pending-commands) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1102 ;; Put at end. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1103 (append idlwave-shell-pending-commands |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1104 (list (list cmd pcmd hide)))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1105 ;; Check if IDL ready |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1106 (let ((save-point (point-marker))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1107 (goto-char (process-mark proc)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1108 (if (and idlwave-shell-ready |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1109 ;; Check for IDL prompt |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1110 (prog2 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1111 (forward-line 0) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1112 ;; (beginning-of-line) ; Changed for Emacs 21 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1113 (looking-at idlwave-shell-prompt-pattern) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1114 (goto-char (process-mark proc)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1115 ;; IDL ready for command, execute it |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1116 (let* ((lcmd (car idlwave-shell-pending-commands)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1117 (cmd (car lcmd)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1118 (pcmd (nth 1 lcmd)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1119 (hide (nth 2 lcmd))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1120 ;; If this is an executive command, reset the stack pointer |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1121 (if (eq (string-to-char cmd) ?.) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1122 (setq idlwave-shell-calling-stack-index 0)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1123 ;; Set post-command |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1124 (setq idlwave-shell-post-command-hook pcmd) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1125 ;; Output hiding |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1126 (setq idlwave-shell-hide-output hide) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1127 ;; Pop command |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1128 (setq idlwave-shell-pending-commands |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1129 (cdr idlwave-shell-pending-commands)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1130 ;; Send command for execution |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1131 (set-marker comint-last-input-start (point)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1132 (set-marker comint-last-input-end (point)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1133 (comint-simple-send proc cmd) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1134 (setq idlwave-shell-ready nil) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1135 (when (equal preempt 'wait) ; Get all the output at once |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1136 (setq idlwave-shell-wait-for-output t) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1137 (accept-process-output proc)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1138 (goto-char save-point)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1139 (set-buffer save-buffer)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1140 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1141 (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
|
1142 "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
|
1143 (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
|
1144 (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
|
1145 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
|
1146 (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
|
1147 (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
|
1148 (funcall errf "Shell is not running")) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1149 (if (equal c ?\C-g) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1150 (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
|
1151 (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
|
1152 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1153 (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
|
1154 (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
|
1155 "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
|
1156 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
|
1157 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1158 ((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
|
1159 (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
|
1160 ((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
|
1161 (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
|
1162 (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
|
1163 ((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
|
1164 ;; 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
|
1165 (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
|
1166 (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
|
1167 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
|
1168 (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
|
1169 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1170 (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
|
1171 (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
|
1172 "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
|
1173 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
|
1174 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
|
1175 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
|
1176 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
|
1177 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
|
1178 (interactive) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1179 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1180 ;; 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
|
1181 (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
|
1182 (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
|
1183 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
|
1184 (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
|
1185 (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
|
1186 (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
|
1187 (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
|
1188 (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
|
1189 |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1190 ;; OK, start the loop |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1191 (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
|
1192 (message |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1193 (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
|
1194 (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
|
1195 ;; 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
|
1196 ;; 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
|
1197 (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
|
1198 ;; 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
|
1199 (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
|
1200 (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
|
1201 (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
|
1202 (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
|
1203 (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
|
1204 ;; 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
|
1205 (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
|
1206 (setq c (read-char)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1207 (error (ding) (throw 'exit "Character mode off"))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1208 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1209 ((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
|
1210 (ding)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1211 ((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
|
1212 (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
|
1213 (ding) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1214 (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
|
1215 (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
|
1216 (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
|
1217 (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
|
1218 (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
|
1219 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1220 (defun idlwave-shell-move-or-history (up &optional arg) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1221 "When in last line of process buffer, do `comint-previous-input'. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1222 Otherwise just move the line. Move down unless UP is non-nil." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1223 (let* ((proc-pos (marker-position |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1224 (process-mark (get-buffer-process (current-buffer))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1225 (arg (or arg 1)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1226 (arg (if up arg (- arg)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1227 (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1228 (if (and idlwave-shell-arrows-do-history |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1229 (>= (1+ (save-excursion (end-of-line) (point))) proc-pos)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1230 (progn |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1231 (goto-char proc-pos) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1232 (and (not (eolp)) (kill-line nil)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1233 (comint-previous-input arg)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1234 (previous-line arg)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1235 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1236 (defun idlwave-shell-up-or-history (&optional arg) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1237 "When in last line of process buffer, move to previous input. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1238 Otherwise just go up one line." |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1239 (interactive "p") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1240 (idlwave-shell-move-or-history t arg)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1241 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1242 (defun idlwave-shell-down-or-history (&optional arg) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1243 "When in last line of process buffer, move to next input. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1244 Otherwise just go down one line." |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1245 (interactive "p") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1246 (idlwave-shell-move-or-history nil arg)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1247 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1248 ;; Newer versions of comint.el changed the name of comint-filter to |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1249 ;; comint-output-filter. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1250 (defun idlwave-shell-comint-filter (process string) nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1251 (if (fboundp 'comint-output-filter) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1252 (fset 'idlwave-shell-comint-filter (symbol-function 'comint-output-filter)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1253 (fset 'idlwave-shell-comint-filter (symbol-function 'comint-filter))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1254 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1255 (defun idlwave-shell-is-running () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1256 "Return t if the shell process is running." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1257 (eq (process-status idlwave-shell-process-name) 'run)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1258 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1259 (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
|
1260 "Buffer containing hidden output from IDL commands.") |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1261 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1262 (defun idlwave-shell-filter (proc string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1263 "Replace Carriage returns in output. Watch for prompt. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1264 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
|
1265 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
|
1266 ;; 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
|
1267 (when (eq (process-status idlwave-shell-process-name) 'run) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1268 ;; OK, process is still running, so we can use it. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1269 (let ((data (match-data)) p) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1270 (unwind-protect |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1271 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1272 ;; May change the original match data. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1273 (while (setq p (string-match "\C-M" string)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1274 (aset string p ?\ )) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1275 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1276 ;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1277 ;; Keep output |
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 ; 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
|
1280 ; 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
|
1281 ; 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
|
1282 ; 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
|
1283 ; 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
|
1284 ; (setq idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1285 ; (concat idlwave-shell-command-output string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1286 ;; Insert the string. Do this before getting the |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1287 ;; state. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1288 (while (setq p (string-match "\C-G" string)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1289 (ding) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1290 (aset string p ?\C-j )) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1291 (if idlwave-shell-hide-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1292 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1293 (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
|
1294 (get-buffer-create idlwave-shell-hidden-output-buffer)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1295 (goto-char (point-max)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1296 (insert string)) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1297 (idlwave-shell-comint-filter proc string)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1298 ;; Watch for magic - need to accumulate the current line |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1299 ;; since it may not be sent all at once. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1300 (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
|
1301 (progn |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1302 (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
|
1303 (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
|
1304 (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
|
1305 (setq idlwave-shell-accumulation |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1306 (substring string |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1307 (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
|
1308 (match-end 0))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1309 (setq idlwave-shell-accumulation |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1310 (concat idlwave-shell-accumulation string))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1311 |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1312 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1313 ;;; Test/Debug code |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1314 ; (save-excursion (set-buffer |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1315 ; (get-buffer-create "*idlwave-shell-output*")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1316 ; (goto-char (point-max)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1317 ; (insert "\nSTRING===>\n" string "\n<====\n")) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1318 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1319 ;; Check for prompt in current accumulating output |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1320 (if (setq idlwave-shell-ready |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1321 (string-match idlwave-shell-prompt-pattern |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1322 idlwave-shell-accumulation)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1323 (progn |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1324 (if idlwave-shell-hide-output |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1325 (save-excursion |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1326 (set-buffer idlwave-shell-hidden-output-buffer) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1327 (goto-char (point-max)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1328 (re-search-backward idlwave-shell-prompt-pattern nil t) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1329 (goto-char (match-end 0)) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1330 (setq idlwave-shell-command-output |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1331 (buffer-substring (point-min) (point))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1332 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1333 ;;; Test/Debug |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1334 ; (save-excursion (set-buffer |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1335 ; (get-buffer-create "*idlwave-shell-output*")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1336 ; (goto-char (point-max)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1337 ; (insert "\nOUPUT===>\n" idlwave-shell-command-output "\n<===\n")) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1338 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1339 (delete-region (point-min) (point))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1340 (setq idlwave-shell-command-output |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1341 (with-current-buffer (process-buffer proc) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1342 (buffer-substring |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1343 (save-excursion |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1344 (goto-char (process-mark proc)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1345 (beginning-of-line nil) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1346 (point)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1347 comint-last-input-end)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1348 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1349 ;; Scan for state and do post command - bracket them |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1350 ;; with idlwave-shell-ready=nil since they |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1351 ;; may call idlwave-shell-send-command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1352 (let ((idlwave-shell-ready nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1353 (idlwave-shell-scan-for-state) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1354 ;; Unset idlwave-shell-ready to prevent sending |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1355 ;; commands to IDL while running hook. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1356 (if (listp idlwave-shell-post-command-hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1357 (eval idlwave-shell-post-command-hook) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1358 (funcall idlwave-shell-post-command-hook)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1359 ;; Reset to default state for next command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1360 ;; 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
|
1361 (setq idlwave-shell-accumulation nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1362 idlwave-shell-command-output nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1363 idlwave-shell-post-command-hook nil |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1364 idlwave-shell-hide-output nil |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1365 idlwave-shell-wait-for-output nil)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1366 ;; Done with post command. Do pending command if |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1367 ;; any. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1368 (idlwave-shell-send-command)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1369 ;; We didn't get the prompt yet... maybe accept more output |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1370 (when idlwave-shell-wait-for-output |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1371 ;;; Test/Debug code |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1372 ; (save-excursion (set-buffer |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1373 ; (get-buffer-create "*idlwave-shell-output*")) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1374 ; (goto-char (point-max)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1375 ; (insert "\n<=== WAITING ON OUTPUT ==>\n")) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1376 (accept-process-output proc nil 100)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1377 (store-match-data data))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1378 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1379 (defun idlwave-shell-sentinel (process event) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1380 "The sentinel function for the IDLWAVE shell process." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1381 (let* ((buf (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1382 (win (get-buffer-window buf))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1383 (when (get-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1384 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1385 (set-buffer (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1386 (goto-char (point-max)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1387 (insert (format "\n\n Process %s %s" process event)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1388 (if (and idlwave-shell-save-command-history |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1389 (stringp idlwave-shell-command-history-file)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1390 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1391 (comint-write-input-ring) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1392 (error nil))))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1393 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1394 (when (and (> (length (frame-list)) 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1395 (frame-live-p idlwave-shell-idl-wframe)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1396 (delete-frame idlwave-shell-idl-wframe) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1397 (setq idlwave-shell-idl-wframe nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1398 idlwave-shell-display-wframe nil)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1399 (when (and (window-live-p win) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1400 (not (one-window-p 'nomini))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1401 (delete-window win)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1402 (idlwave-shell-cleanup) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1403 ;; Run the hook, if possible in the shell buffer. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1404 (if (get-buffer buf) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1405 (save-excursion |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1406 (set-buffer buf) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1407 (run-hooks 'idlwave-shell-sentinel-hook)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1408 (run-hooks 'idlwave-shell-sentinel-hook)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1409 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1410 (defun idlwave-shell-scan-for-state () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1411 "Scan for state info. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1412 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
|
1413 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
|
1414 execution halted, stepped, breakpoint, interrupted at and trace |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1415 messages. We ignore error messages otherwise. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1416 For breakpoint messages process any attached count or command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1417 parameters. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1418 Update the windows if a message is found." |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1419 (cond |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1420 ;; Make sure we have output |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1421 ((not idlwave-shell-command-output)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1422 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1423 ;; First Priority: Syntax and other errors |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1424 ((or |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1425 (string-match idlwave-shell-syntax-error idlwave-shell-command-output) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1426 (string-match idlwave-shell-other-error idlwave-shell-command-output)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1427 (save-excursion |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1428 (set-buffer |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1429 (get-buffer-create idlwave-shell-error-buffer)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1430 (erase-buffer) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1431 (insert idlwave-shell-command-output) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1432 (goto-char (point-min)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1433 (setq idlwave-shell-error-last (point))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1434 (idlwave-shell-goto-next-error)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1435 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1436 ;; Second Priority: Various types of HALT messages. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1437 ((string-match idlwave-shell-halt-messages-re |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1438 idlwave-shell-command-output) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1439 ;; Grab the file and line state info. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1440 (setq idlwave-shell-calling-stack-index 0) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1441 (setq idlwave-shell-halt-frame |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1442 (idlwave-shell-parse-line |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1443 (substring idlwave-shell-command-output (match-end 0)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1444 (idlwave-shell-display-line (idlwave-shell-pc-frame))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1445 |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1446 ;; Last Priority: Breakpoints |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1447 ((string-match idlwave-shell-break-message |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1448 idlwave-shell-command-output) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1449 (setq idlwave-shell-calling-stack-index 0) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1450 (setq idlwave-shell-halt-frame |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1451 (idlwave-shell-parse-line |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1452 (substring idlwave-shell-command-output (match-end 0)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1453 ;; We used to count hits on breakpoints |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1454 ;; this is no longer supported since IDL breakpoints |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1455 ;; have learned counting. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1456 ;; Do breakpoint command processing |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1457 (let ((bp (assoc |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1458 (list |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1459 (nth 0 idlwave-shell-halt-frame) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1460 (nth 1 idlwave-shell-halt-frame)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1461 idlwave-shell-bp-alist))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1462 (if bp |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1463 (let ((cmd (idlwave-shell-bp-get bp 'cmd))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1464 (if cmd |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1465 ;; Execute command |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1466 (if (listp cmd) (eval cmd) (funcall cmd)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1467 ;; A breakpoint that we did not know about - perhaps it was |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1468 ;; set by the user or IDL isn't reporting breakpoints like |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1469 ;; we expect. Lets update our list. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1470 (idlwave-shell-bp-query))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1471 (idlwave-shell-display-line (idlwave-shell-pc-frame))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1472 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1473 (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1474 "Buffer containing syntax errors from IDL compilations.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1475 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1476 ;; 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
|
1477 ;; 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
|
1478 ;; 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
|
1479 (defvar idlwave-shell-syntax-error |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1480 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1481 "A regular expression to match an IDL syntax error. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1482 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
|
1483 should match the line number.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1484 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1485 (defvar idlwave-shell-other-error |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1486 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1487 "A regular expression to match any IDL error. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1488 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
|
1489 should match the line number.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1490 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1491 (defvar idlwave-shell-file-line-message |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1492 (concat |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1493 "\\(" ; program name group (1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1494 "\\<[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
|
1495 "\\([ \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
|
1496 "\\)" ; end program name group (1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1497 "[ \t\n]+" ; white space |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1498 "\\(" ; line number group (3) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1499 "[0-9]+" ; the line number (the fix point) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1500 "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1501 "\\)" ; end line number group (3) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1502 "[ \t\n]+" ; white space |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1503 "\\(" ; file name group (5) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1504 "[^ \t\n]+" ; file names can contain any non-white |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1505 "\\([ \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
|
1506 "\\)" ; end line number group (5) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1507 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1508 "*A regular expression to parse out the file name and line number. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1509 The 1st group should match the subroutine name. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1510 The 3rd group is the line number. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1511 The 5th group is the file name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1512 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
|
1513 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
|
1514 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1515 (defun idlwave-shell-parse-line (string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1516 "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
|
1517 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
|
1518 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
|
1519 or file names. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1520 It is very difficult to come up with a robust solution. This one seems |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1521 to be pretty good though. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1522 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1523 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
|
1524 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1525 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
|
1526 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
|
1527 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
|
1528 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1529 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
|
1530 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
|
1531 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
|
1532 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
|
1533 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
|
1534 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
|
1535 unlikely." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1536 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1537 (let (number procedure file) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1538 (when (and (not (string-match ":\\s-*\\$MAIN" string)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1539 (string-match idlwave-shell-file-line-message string)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1540 (setq procedure (match-string 1 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1541 number (match-string 3 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1542 file (match-string 5 string)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1543 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1544 ;; Repair the strings |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1545 (setq procedure (idlwave-shell-repair-string procedure)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1546 (setq number (idlwave-shell-repair-string number)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1547 (setq file (idlwave-shell-repair-file-name file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1548 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1549 ;; If we have a file, return the frame list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1550 (if file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1551 (list (idlwave-shell-file-name file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1552 (string-to-int number) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1553 procedure) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1554 ;; No success finding a file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1555 nil)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1556 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1557 (defun idlwave-shell-repair-string (string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1558 "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
|
1559 (while (string-match "[ \t]*\n[ \t]*" string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1560 (setq string (replace-match "" t t string))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1561 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1562 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1563 (defun idlwave-shell-repair-file-name (file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1564 "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
|
1565 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
|
1566 file name." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1567 (let ((file1 "") (file2 "") (start 0)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1568 ;; We scan no further than to the next "^%" line |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1569 (if (string-match "^%" file) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1570 (setq file (substring file 0 (match-beginning 0)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1571 ;; Take out the line breaks |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1572 (while (string-match "[ \t]*\n[ \t]*" file start) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1573 (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
|
1574 start (match-end 0))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1575 (setq file2 (concat file1 (substring file start))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1576 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1577 ((file-regular-p file2) file2) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1578 ((file-regular-p file1) file1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1579 ;; 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
|
1580 ;; 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
|
1581 ;; 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
|
1582 ;; 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
|
1583 ((not (string= "" file1)) file1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1584 ((not (string= "" file2)) file2) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1585 (t nil)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1586 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1587 (defun idlwave-shell-cleanup () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1588 "Do necessary cleanup for a terminated IDL process." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1589 (setq idlwave-shell-step-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1590 idlwave-shell-halt-frame nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1591 idlwave-shell-pending-commands nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1592 idlwave-shell-command-line-to-execute nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1593 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
|
1594 idlwave-shell-calling-stack-index 0 |
47453
2e596fc1fdac
(idlwave-shell-cleanup): Fix reference to `idlwave-idlwave_routine_info-compiled'.
Juanma Barranquero <lekktu@gmail.com>
parents:
47440
diff
changeset
|
1595 idlwave-idlwave_routine_info-compiled nil) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1596 (idlwave-shell-delete-temp-files) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1597 (idlwave-shell-display-line nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1598 (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
|
1599 (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
|
1600 (idlwave-shell-kill-buffer idlwave-shell-bp-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1601 (idlwave-shell-kill-buffer idlwave-shell-error-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1602 ;; (idlwave-shell-kill-buffer (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1603 (and (get-buffer (idlwave-shell-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1604 (bury-buffer (get-buffer (idlwave-shell-buffer)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1605 (run-hooks 'idlwave-shell-cleanup-hook)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1606 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1607 (defun idlwave-shell-kill-buffer (buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1608 "Kill buffer BUF if it exists." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1609 (if (setq buf (get-buffer buf)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1610 (kill-buffer buf))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1611 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1612 (defun idlwave-shell-kill-shell-buffer-confirm () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1613 (when (idlwave-shell-is-running) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1614 (ding) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1615 (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
|
1616 (error "Abort")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1617 (message "Killing buffer *idl* and the associated process"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1618 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1619 (defun idlwave-shell-window (n) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1620 "Issue a `window,N' command to IDL, with special window size. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1621 The size is given by `idlwave-shell-graphics-window-size'." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1622 (interactive "P") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1623 (let ((n (if n (prefix-numeric-value n) 0))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1624 (idlwave-shell-send-command |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1625 (apply 'format "window,%d,xs=%d,ys=%d" |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1626 n idlwave-shell-graphics-window-size) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1627 nil (idlwave-shell-hide-p 'misc)))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1628 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1629 (defun idlwave-shell-resync-dirs () |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1630 "Resync the buffer's idea of the current directory. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1631 This command queries IDL with the command bound to |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1632 `idlwave-shell-dirstack-query', reads the output for the new |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1633 directory." |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1634 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1635 (idlwave-shell-send-command idlwave-shell-dirstack-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1636 'idlwave-shell-filter-directory |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1637 'hide 'wait)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1638 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1639 (defun idlwave-shell-retall (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1640 "Return from the entire calling stack." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1641 (interactive "P") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1642 (idlwave-shell-send-command "retall" nil (idlwave-shell-hide-p 'misc))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1643 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1644 (defun idlwave-shell-closeall (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1645 "Close all open files." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1646 (interactive "P") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1647 (idlwave-shell-send-command "close,/all" nil (idlwave-shell-hide-p 'misc))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1648 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1649 (defun idlwave-shell-quit (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1650 "Exit the idl process after confirmation. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1651 With prefix ARG, exit without confirmation." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1652 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1653 (if (not (idlwave-shell-is-running)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1654 (error "Shell is not running") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1655 (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
|
1656 (condition-case nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1657 (idlwave-shell-send-command "exit") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1658 (error nil))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1659 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1660 (defun idlwave-shell-reset (&optional hidden) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1661 "Reset IDL. Return to main level and destroy the leftover variables. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1662 This issues the following commands: |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1663 RETALL |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1664 WIDGET_CONTROL,/RESET |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1665 CLOSE, /ALL |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1666 HEAP_GC, /VERBOSE" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1667 ;; OBJ_DESTROY, OBJ_VALID() FIXME: should this be added? |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1668 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1669 (message "Resetting IDL") |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1670 (setq idlwave-shell-calling-stack-index 0) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1671 (idlwave-shell-send-command "retall" nil hidden) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1672 (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
|
1673 (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
|
1674 ;; (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
|
1675 (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
|
1676 (idlwave-shell-display-line nil)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1677 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1678 (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
|
1679 ;; 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
|
1680 (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
|
1681 (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
|
1682 (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
|
1683 dirs sysdir) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1684 (while (string-match "^PATH:[ \t]*<\\(.*\\)>[ \t]*\n" path-string start) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1685 (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
|
1686 (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
|
1687 (setq dirs (mapcar 'file-name-as-directory dirs)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1688 (if (string-match "^SYSDIR:[ \t]*<\\(.*\\)>[ \t]*\n" path-string) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1689 (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
|
1690 (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
|
1691 (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
|
1692 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1693 (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
|
1694 "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
|
1695 (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
|
1696 (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
|
1697 sep sep-re file type spec specs name cs key keys class entry) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1698 ; (message "GOT: %s" text) ;?????????????????????? |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1699 ;; 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
|
1700 (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
|
1701 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
|
1702 ;; 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
|
1703 (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
|
1704 "^>>>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
|
1705 text) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1706 (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
|
1707 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
|
1708 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
|
1709 ;; 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
|
1710 (setq sep "@" sep-re "@ *" text "") |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1711 (message "Routine Info warning: No match for BEGIN line in \n>>>>\n%s\n<<<<\n" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1712 idlwave-shell-command-output)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1713 (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
|
1714 (setq text (substring text 0 (match-beginning 0))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1715 (message "Routine Info warning: No match for END line in \n>>>>\n%s\n<<<<\n" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
1716 idlwave-shell-command-output)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1717 (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
|
1718 ;; 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
|
1719 (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
|
1720 ;; 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
|
1721 (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
|
1722 (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
|
1723 (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
|
1724 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
|
1725 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
|
1726 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
|
1727 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
|
1728 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
|
1729 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
|
1730 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
|
1731 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
|
1732 (not (string-match "\\` *\\'" key))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1733 (mapcar 'list |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1734 (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
|
1735 (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
|
1736 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
|
1737 file (if (equal file "") nil file) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1738 keys (mapcar (lambda (x) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1739 (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
|
1740 ;; 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
|
1741 (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
|
1742 ;; 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
|
1743 ;; 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
|
1744 ;; 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
|
1745 ;; (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
|
1746 ;; (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
|
1747 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1748 ;; 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
|
1749 ;; assuming that if the buffer stuff differs, it is a "new" |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1750 ;; version. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1751 ;; 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
|
1752 ;; but I think frequently a user might have several versions of |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1753 ;; the same function in different programs, and in this case the |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1754 ;; 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
|
1755 ;; 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
|
1756 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1757 (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
|
1758 ((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
|
1759 ;; 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
|
1760 (or t (null file) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1761 (not (idlwave-rinfo-assq name 'pro class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1762 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
|
1763 ;; FIXME: is it OK to make the library routines dominate? |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1764 ;;(not (idlwave-rinfo-assq name 'pro class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1765 ;; 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
|
1766 ) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1767 (setq entry (list name 'pro class (cons 'compiled file) cs keys)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1768 (if file |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1769 (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
|
1770 (push entry idlwave-unresolved-routines))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1771 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1772 ((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
|
1773 ;; 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
|
1774 (or t (not file) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1775 (not (idlwave-rinfo-assq name 'fun class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1776 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
|
1777 ;; FIXME: is it OK to make the library routines dominate? |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1778 ;; (not (idlwave-rinfo-assq name 'fun class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1779 ;; 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
|
1780 ) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1781 (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
|
1782 (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
|
1783 (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
|
1784 (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
|
1785 ;; 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
|
1786 (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
|
1787 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
|
1788 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1789 (defun idlwave-shell-filter-directory () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1790 "Get the current directory from `idlwave-shell-command-output'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1791 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
|
1792 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1793 (set-buffer (idlwave-shell-buffer)) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1794 (if (string-match ",___cur[\n\r]\\(\\S-*\\) *[\n\r]" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1795 idlwave-shell-command-output) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1796 (let ((dir (substring idlwave-shell-command-output |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1797 (match-beginning 1) (match-end 1)))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1798 ; (message "Setting Emacs working dir to %s" dir) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1799 (setq idlwave-shell-default-directory dir) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1800 (setq default-directory (file-name-as-directory dir)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1801 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1802 (defvar idlwave-shell-get-object-class nil) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1803 (defun idlwave-shell-get-object-class (apos) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1804 "Query the shell for the class of the object before point." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1805 (let ((bos (save-excursion (idlwave-start-of-substatement 'pre) (point))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1806 (bol (save-excursion (forward-line 0) (point))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1807 expression) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1808 (save-excursion |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1809 (goto-char apos) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1810 (setq expression (buffer-substring |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1811 (catch 'exit |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1812 (while t |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1813 (if (not (re-search-backward |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1814 "[^][.A-Za-z0-9_() ]" bos t)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1815 (throw 'exit bos)) ;ran into bos |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1816 (if (not (idlwave-is-pointer-dereference bol)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1817 (throw 'exit (1+ (point)))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1818 apos))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1819 (when (not (string= expression "")) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1820 (setq idlwave-shell-get-object-class nil) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1821 (idlwave-shell-send-command |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1822 (concat "print,obj_class(" expression ")") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1823 'idlwave-shell-parse-object-class |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1824 'hide 'wait) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1825 ;; If we don't know anything about the class, update shell routines |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1826 (if (and idlwave-shell-get-object-class |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1827 (not (assoc-ignore-case idlwave-shell-get-object-class |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1828 (idlwave-class-alist)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1829 (idlwave-shell-maybe-update-routine-info)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1830 idlwave-shell-get-object-class))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1831 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1832 (defun idlwave-shell-parse-object-class () |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1833 "Parse the output of the obj_class command." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1834 (let ((match "print,obj_class([^\n\r]+[\n\r ]+")) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1835 (if (and |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1836 (not (string-match (concat match match "\\s-*^[\n\r]+" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1837 "% Syntax error") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1838 idlwave-shell-command-output)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1839 (string-match (concat match "\\([A-Za-z_0-9]+\\)") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1840 idlwave-shell-command-output)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1841 (setq idlwave-shell-get-object-class |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1842 (match-string 1 idlwave-shell-command-output))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1843 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1844 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1845 (defun idlwave-shell-complete (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1846 "Do completion in the idlwave-shell buffer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1847 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
|
1848 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
|
1849 keywords." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1850 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1851 (let (cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1852 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1853 ((setq cmd (idlwave-shell-executive-command)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1854 ;; 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
|
1855 (if (member (upcase cmd) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1856 '(".R" ".RU" ".RUN" ".RN" ".RNE" ".RNEW" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1857 ".COM" ".COMP" ".COMPI" ".COMPIL" ".COMPILE")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1858 ;; This command expects file names |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1859 (idlwave-shell-complete-filename))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1860 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1861 ((idlwave-shell-batch-command) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1862 (idlwave-shell-complete-filename)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1863 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1864 ((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
|
1865 (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
|
1866 (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
|
1867 (let ((case-fold-search t)) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1868 (not (looking-at ".*obj_new"))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1869 (idlwave-shell-complete-filename)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1870 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1871 (t |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1872 ;; 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
|
1873 (idlwave-complete arg))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1874 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1875 (defun idlwave-shell-complete-filename (&optional arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1876 "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
|
1877 We assume that we are after a file name when completing one of the |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1878 args of an executive .run, .rnew or .compile." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1879 ;; CWD might have changed, resync, to set default directory |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1880 (idlwave-shell-resync-dirs) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1881 (let ((comint-file-name-chars idlwave-shell-file-name-chars)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1882 (comint-dynamic-complete-as-filename))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1883 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1884 (defun idlwave-shell-executive-command () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1885 "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
|
1886 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1887 (idlwave-beginning-of-statement) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1888 (if (looking-at "[ \t]*\\([.][^ \t\n\r]+\\)") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1889 (match-string 1)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1890 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1891 (defun idlwave-shell-filename-string () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1892 "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
|
1893 (let ((limit (save-excursion (beginning-of-line) (point)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1894 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1895 ;; Skip backwards over file name chars |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1896 (skip-chars-backward idlwave-shell-file-name-chars limit) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1897 ;; Check of the next char is a string delimiter |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1898 (memq (preceding-char) '(?\' ?\"))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1899 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1900 (defun idlwave-shell-batch-command () |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1901 "Returns t if we're in a batch command statement like @foo" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1902 (let ((limit (save-excursion (beginning-of-line) (point)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1903 (save-excursion |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1904 ;; Skip backwards over filename |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1905 (skip-chars-backward idlwave-shell-file-name-chars limit) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1906 (skip-chars-backward " \t" limit) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1907 (and (eq (preceding-char) ?@) (not (idlwave-in-quote)))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
1908 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1909 ;;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1910 ;;; This section contains code for debugging IDL programs. -------------------- |
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 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1913 (defun idlwave-shell-redisplay (&optional hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1914 "Tries to resync the display with where execution has stopped. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1915 Issues a \"help,/trace\" command followed by a call to |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1916 `idlwave-shell-display-line'. Also updates the breakpoint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1917 overlays." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1918 (interactive) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1919 (setq idlwave-shell-calling-stack-index 0) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1920 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1921 "help,/trace" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1922 '(idlwave-shell-display-line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1923 (idlwave-shell-pc-frame)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1924 hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1925 (idlwave-shell-bp-query)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1926 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1927 (defun idlwave-shell-display-level-in-calling-stack (&optional hide) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1928 (idlwave-shell-send-command |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1929 "help,/trace" |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1930 `(progn |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1931 ;; 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
|
1932 (setq idlwave-shell-calling-stack-index |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1933 ,idlwave-shell-calling-stack-index) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1934 ;; 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
|
1935 (idlwave-shell-parse-stack-and-display)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1936 hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1937 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1938 (defun idlwave-shell-parse-stack-and-display () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1939 (let* ((lines (delete "" (idlwave-split-string |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1940 idlwave-shell-command-output "^%"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1941 (stack (delq nil (mapcar 'idlwave-shell-parse-line lines))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1942 (nmax (1- (length stack))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1943 (nmin 0) message) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1944 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1945 ((< 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
|
1946 (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
|
1947 (ding) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
1948 (message "Problem with calling stack")) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1949 ((> idlwave-shell-calling-stack-index nmax) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1950 (ding) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1951 (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
|
1952 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
|
1953 (- nmax)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1954 ((< idlwave-shell-calling-stack-index nmin) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1955 (ding) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1956 (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
|
1957 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
|
1958 (- nmin))))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1959 (setq idlwave-shell-calling-stack-routine |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1960 (nth 2 (nth idlwave-shell-calling-stack-index stack))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1961 (idlwave-shell-display-line |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1962 (nth idlwave-shell-calling-stack-index stack)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1963 (message (or message |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1964 (format "In routine %s (stack level %d)" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1965 idlwave-shell-calling-stack-routine |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1966 (- idlwave-shell-calling-stack-index)))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1967 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1968 (defun idlwave-shell-stack-up () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1969 "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
|
1970 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1971 (incf idlwave-shell-calling-stack-index) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1972 (idlwave-shell-display-level-in-calling-stack 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1973 (defun idlwave-shell-stack-down () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1974 "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
|
1975 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1976 (decf idlwave-shell-calling-stack-index) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1977 (idlwave-shell-display-level-in-calling-stack 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1978 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1979 (defun idlwave-shell-goto-frame (&optional frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1980 "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
|
1981 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
|
1982 used. Does nothing if the resulting frame is nil." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1983 (if frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1984 (setq frame (idlwave-shell-pc-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1985 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1986 (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
|
1987 (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
|
1988 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1989 (goto-line (nth 1 frame))))) |
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-pc-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1992 "Returns the frame for IDL execution." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1993 (and idlwave-shell-halt-frame |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
1994 (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
|
1995 (nth 1 idlwave-shell-halt-frame) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1996 (nth 2 idlwave-shell-halt-frame)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1997 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1998 (defun idlwave-shell-valid-frame (frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
1999 "Check that frame is for an existing file." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2000 (file-readable-p (car frame))) |
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-display-line (frame &optional col) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2003 "Display FRAME file in other window with overlay arrow. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2004 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2005 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
|
2006 If FRAME is nil then remove overlay." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2007 (if (not frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2008 ;; Remove stop-line overlay from old position |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2009 (progn |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2010 (setq overlay-arrow-string nil) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2011 (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
|
2012 (setq idlwave-shell-is-stopped nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2013 (if idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2014 (delete-overlay idlwave-shell-stop-line-overlay))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2015 (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
|
2016 ;; 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
|
2017 ;; have never encountered this one. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2018 (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
|
2019 ;;; |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2020 ;;; buffer : the buffer to display a line in. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2021 ;;; select-shell: current buffer is the shell. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2022 ;;; |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2023 (setq idlwave-shell-mode-line-info |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2024 (if (nth 2 frame) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2025 (format "[%d:%s]" |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2026 (- idlwave-shell-calling-stack-index) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2027 (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
|
2028 (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
|
2029 (select-shell (equal (buffer-name) (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2030 window pos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2031 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2032 ;; First make sure the shell window is visible |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2033 (idlwave-display-buffer (idlwave-shell-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2034 nil (idlwave-shell-shell-frame)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2035 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2036 ;; 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
|
2037 (setq window (idlwave-display-buffer buffer |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2038 nil (idlwave-shell-source-frame))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2039 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2040 ;; Enter the buffer and mark the line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2041 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2042 (set-buffer buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2043 (save-restriction |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2044 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2045 (goto-line (nth 1 frame)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2046 (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
|
2047 (setq idlwave-shell-is-stopped t) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2048 (if idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2049 ;; Move overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2050 (move-overlay idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2051 (point) (save-excursion (end-of-line) (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2052 (current-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2053 ;; 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
|
2054 (if idlwave-shell-mark-stop-line |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2055 (setq overlay-arrow-string idlwave-shell-overlay-arrow)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2056 (or overlay-arrow-position ; create the marker if necessary |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2057 (setq overlay-arrow-position (make-marker))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2058 (set-marker overlay-arrow-position (point) buffer))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2059 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2060 ;; 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
|
2061 (if (or (< pos (point-min)) (> pos (point-max))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2062 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2063 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2064 (goto-char pos))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2065 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2066 ;; 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
|
2067 (if col (move-to-column col)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2068 (setq pos (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2069 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2070 ;; Make sure pos is really displayed in the window. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2071 (set-window-point window pos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2072 |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2073 ;; If we came from the shell, go back there. Otherwise select |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2074 ;; the window where the error is displayed. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2075 (if (and (equal (buffer-name) (idlwave-shell-buffer)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2076 (not select-shell)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2077 (select-window window)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2078 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2079 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2080 (defun idlwave-shell-step (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2081 "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
|
2082 (interactive "p") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2083 (or (not arg) (< arg 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2084 (setq arg 1)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2085 (idlwave-shell-send-command |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2086 (concat ".s " (if (integerp arg) (int-to-string arg) arg)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2087 nil (idlwave-shell-hide-p 'debug))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2088 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2089 (defun idlwave-shell-stepover (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2090 "Stepover one source line. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2091 If given prefix argument ARG, step ARG source lines. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2092 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
|
2093 (interactive "p") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2094 (or (not arg) (< arg 1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2095 (setq arg 1)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2096 (idlwave-shell-send-command |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2097 (concat ".so " (if (integerp arg) (int-to-string arg) arg)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2098 nil (idlwave-shell-hide-p 'debug))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2099 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2100 (defun idlwave-shell-break-here (&optional count cmd condition) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2101 "Set breakpoint at current line. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2102 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2103 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
|
2104 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
|
2105 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
|
2106 the statement count times. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2107 |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2108 Optional argument CMD is a list or function to evaluate upon reaching |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2109 the breakpoint." |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2110 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2111 (interactive "P") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2112 (when (listp count) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2113 (if (equal (car count) 4) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2114 (setq condition (read-string "Break Condition: "))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2115 (setq count nil)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2116 (idlwave-shell-set-bp |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2117 ;; Create breakpoint |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2118 (idlwave-shell-bp (idlwave-shell-current-frame) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2119 (list count cmd condition) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2120 (idlwave-shell-current-module)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2121 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2122 (defun idlwave-shell-set-bp-check (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2123 "Check for failure to set breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2124 This is run on `idlwave-shell-post-command-hook'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2125 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
|
2126 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
|
2127 ;; Scan for message |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2128 (if (and idlwave-shell-command-output |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2129 (string-match "% BREAKPOINT: *Unable to find code" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2130 idlwave-shell-command-output)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2131 ;; Offer to recompile |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2132 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2133 (if (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2134 (beep) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2135 (y-or-n-p |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2136 (concat "Okay to recompile file " |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2137 (idlwave-shell-bp-get bp 'file) " "))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2138 ;; Recompile |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2139 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2140 ;; Clean up before retrying |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2141 (idlwave-shell-command-failure) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2142 (idlwave-shell-send-command |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2143 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2144 (idlwave-shell-hide-p 'run)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2145 ;; Try setting breakpoint again |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2146 (idlwave-shell-set-bp bp)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2147 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2148 (message "Unable to set breakpoint.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2149 (idlwave-shell-command-failure) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2150 ) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2151 ;; return non-nil if no error found |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2152 nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2153 'okay)) |
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-command-failure () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2156 "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
|
2157 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
|
2158 that detects the failure of a command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2159 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
|
2160 breakpoint can not be set." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2161 ;; Clear pending commands |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2162 (setq idlwave-shell-pending-commands nil)) |
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 (defun idlwave-shell-cont () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2165 "Continue executing." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2166 (interactive) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2167 (idlwave-shell-send-command ".c" '(idlwave-shell-redisplay 'hide) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2168 (idlwave-shell-hide-p 'debug))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2169 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2170 (defun idlwave-shell-go () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2171 "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
|
2172 (interactive) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2173 (idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2174 (idlwave-shell-hide-p 'debug))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2175 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2176 (defun idlwave-shell-return () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2177 "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
|
2178 (interactive) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2179 (idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2180 (idlwave-shell-hide-p 'debug))) |
27107
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-skip () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2183 "Run .SKIP (skip one line, then step)." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2184 (interactive) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2185 (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2186 (idlwave-shell-hide-p 'debug))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2187 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2188 (defun idlwave-shell-clear-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2189 "Clear breakpoint BP. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2190 Clears in IDL and in `idlwave-shell-bp-alist'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2191 (let ((index (idlwave-shell-bp-get bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2192 (if index |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2193 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2194 (idlwave-shell-send-command |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2195 (concat "breakpoint,/clear," |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2196 (if (integerp index) (int-to-string index) index)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2197 nil (idlwave-shell-hide-p 'breakpoint)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2198 (idlwave-shell-bp-query))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2199 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2200 (defun idlwave-shell-current-frame () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2201 "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
|
2202 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
|
2203 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2204 ;; In IDL shell |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2205 (idlwave-shell-pc-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2206 ;; In source |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2207 (list (idlwave-shell-file-name (buffer-file-name)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2208 (save-restriction |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2209 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2210 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2211 (beginning-of-line) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2212 (1+ (count-lines 1 (point)))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2213 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2214 (defun idlwave-shell-current-module () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2215 "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
|
2216 Returns nil if unable to obtain a module name." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2217 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2218 ;; In IDL shell |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2219 (nth 2 idlwave-shell-halt-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2220 ;; In pro file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2221 (save-restriction |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2222 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2223 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2224 (if (idlwave-prev-index-position) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2225 (upcase (idlwave-unit-name))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2226 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2227 (defun idlwave-shell-clear-current-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2228 "Remove breakpoint at current line. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2229 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
|
2230 at a breakpoint." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2231 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2232 (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
|
2233 (if bp (idlwave-shell-clear-bp bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2234 ;; Try moving to beginning of statement |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2235 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2236 (idlwave-shell-goto-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2237 (idlwave-beginning-of-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2238 (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
|
2239 (if bp (idlwave-shell-clear-bp bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2240 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2241 (message "Cannot identify breakpoint for this line")))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2242 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2243 (defun idlwave-shell-disable-all-bp (&optional enable) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2244 "Disable all breakpoints we know about. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2245 If ENABLE is non-nil, enable them instead." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2246 (let ((bpl idlwave-shell-bp-alist)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2247 (while bpl |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2248 (idlwave-shell-send-command |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2249 (concat "breakpoint," |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2250 (if enable "/enable," "/disable," ) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2251 (idlwave-shell-bp-get (car bpl))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2252 nil (idlwave-shell-hide-p 'breakpoint)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2253 (setq bpl (cdr bpl))))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2254 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2255 (defun idlwave-shell-to-here () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2256 "Set a breakpoint with count 1 then continue." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2257 (interactive) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2258 (idlwave-shell-disable-all-bp) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2259 (idlwave-shell-break-here 1) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2260 (idlwave-shell-cont) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2261 (idlwave-shell-disable-all-bp 'enable)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2262 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2263 (defun idlwave-shell-break-in (&optional module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2264 "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
|
2265 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
|
2266 for the first line of the corresponding module." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2267 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2268 ;; get the identifier |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2269 (let (module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2270 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2271 (skip-chars-backward "a-zA-Z0-9_$") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2272 (if (looking-at idlwave-identifier) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2273 (setq module (match-string 0)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2274 (error "No identifier at point"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2275 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2276 idlwave-shell-sources-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2277 `(progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2278 (idlwave-shell-sources-filter) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2279 (idlwave-shell-set-bp-in-module ,module)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2280 'hide))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2281 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2282 (defun idlwave-shell-set-bp-in-module (module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2283 "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
|
2284 contains an entry for that module." |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2285 (let ((source-file (car-safe |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2286 (cdr-safe |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2287 (assoc (upcase module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2288 idlwave-shell-sources-alist)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2289 buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2290 (if (or (not source-file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2291 (not (file-regular-p source-file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2292 (not (setq buf |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2293 (or (idlwave-get-buffer-visiting source-file) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2294 (find-file-noselect source-file))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2295 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2296 (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
|
2297 module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2298 (beep)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2299 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2300 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2301 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2302 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2303 (let ((case-fold-search t)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2304 (if (re-search-forward |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2305 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2306 (downcase module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2307 "[ \t\n,]") nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2308 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2309 (goto-char (match-beginning 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2310 (message "Setting breakpoint for module %s" module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2311 (idlwave-shell-break-here)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2312 (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
|
2313 (beep)))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2314 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2315 (defun idlwave-shell-up () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2316 "Run to end of current block. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2317 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
|
2318 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2319 (if (idlwave-shell-pc-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2320 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2321 (idlwave-shell-goto-frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2322 ;; find end of subprogram |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2323 (let ((eos (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2324 (idlwave-beginning-of-subprogram) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2325 (idlwave-forward-block) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2326 (point)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2327 (idlwave-backward-up-block -1) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2328 ;; 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
|
2329 ;; 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
|
2330 ;; 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
|
2331 (idlwave-next-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2332 (idlwave-end-of-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2333 ;; Make sure we are not beyond subprogram |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2334 (if (< (point) eos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2335 ;; okay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2336 () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2337 ;; Move back inside subprogram |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2338 (goto-char eos) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2339 (idlwave-previous-statement)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2340 (idlwave-shell-to-here))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2341 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2342 (defun idlwave-shell-out () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2343 "Attempt to run until this procedure exits. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2344 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
|
2345 (interactive) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2346 (idlwave-shell-send-command ".o" nil (idlwave-shell-hide-p 'debug))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2347 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2348 (defun idlwave-shell-help-expression (arg) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2349 "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
|
2350 (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
|
2351 (idlwave-shell-print arg 'help)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2352 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2353 (defmacro idlwave-shell-mouse-examine (help &optional ev) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2354 "Create a function for generic examination of expressions." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2355 `(lambda (event) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2356 "Expansion function for expression examination." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2357 (interactive "e") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2358 (let ((transient-mark-mode t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2359 (zmacs-regions t) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2360 (tracker (if (featurep 'xemacs) 'mouse-track |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2361 'mouse-drag-region))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2362 (funcall tracker event) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2363 (idlwave-shell-print (if (idlwave-region-active-p) '(16) nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2364 ,help ,ev)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2365 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2366 (defun idlwave-shell-mouse-print (event) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2367 "Print value of variable at the mouse position, with `help'" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2368 (interactive "e") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2369 (funcall (idlwave-shell-mouse-examine nil) event)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2370 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2371 (defun idlwave-shell-mouse-help (event) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2372 "Print value of variable at the mouse position, with `print'." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2373 (interactive "e") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2374 (funcall (idlwave-shell-mouse-examine 'help) event)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2375 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2376 (defun idlwave-shell-examine-select (event) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2377 "Pop-up a list to select from for examining the expression" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2378 (interactive "e") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2379 (funcall (idlwave-shell-mouse-examine nil event) event)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2380 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2381 (defmacro idlwave-shell-examine (help) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2382 "Create a function for key-driven expression examination." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2383 `(lambda () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2384 (interactive) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2385 (idlwave-shell-print nil ,help))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2386 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2387 (defun idlwave-shell-define-key-both (key hook) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2388 "Define a key in both the shell and buffer mode maps." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2389 (define-key idlwave-mode-map key hook) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2390 (define-key idlwave-shell-mode-map key hook)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2391 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2392 (defvar idlwave-shell-examine-label nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2393 "Label to include with examine text if separate.") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2394 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2395 (defun idlwave-shell-print (arg &optional help ev) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2396 "Print current expression. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2397 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2398 With HELP non-nil, show help on expression. If HELP is a string, |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2399 the expression will be put in place of ___, e.g.: |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2400 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2401 print,size(___,/DIMENSIONS) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2402 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2403 Otherwise, print is called on the expression. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2404 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2405 An expression is an identifier plus 1 pair of matched parentheses |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2406 directly following the identifier - an array or function call. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2407 Alternatively, an expression is the contents of any matched |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2408 parentheses when the open parenthesis is not directly preceded by an |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2409 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
|
2410 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
|
2411 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
|
2412 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2413 With prefix arg ARG prompt for an expression. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2414 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2415 With double prefix arg, use the current region. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2416 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2417 If EV is a valid event passed, pop-up a list from |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2418 idlw-shell-examine-alist from which to select the help command text." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2419 (interactive "P") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2420 (save-excursion |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2421 (let* ((process (get-buffer-process (current-buffer))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2422 (process-mark (if process (process-mark process))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2423 (stack-label |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2424 (if (and (integerp idlwave-shell-calling-stack-index) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2425 (> idlwave-shell-calling-stack-index 0)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2426 (format " [-%d:%s]" |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2427 idlwave-shell-calling-stack-index |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2428 idlwave-shell-calling-stack-routine))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2429 expr beg end cmd examine-hook) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2430 (cond |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2431 ((and (equal arg '(16)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2432 (< (- (region-end) (region-beginning)) 2000)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2433 (setq beg (region-beginning) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2434 end (region-end))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2435 (arg |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2436 (setq expr (read-string "Expression: "))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2437 (t |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2438 (idlwave-with-special-syntax |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2439 ;; Move to beginning of current or previous expression |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2440 (if (looking-at "\\<\\|(") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2441 ;; At beginning of expression, don't move backwards unless |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2442 ;; this is at the end of an indentifier. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2443 (if (looking-at "\\>") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2444 (backward-sexp)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2445 (backward-sexp)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2446 (if (looking-at "\\>") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2447 ;; Move to beginning of identifier - must be an array or |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2448 ;; function expression. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2449 (backward-sexp)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2450 ;; Move to end of expression |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2451 (setq beg (point)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2452 (forward-sexp) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2453 (while (looking-at "\\>[[(]\\|\\.") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2454 ;; an array |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2455 (forward-sexp)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2456 (setq end (point))))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2457 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2458 ;; Get expression, but first move the begin mark if a |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2459 ;; process-mark is inside the region, to keep the overlay from |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2460 ;; wandering in the Shell. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2461 (when (and beg end) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2462 (if (and process-mark (> process-mark beg) (< process-mark end)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2463 (setq beg (marker-position process-mark))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2464 (setq expr (buffer-substring beg end))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2465 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2466 ;; Show the overlay(s) and attach any necessary hooks and filters |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2467 (when (and beg end idlwave-shell-expression-overlay) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2468 (move-overlay idlwave-shell-expression-overlay beg end |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2469 (current-buffer)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2470 (add-hook 'pre-command-hook |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2471 'idlwave-shell-delete-expression-overlay)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2472 (setq examine-hook |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2473 (if idlwave-shell-separate-examine-output |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2474 'idlwave-shell-examine-display |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2475 'idlwave-shell-examine-highlight)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2476 (add-hook 'pre-command-hook |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2477 'idlwave-shell-delete-output-overlay) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2478 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2479 ;; Remove empty or comment-only lines |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2480 (while (string-match "\n[ \t]*\\(;.*\\)?\r*\n" expr) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2481 (setq expr (replace-match "\n" t t expr))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2482 ;; Concatenate continuation lines |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2483 (while (string-match "[ \t]*\\$.*\\(;.*\\)?\\(\n[ \t]*\\|$\\)" expr) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2484 (setq expr (replace-match "" t t expr))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2485 ;; Remove final newline |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2486 (if (string-match "\n[ \t\r]*\\'" expr) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2487 (setq expr (replace-match "" t t expr))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2488 ;; Pop-up the examine selection list, if appropriate |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2489 (if (and ev idlwave-shell-examine-alist) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2490 (let* ((help-cons |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2491 (assoc |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2492 (idlwave-popup-select |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2493 ev (mapcar 'car idlwave-shell-examine-alist) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2494 "Examine with") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2495 idlwave-shell-examine-alist))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2496 (setq help (cdr help-cons)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2497 (if idlwave-shell-separate-examine-output |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2498 (setq idlwave-shell-examine-label |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2499 (concat |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2500 (format "==>%s<==\n%s:" expr (car help-cons)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2501 stack-label "\n")))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2502 (setq idlwave-shell-examine-label |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2503 (concat |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2504 (format "==>%s<==\n%s:" expr |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2505 (cond ((null help) "print") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2506 ((stringp help) help) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2507 (t (symbol-name help)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2508 stack-label "\n"))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2509 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2510 ;; Send the command |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2511 (if stack-label |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2512 (setq cmd (idlwave-retrieve-expression-from-level |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2513 expr |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2514 idlwave-shell-calling-stack-index |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2515 idlwave-shell-calling-stack-routine |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2516 help)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2517 (setq cmd (idlwave-shell-help-statement help expr))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2518 ;(idlwave-shell-recenter-shell-window) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2519 (idlwave-shell-send-command |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2520 cmd |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2521 examine-hook |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2522 (if idlwave-shell-separate-examine-output 'hide))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2523 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2524 (defvar idlwave-shell-examine-window-alist nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2525 "Variable to hold the win/height pairs for all *Examine* windows.") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2526 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2527 (defun idlwave-shell-examine-display () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2528 "View the examine command output in a separate buffer." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2529 (let (win cur-beg cur-end) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2530 (save-excursion |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2531 (set-buffer (get-buffer-create "*Examine*")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2532 (use-local-map idlwave-shell-examine-map) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2533 (setq buffer-read-only nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2534 (goto-char (point-max)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2535 (save-restriction |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2536 (narrow-to-region (point) (point)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2537 (if (string-match "^% Syntax error." idlwave-shell-command-output) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2538 (insert "% Syntax error.\n") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2539 (insert idlwave-shell-command-output) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2540 ;; Just take the last bit between the prompts (if more than one). |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2541 (let* ((end (or |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2542 (re-search-backward idlwave-shell-prompt-pattern nil t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2543 (point-max))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2544 (beg (progn |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2545 (goto-char |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2546 (or (progn (if (re-search-backward |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2547 idlwave-shell-prompt-pattern nil t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2548 (match-end 0))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2549 (point-min))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2550 (re-search-forward "\n"))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2551 (str (buffer-substring beg end))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2552 (delete-region (point-min) (point-max)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2553 (insert str) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2554 (if idlwave-shell-examine-label |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2555 (progn (goto-char (point-min)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2556 (insert idlwave-shell-examine-label) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2557 (setq idlwave-shell-examine-label nil))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2558 (setq cur-beg (point-min) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2559 cur-end (point-max)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2560 (setq buffer-read-only t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2561 (move-overlay idlwave-shell-output-overlay cur-beg cur-end |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2562 (current-buffer)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2563 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2564 ;; Look for the examine buffer in all windows. If one is |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2565 ;; found in a frame all by itself, use that, otherwise, switch |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2566 ;; to or create an examine window in this frame, and resize if |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2567 ;; it's a newly created window |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2568 (let* ((winlist (get-buffer-window-list "*Examine*" nil 'visible))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2569 (setq win (idlwave-display-buffer |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2570 "*Examine*" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2571 nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2572 (let ((list winlist) thiswin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2573 (catch 'exit |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2574 (save-selected-window |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2575 (while (setq thiswin (pop list)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2576 (select-window thiswin) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2577 (if (one-window-p) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2578 (throw 'exit (window-frame thiswin))))))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2579 (set-window-start win (point-min)) ; Ensure the point is visible. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2580 (save-selected-window |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2581 (select-window win) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2582 (let ((elt (assoc win idlwave-shell-examine-window-alist))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2583 (when (and (not (one-window-p)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2584 (or (not (memq win winlist)) ;a newly created window |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2585 (eq (window-height) (cdr elt)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2586 ;; Autosize it. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2587 (enlarge-window (- (/ (frame-height) 2) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2588 (window-height))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2589 (shrink-window-if-larger-than-buffer) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2590 ;; Clean the window list of dead windows |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2591 (setq idlwave-shell-examine-window-alist |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2592 (delq nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2593 (mapcar (lambda (x) (if (window-live-p (car x)) x)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2594 idlwave-shell-examine-window-alist))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2595 ;; And add the new value. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2596 (if (setq elt (assoc win idlwave-shell-examine-window-alist)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2597 (setcdr elt (window-height)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2598 (add-to-list 'idlwave-shell-examine-window-alist |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2599 (cons win (window-height))))))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2600 ;; Recenter for maximum output, after widened |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2601 (save-selected-window |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2602 (select-window win) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2603 (goto-char (point-max)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2604 (skip-chars-backward "\n") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2605 (recenter -1))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2606 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2607 (defvar idlwave-shell-examine-map (make-sparse-keymap)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2608 (define-key idlwave-shell-examine-map "q" 'idlwave-shell-examine-display-quit) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2609 (define-key idlwave-shell-examine-map "c" 'idlwave-shell-examine-display-clear) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2610 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2611 (defun idlwave-shell-examine-display-quit () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2612 (interactive) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2613 (let ((win (selected-window))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2614 (if (one-window-p) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2615 (delete-frame (window-frame win)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2616 (delete-window win)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2617 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2618 (defun idlwave-shell-examine-display-clear () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2619 (interactive) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2620 (save-excursion |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2621 (let ((buf (get-buffer "*Examine*"))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2622 (when (bufferp buf) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2623 (set-buffer buf) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2624 (setq buffer-read-only nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2625 (erase-buffer) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2626 (setq buffer-read-only t))))) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2627 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2628 (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
|
2629 "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
|
2630 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2631 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
|
2632 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
|
2633 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
|
2634 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
|
2635 *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
|
2636 level. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2637 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2638 Since this function depends upon the undocumented IDL routine routine_names, |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2639 there is no guarantee that this will work with future versions of IDL." |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2640 (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
|
2641 (fetch (- 0 level)) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2642 (start 0) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2643 var tvar fetch-vars pre post) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2644 |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2645 ;; FIXME: In the following we try to find the variables in expression |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2646 ;; This is quite empirical - I don't know in what situations this will |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2647 ;; break. We will look for identifiers and exclude cases where we |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2648 ;; know it is not a variable. To distinguish array references from |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2649 ;; function calls, we require that arrays use [] instead of () |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2650 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2651 (while (string-match |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2652 "\\(\\`\\|[^a-zA-Z0-9$_]\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([^a-zA-Z0-9$_]\\|\\'\\)" expr start) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2653 (setq var (match-string 2 expr) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2654 tvar (concat prefix var) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2655 start (match-beginning 2) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2656 pre (substring expr 0 (match-beginning 2)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2657 post (substring expr (match-end 2))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2658 (cond |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2659 ;; Exclude identifiers which are not variables |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2660 ((string-match ",[ \t]*/\\'" pre)) ;; a `/' KEYWORD |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2661 ((and (string-match "[,(][ \t]*\\'" pre) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2662 (string-match "\\`[ \t]*=" post))) ;; a `=' KEYWORD |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2663 ((string-match "\\`(" post)) ;; a function |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2664 ((string-match "->[ \t]*\\'" pre)) ;; a method |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2665 ((string-match "\\.\\'" pre)) ;; structure member |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2666 (t ;; seems to be a variable - arrange to get it and replace |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2667 ;; its name in the expression with the temproary name. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2668 (push (cons var tvar) fetch-vars) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2669 (setq expr (concat pre tvar post)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2670 (if (= start 0) (setq start 1))) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2671 ;; 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
|
2672 ;; and then prints the expression. |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2673 (concat |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2674 (mapconcat |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2675 (lambda (x) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2676 (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
|
2677 (nreverse fetch-vars) |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2678 " & ") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2679 "\n" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2680 (idlwave-shell-help-statement help expr) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2681 (format " ; [-%d:%s]" level routine)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2682 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2683 (defun idlwave-shell-help-statement (help expr) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2684 "Construct a help statement for printing expression EXPR. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2685 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2686 HELP can be non-nil for `help,', nil for 'print,' or any string into which |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2687 to insert expression in place of the marker ___, e.g.: print, |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2688 size(___,/DIMENSIONS)" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2689 (cond |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2690 ((null help) (concat "print, " expr)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2691 ((stringp help) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2692 (if (string-match "\\(^\\|[^_]\\)\\(___\\)\\([^_]\\|$\\)" help) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2693 (concat (substring help 0 (match-beginning 2)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2694 expr |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2695 (substring help (match-end 2))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2696 (t (concat "help, " expr)))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2697 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2698 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2699 (defun idlwave-shell-examine-highlight () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2700 "Highlight the most recent IDL output." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2701 (let* ((buffer (get-buffer (idlwave-shell-buffer))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2702 (process (get-buffer-process buffer)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2703 (process-mark (if process (process-mark process))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2704 output-begin output-end) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2705 (save-excursion |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2706 (set-buffer buffer) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2707 (goto-char process-mark) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2708 (beginning-of-line) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2709 (setq output-end (point)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2710 (re-search-backward idlwave-shell-prompt-pattern nil t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2711 (beginning-of-line 2) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2712 (setq output-begin (point))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2713 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2714 ;; First make sure the shell window is visible |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2715 (idlwave-display-buffer (idlwave-shell-buffer) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2716 nil (idlwave-shell-shell-frame)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2717 (if (and idlwave-shell-output-overlay process-mark) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2718 (move-overlay idlwave-shell-output-overlay |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2719 output-begin output-end buffer)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2720 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2721 (defun idlwave-shell-delete-output-overlay () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2722 (if (eq this-command 'idlwave-shell-mouse-nop) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2723 nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2724 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2725 (if idlwave-shell-output-overlay |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2726 (delete-overlay idlwave-shell-output-overlay)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2727 (error nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2728 (remove-hook 'pre-command-hook 'idlwave-shell-delete-output-overlay))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2729 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2730 (defun idlwave-shell-delete-expression-overlay () |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2731 (if (eq this-command 'idlwave-shell-mouse-nop) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2732 nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2733 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2734 (if idlwave-shell-expression-overlay |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2735 (delete-overlay idlwave-shell-expression-overlay)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2736 (error nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2737 (remove-hook 'pre-command-hook 'idlwave-shell-delete-expression-overlay))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2738 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2739 (defvar idlwave-shell-bp-alist nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2740 "Alist of breakpoints. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2741 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
|
2742 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2743 The car is the frame for the breakpoint: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2744 file - full path file name. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2745 line - line number of breakpoint - integer. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2746 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2747 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
|
2748 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
|
2749 module - the module for breakpoint internal to IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2750 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2751 Remaining elements of the cdr: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2752 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
|
2753 contains two items: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2754 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2755 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
|
2756 the breakpoint is cleared and removed from the alist. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2757 command - command to execute when breakpoint is reached, either a |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2758 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
|
2759 list to be evaluated with `eval'.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2760 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2761 (defun idlwave-shell-run-region (beg end &optional n) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2762 "Compile and run the region using the IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2763 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
|
2764 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
|
2765 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
|
2766 problem with begin-end blocks extending over multiple |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2767 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
|
2768 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
|
2769 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2770 If there is a prefix argument, display IDL process." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2771 (interactive "r\nP") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2772 (let ((oldbuf (current-buffer))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2773 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2774 (set-buffer (idlwave-find-file-noselect |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2775 (idlwave-shell-temp-file 'pro) 'tmp)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2776 (set (make-local-variable 'comment-start-skip) ";+[ \t]*") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2777 (set (make-local-variable 'comment-start) ";") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2778 (erase-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2779 (insert-buffer-substring oldbuf beg end) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2780 (if (not (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2781 (idlwave-previous-statement) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2782 (idlwave-look-at "\\<end\\>"))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2783 (insert "\nend\n")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2784 (save-buffer 0))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2785 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2786 nil (idlwave-shell-hide-p 'run)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2787 (if n |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2788 (idlwave-display-buffer (idlwave-shell-buffer) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2789 nil (idlwave-shell-shell-frame)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2790 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2791 (defun idlwave-shell-evaluate-region (beg end &optional n) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2792 "Send region to the IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2793 If there is a prefix argument, display IDL process. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2794 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
|
2795 `idlwave-shell-run-region' for this." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2796 (interactive "r\nP") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2797 (idlwave-shell-send-command (buffer-substring beg end)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2798 (if n |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2799 (idlwave-display-buffer (idlwave-shell-buffer) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2800 nil (idlwave-shell-shell-frame)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2801 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2802 (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
|
2803 "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
|
2804 (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
|
2805 (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
|
2806 (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
|
2807 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
|
2808 (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
|
2809 (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
|
2810 (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
|
2811 (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
|
2812 (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
|
2813 (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
|
2814 (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
|
2815 (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
|
2816 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2817 (defun idlwave-display-buffer (buf not-this-window-p &optional frame) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2818 (if (featurep 'xemacs) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2819 ;; The XEmacs version enforces the frame |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2820 (display-buffer buf not-this-window-p frame) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2821 ;; For Emacs, we need to force the frame ourselves. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2822 (let ((this-frame (selected-frame))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2823 (if (frame-live-p frame) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2824 (select-frame frame)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2825 (if (eq this-frame (selected-frame)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2826 ;; same frame: use display buffer, to make sure the current |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2827 ;; window stays. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2828 (display-buffer buf) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2829 ;; different frame |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2830 (if (one-window-p) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2831 ;; only window: switch |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2832 (progn |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2833 (switch-to-buffer buf) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2834 (selected-window)) ; must return the window. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2835 ;; several windows - use display-buffer |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2836 (display-buffer buf not-this-window-p)))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2837 ; (if (not (frame-live-p frame)) (setq frame nil)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2838 ; (display-buffer buf not-this-window-p frame)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2839 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2840 (defvar idlwave-shell-bp-buffer " *idlwave-shell-bp*" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2841 "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
|
2842 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2843 (defun idlwave-shell-bp-query () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2844 "Reconcile idlwave-shell's breakpoint list with IDL's. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2845 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
|
2846 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2847 (idlwave-shell-send-command idlwave-shell-bp-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2848 'idlwave-shell-filter-bp |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2849 'hide)) |
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 (defun idlwave-shell-bp-get (bp &optional item) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2852 "Get a value for a breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2853 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
|
2854 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
|
2855 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
|
2856 'data returns a list of 'count and 'cmd. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2857 Defaults to 'index." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2858 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2859 ;; Frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2860 ((eq item 'line) (nth 1 (car bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2861 ((eq item 'file) (nth 0 (car bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2862 ;; idlwave-shell breakpoint data |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2863 ((eq item 'data) (cdr (cdr bp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2864 ((eq item 'count) (nth 0 (cdr (cdr bp)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2865 ((eq item 'cmd) (nth 1 (cdr (cdr bp)))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2866 ((eq item 'condition) (nth 2 (cdr (cdr bp)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2867 ;; IDL breakpoint info |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2868 ((eq item 'module) (nth 1 (car (cdr bp)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2869 ;; index - default |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2870 (t (nth 0 (car (cdr bp)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2871 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2872 (defun idlwave-shell-filter-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2873 "Get the breakpoints from `idlwave-shell-command-output'. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2874 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
|
2875 from previous breakpoint list." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2876 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2877 (set-buffer (get-buffer-create idlwave-shell-bp-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2878 (erase-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2879 (insert idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2880 (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
|
2881 (let ((old-bp-alist idlwave-shell-bp-alist) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2882 ;; Searching the breakpoints |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2883 ;; In IDL 5.5, the breakpoint reporting format changed. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2884 (bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2885 (bp-re55 "^\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\(Uncompiled\\|Func=\\|Pro=\\)\\([a-zA-Z][a-zA-Z0-9$_:]*\\)\\(,[^\n]*\n\\)?\\s-+\\(\\S-+\\)") |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2886 file line index module |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2887 bp-re indmap) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2888 (setq idlwave-shell-bp-alist (list nil)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2889 ;; Search for either header type, and set the correct regexp |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2890 (when (or |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2891 (if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2892 (setq bp-re bp-re54 ; versions <= 5.4 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2893 indmap '(1 2 3 4))) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2894 (if (re-search-forward |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2895 "^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2896 (setq bp-re bp-re55 ; versions >= 5.5 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2897 indmap '(1 4 2 6)))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2898 ;; 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
|
2899 ;; Parse breakpoint lines. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2900 ;; Breakpoints have the form |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2901 ;; for IDL<=v5.4: |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2902 ;; Index Module Line File |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2903 ;; All separated by whitespace. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2904 ;; Module may be missing if the file is not compiled. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2905 ;; for IDL>=v5.5: |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2906 ;; Index Line Attributes File |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2907 ;; (attributes replaces module, "Uncompiled" included) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2908 (while (re-search-forward bp-re nil t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2909 (setq index (match-string (nth 0 indmap)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2910 module (match-string (nth 1 indmap)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2911 line (string-to-int (match-string (nth 2 indmap))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2912 file (idlwave-shell-file-name (match-string (nth 3 indmap)))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2913 ;; 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
|
2914 (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
|
2915 (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
|
2916 (list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
2917 (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
|
2918 ;; 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
|
2919 nil nil)))))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2920 (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
|
2921 ;; Update count, commands of breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2922 (mapcar 'idlwave-shell-update-bp old-bp-alist))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2923 ;; Update the breakpoint overlays |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2924 (idlwave-shell-update-bp-overlays) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2925 ;; Return the new list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2926 idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2927 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2928 (defun idlwave-shell-update-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2929 "Update BP data in breakpoint list. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2930 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
|
2931 (let ((match (assoc (car bp) idlwave-shell-bp-alist))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2932 (if match (setcdr (cdr match) (cdr (cdr bp)))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2933 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2934 (defun idlwave-shell-set-bp-data (bp data) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2935 "Set the data of BP to DATA." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2936 (setcdr (cdr bp) data)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2937 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2938 (defun idlwave-shell-bp (frame &optional data module) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2939 "Create a breakpoint structure containing FRAME and DATA. Second |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2940 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
|
2941 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
|
2942 attempting match a breakpoint in `idlwave-shell-bp-alist'." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2943 (cons frame (cons (list nil module) data))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2944 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2945 (defvar idlwave-shell-old-bp nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2946 "List of breakpoints previous to setting a new breakpoint.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2947 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2948 (defun idlwave-shell-sources-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2949 "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
|
2950 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
|
2951 Otherwise return the filename in bp." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2952 (let* |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2953 ((bp-file (idlwave-shell-bp-get bp 'file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2954 (bp-module (idlwave-shell-bp-get bp 'module)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2955 (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
|
2956 (if (and internal-file-list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2957 (equal bp-file (nth 0 internal-file-list))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2958 (nth 1 internal-file-list) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2959 bp-file))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2960 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2961 (defun idlwave-shell-set-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2962 "Try to set a breakpoint BP. |
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 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
|
2965 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
|
2966 a statement. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
2967 Determines IDL's internal representation for the breakpoint which may |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2968 have occurred at a different line then used with the breakpoint |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2969 command." |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2970 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2971 ;; Get and save the old breakpoints |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2972 (idlwave-shell-send-command |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2973 idlwave-shell-bp-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2974 '(progn |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2975 (idlwave-shell-filter-bp) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2976 (setq idlwave-shell-old-bp idlwave-shell-bp-alist)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2977 'hide) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2978 ;; Get sources for IDL compiled procedures followed by setting |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2979 ;; breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2980 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2981 idlwave-shell-sources-query |
41608
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
2982 `(progn |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2983 (idlwave-shell-sources-filter) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
2984 (idlwave-shell-set-bp2 (quote ,bp))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2985 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2986 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2987 (defun idlwave-shell-set-bp2 (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2988 "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
|
2989 Use the count argument with IDLs breakpoint command. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
2990 We treat a count of 1 as a temporary breakpoint. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2991 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
|
2992 only after reaching the statement count times." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2993 (let* |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2994 ((arg (idlwave-shell-bp-get bp 'count)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
2995 (key (cond |
41608
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
2996 ((not (and arg (numberp arg))) "") |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
2997 ((= arg 1) |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
2998 ",/once") |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
2999 ((> arg 1) |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
3000 (format ",after=%d" arg)))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3001 (condition (idlwave-shell-bp-get bp 'condition)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3002 (key (concat key |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3003 (if condition (concat ",CONDITION=\"" condition "\"")))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3004 (line (idlwave-shell-bp-get bp 'line))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3005 (idlwave-shell-send-command |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3006 (concat "breakpoint,'" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3007 (idlwave-shell-sources-bp bp) "'," |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3008 (if (integerp line) (setq line (int-to-string line))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3009 key) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3010 ;; Check for failure and look for breakpoint in IDL's list |
41608
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
3011 `(progn |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
3012 (if (idlwave-shell-set-bp-check (quote ,bp)) |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
3013 (idlwave-shell-set-bp3 (quote ,bp)))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3014 ;; hide output? |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3015 (idlwave-shell-hide-p 'breakpoint) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3016 'preempt))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3017 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3018 (defun idlwave-shell-set-bp3 (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3019 "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
|
3020 (idlwave-shell-send-command idlwave-shell-bp-query |
41608
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
3021 `(progn |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
3022 (idlwave-shell-filter-bp) |
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
3023 (idlwave-shell-new-bp (quote ,bp))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3024 'hide |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3025 'preempt)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3026 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3027 (defun idlwave-shell-find-bp (frame) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3028 "Return breakpoint from `idlwave-shell-bp-alist' for frame. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3029 Returns nil if frame not found." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3030 (assoc frame idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3031 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3032 (defun idlwave-shell-new-bp (bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3033 "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
|
3034 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
|
3035 the line number used with the IDL breakpoint command. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3036 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
|
3037 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
|
3038 (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
|
3039 (bpl idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3040 (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
|
3041 (setq bpl (cdr bpl)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3042 (if (and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3043 (not bpl) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3044 ;; No additional breakpoint. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3045 ;; 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
|
3046 (setq bpl (assoc (car bp) idlwave-shell-bp-alist))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3047 (setq bpl (list bpl))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3048 (if (and bpl |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3049 (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
|
3050 (idlwave-shell-bp-get bp 'file))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3051 ;; Got the breakpoint - add count, command to it. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3052 ;; 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
|
3053 ;; not done for bpl. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3054 (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
|
3055 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3056 (message "Failed to identify breakpoint in IDL")))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3057 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3058 (defvar idlwave-shell-bp-overlays nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3059 "List of overlays marking breakpoints") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3060 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3061 (defun idlwave-shell-update-bp-overlays () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3062 "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
|
3063 Existing overlays are recycled, in order to minimize consumption." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3064 (when idlwave-shell-mark-breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3065 (let ((bp-list idlwave-shell-bp-alist) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3066 (ov-list idlwave-shell-bp-overlays) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3067 ov bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3068 ;; Delete the old overlays from their buffers |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3069 (while (setq ov (pop ov-list)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3070 (delete-overlay ov)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3071 (setq ov-list idlwave-shell-bp-overlays |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3072 idlwave-shell-bp-overlays nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3073 (while (setq bp (pop bp-list)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3074 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3075 (idlwave-shell-goto-frame (car bp)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3076 (let* ((end (progn (end-of-line 1) (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3077 (beg (progn (beginning-of-line 1) (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3078 (ov (or (pop ov-list) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3079 (idlwave-shell-make-new-bp-overlay)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3080 (move-overlay ov beg end) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3081 (push ov idlwave-shell-bp-overlays))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3082 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3083 (defvar idlwave-shell-bp-glyph) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3084 (defun idlwave-shell-make-new-bp-overlay () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3085 "Make a new overlay for highlighting breakpoints. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3086 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
|
3087 (let ((ov (make-overlay 1 1))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3088 (if (featurep 'xemacs) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3089 ;; This is XEmacs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3090 (progn |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3091 (cond |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3092 ((eq (console-type) 'tty) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3093 ;; 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
|
3094 (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
|
3095 ((and (memq idlwave-shell-mark-breakpoints '(t glyph)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3096 idlwave-shell-bp-glyph) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3097 ;; use the glyph |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3098 (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
|
3099 (idlwave-shell-mark-breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3100 ;; 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
|
3101 (set-extent-property ov 'face idlwave-shell-breakpoint-face)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3102 (t |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3103 ;; no marking |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3104 nil)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3105 (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
|
3106 ;; This is Emacs |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3107 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3108 (window-system |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3109 (if (and (memq idlwave-shell-mark-breakpoints '(t glyph)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3110 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
|
3111 ;; use a glyph |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3112 (let ((string "@")) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3113 (put-text-property 0 1 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3114 'display idlwave-shell-bp-glyph |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3115 string) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3116 (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
|
3117 (overlay-put ov 'face idlwave-shell-breakpoint-face))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3118 (idlwave-shell-mark-breakpoints |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3119 ;; 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
|
3120 (overlay-put ov 'face idlwave-shell-breakpoint-face)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3121 (t |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3122 ;; No marking |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3123 nil))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3124 ov)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3125 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3126 (defun idlwave-shell-edit-default-command-line (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3127 "Edit the current execute command." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3128 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3129 (setq idlwave-shell-command-line-to-execute |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3130 (read-string "IDL> " idlwave-shell-command-line-to-execute))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3131 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3132 (defun idlwave-shell-execute-default-command-line (arg) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3133 "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
|
3134 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
|
3135 `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
|
3136 (interactive "P") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3137 (if (or (not idlwave-shell-command-line-to-execute) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3138 arg) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3139 (setq idlwave-shell-command-line-to-execute |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3140 (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
|
3141 (idlwave-shell-reset 'hidden) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3142 (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
|
3143 '(idlwave-shell-redisplay 'hide))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3144 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3145 (defun idlwave-shell-save-and-run () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3146 "Save file and run it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3147 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
|
3148 When called from the shell buffer, re-run the file which was last handled by |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3149 one of the save-and-.. commands." |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3150 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3151 (idlwave-shell-save-and-action 'run)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3152 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3153 (defun idlwave-shell-save-and-compile () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3154 "Save file and run it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3155 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
|
3156 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
|
3157 one of the save-and-.. commands." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3158 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3159 (idlwave-shell-save-and-action 'compile)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3160 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3161 (defun idlwave-shell-save-and-batch () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3162 "Save file and batch it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3163 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
|
3164 When called from the shell buffer, re-batch the file which was last handled by |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3165 one of the save-and-.. commands." |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3166 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3167 (idlwave-shell-save-and-action 'batch)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3168 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3169 (defun idlwave-shell-save-and-action (action) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3170 "Save file and compile it in IDL. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3171 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
|
3172 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
|
3173 handled by this command." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3174 ;; Remove the stop overlay. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3175 (if idlwave-shell-stop-line-overlay |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3176 (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
|
3177 (setq idlwave-shell-is-stopped nil) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3178 (setq overlay-arrow-string nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3179 (let (buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3180 (cond |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3181 ((eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3182 (save-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3183 (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
|
3184 (idlwave-shell-last-save-and-action-file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3185 (if (setq buf (idlwave-get-buffer-visiting |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3186 idlwave-shell-last-save-and-action-file)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3187 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3188 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3189 (save-buffer)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3190 (t (setq idlwave-shell-last-save-and-action-file |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3191 (read-file-name "File: "))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3192 (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
|
3193 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3194 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3195 (concat (cond ((eq action 'run) ".run ") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3196 ((eq action 'compile) ".compile ") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3197 ((eq action 'batch) "@") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3198 (t (error "Unknown action %s" action))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3199 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
|
3200 'idlwave-shell-maybe-update-routine-info |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3201 (idlwave-shell-hide-p 'run)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3202 (idlwave-shell-bp-query)) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3203 (let ((msg (format "No such file %s" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3204 idlwave-shell-last-save-and-action-file))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3205 (setq idlwave-shell-last-save-and-action-file nil) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3206 (error msg)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3207 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3208 (defun idlwave-shell-maybe-update-routine-info (&optional wait) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3209 "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
|
3210 (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
|
3211 (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
|
3212 (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
|
3213 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
|
3214 idlwave-routines) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3215 (idlwave-shell-update-routine-info t nil 'wait))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3216 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3217 (defvar idlwave-shell-sources-query "help,/source,/full" |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3218 "IDL command to obtain source files for compiled procedures.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3219 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3220 (defvar idlwave-shell-sources-alist nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3221 "Alist of IDL procedure names and compiled source files. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3222 Elements of the alist have the form: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3223 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3224 (module name . (source-file-truename idlwave-internal-filename)).") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3225 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3226 (defun idlwave-shell-sources-query () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3227 "Determine source files for IDL compiled procedures. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3228 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
|
3229 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3230 (idlwave-shell-send-command idlwave-shell-sources-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3231 'idlwave-shell-sources-filter |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3232 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3233 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3234 (defun idlwave-shell-sources-filter () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3235 "Get source files from `idlwave-shell-sources-query' output. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3236 Create `idlwave-shell-sources-alist' consisting of |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3237 list elements of the form: |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3238 (module name . (source-file-truename idlwave-internal-filename))." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3239 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3240 (set-buffer (get-buffer-create idlwave-shell-bp-buffer)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3241 (erase-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3242 (insert idlwave-shell-command-output) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3243 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3244 (let (cpro cfun) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3245 (if (re-search-forward "Compiled Procedures:" nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3246 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3247 (forward-line) ; Skip $MAIN$ |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3248 (setq cpro (point)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3249 (if (re-search-forward "Compiled Functions:" nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3250 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3251 (setq cfun (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3252 (setq idlwave-shell-sources-alist |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3253 (append |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3254 ;; compiled procedures |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3255 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3256 (beginning-of-line) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3257 (narrow-to-region cpro (point)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3258 (goto-char (point-min)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3259 (idlwave-shell-sources-grep)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3260 ;; compiled functions |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3261 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3262 (widen) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3263 (goto-char cfun) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3264 (idlwave-shell-sources-grep))))))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3265 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3266 (defun idlwave-shell-sources-grep () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3267 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3268 (let ((al (list nil))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3269 (while (and |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3270 (not (progn (forward-line) (eobp))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3271 (re-search-forward |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3272 "\\s-*\\(\\S-+\\)\\s-+\\(\\S-+\\)" nil t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3273 (nconc al |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3274 (list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3275 (cons |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3276 (buffer-substring ; name |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3277 (match-beginning 1) (match-end 1)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3278 (let ((internal-filename |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3279 (buffer-substring ; source |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3280 (match-beginning 2) (match-end 2)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3281 (list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3282 (idlwave-shell-file-name internal-filename) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3283 internal-filename)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3284 )))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3285 (cdr al)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3286 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3287 (defun idlwave-shell-clear-all-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3288 "Remove all breakpoints in IDL." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3289 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3290 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3291 idlwave-shell-bp-query |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3292 '(progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3293 (idlwave-shell-filter-bp) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3294 (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3295 'hide)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3296 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3297 (defun idlwave-shell-list-all-bp () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3298 "List all breakpoints in IDL." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3299 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3300 (idlwave-shell-send-command |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3301 idlwave-shell-bp-query)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3302 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3303 (defvar idlwave-shell-error-last 0 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3304 "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
|
3305 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3306 (defun idlwave-shell-goto-next-error () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3307 "Move point to next IDL syntax error." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3308 (interactive) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3309 (let (frame col) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3310 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3311 (set-buffer idlwave-shell-error-buffer) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3312 (goto-char idlwave-shell-error-last) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3313 (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
|
3314 (re-search-forward idlwave-shell-other-error nil t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3315 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3316 (setq frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3317 (list |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3318 (save-match-data |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3319 (idlwave-shell-file-name |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3320 (buffer-substring (match-beginning 1) (match-end 1)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3321 (string-to-int |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3322 (buffer-substring (match-beginning 2) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3323 (match-end 2))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3324 ;; Try to find the column of the error |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3325 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3326 (setq col |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3327 (if (re-search-backward "\\^" nil t) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3328 (current-column) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3329 0))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3330 (setq idlwave-shell-error-last (point))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3331 (if frame |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3332 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3333 (idlwave-shell-display-line frame col)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3334 (beep) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3335 (message "No more errors.")))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3336 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3337 (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
|
3338 "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
|
3339 Otherwise, just expand the file name." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3340 (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
|
3341 default-directory |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3342 idlwave-shell-default-directory))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3343 (if idlwave-shell-use-truename |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3344 (file-truename name def-dir) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3345 (expand-file-name name def-dir)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3346 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3347 ;; Keybindings -------------------------------------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3348 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3349 (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
|
3350 "Keymap for idlwave-mode.") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3351 (defvar idlwave-shell-mode-prefix-map (make-sparse-keymap)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3352 (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
|
3353 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3354 ;(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
|
3355 ;(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
|
3356 (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
|
3357 (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
|
3358 (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
|
3359 (define-key idlwave-shell-mode-map "\C-c?" 'idlwave-routine-info) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3360 (define-key idlwave-shell-mode-map "\C-g" 'idlwave-keyboard-quit) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3361 (define-key idlwave-shell-mode-map "\M-?" 'idlwave-context-help) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47262
diff
changeset
|
3362 (define-key idlwave-shell-mode-map [(control meta ?\?)] 'idlwave-online-help) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3363 (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
|
3364 (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
|
3365 (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
|
3366 (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
|
3367 (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
|
3368 (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
|
3369 (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
|
3370 'idlwave-shell-debug-map) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3371 (define-key idlwave-shell-mode-map [(up)] 'idlwave-shell-up-or-history) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3372 (define-key idlwave-shell-mode-map [(down)] 'idlwave-shell-down-or-history) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3373 (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
|
3374 (define-key idlwave-mode-map "\C-c\C-x" 'idlwave-shell-send-char) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3375 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3376 ;; The mouse bindings for PRINT and HELP |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3377 (idlwave-shell-define-key-both |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3378 (if (featurep 'xemacs) |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3379 [(shift button2)] |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3380 [(shift down-mouse-2)]) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3381 'idlwave-shell-mouse-print) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3382 (idlwave-shell-define-key-both |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3383 (if (featurep 'xemacs) |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3384 [(control meta button2)] |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3385 [(control meta down-mouse-2)]) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3386 'idlwave-shell-mouse-help) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3387 (idlwave-shell-define-key-both |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3388 (if (featurep 'xemacs) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3389 [(control shift button2)] |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3390 [(control shift down-mouse-2)]) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3391 'idlwave-shell-examine-select) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3392 ;; Add this one from the idlwave-mode-map |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3393 (define-key idlwave-shell-mode-map |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3394 (if (featurep 'xemacs) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3395 [(shift button3)] |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3396 [(shift mouse-3)]) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3397 '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
|
3398 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3399 ;; For Emacs, we need to turn off the button release events. |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3400 (defun idlwave-shell-mouse-nop (event) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3401 (interactive "e")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3402 (unless (featurep 'xemacs) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3403 (idlwave-shell-define-key-both |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3404 [(shift mouse-2)] 'idlwave-shell-mouse-nop) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3405 (idlwave-shell-define-key-both |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3406 [(shift control mouse-2)] 'idlwave-shell-mouse-nop) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3407 (idlwave-shell-define-key-both |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3408 [(control meta mouse-2)] 'idlwave-shell-mouse-nop)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3409 |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3410 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3411 ;; 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
|
3412 ;; 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
|
3413 ;; in the list gets bound the C-c C-d prefix map. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3414 ;; If `idlwave-shell-debug-modifiers' is non-nil, the second key |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3415 ;; in the list gets bound with the specified modifiers in both |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3416 ;; `idlwave-mode-map' and `idlwave-shell-mode-map'. |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3417 |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3418 ;; Used keys: abcdef hi klmnopqrs u wxyz |
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3419 ;; Unused keys: g j t v |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3420 (let* ((specs |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3421 '(([(control ?b)] ?b idlwave-shell-break-here) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3422 ([(control ?i)] ?i idlwave-shell-break-in) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3423 ([(control ?d)] ?d idlwave-shell-clear-current-bp) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3424 ([(control ?a)] ?a idlwave-shell-clear-all-bp) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3425 ([(control ?s)] ?s idlwave-shell-step) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3426 ([(control ?n)] ?n idlwave-shell-stepover) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3427 ([(control ?k)] ?k idlwave-shell-skip) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3428 ([(control ?u)] ?u idlwave-shell-up) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3429 ([(control ?o)] ?o idlwave-shell-out) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3430 ([(control ?m)] ?m idlwave-shell-return) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3431 ([(control ?h)] ?h idlwave-shell-to-here) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3432 ([(control ?r)] ?r idlwave-shell-cont) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3433 ([(control ?y)] ?y idlwave-shell-execute-default-command-line) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3434 ([(control ?z)] ?z idlwave-shell-reset) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3435 ([(control ?q)] ?q idlwave-shell-quit) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3436 ([(control ?p)] ?p idlwave-shell-print) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3437 ([(??)] ?? idlwave-shell-help-expression) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3438 ([(control ?c)] ?c idlwave-shell-save-and-run) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3439 ([( ?@)] ?@ idlwave-shell-save-and-batch) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3440 ([(control ?x)] ?x idlwave-shell-goto-next-error) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3441 ([(control ?e)] ?e idlwave-shell-run-region) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3442 ([(control ?w)] ?w idlwave-shell-resync-dirs) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3443 ([(control ?l)] ?l idlwave-shell-redisplay) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3444 ([(control ?t)] ?t idlwave-shell-toggle-toolbar) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3445 ([(control up)] up idlwave-shell-stack-up) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3446 ([(control down)] down idlwave-shell-stack-down) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3447 ([(control ?f)] ?f idlwave-shell-window))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3448 (mod (cond ((and idlwave-shell-debug-modifiers |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3449 (listp idlwave-shell-debug-modifiers) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3450 (not (equal '() idlwave-shell-debug-modifiers))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3451 idlwave-shell-debug-modifiers) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3452 (idlwave-shell-activate-alt-keybindings |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3453 '(alt)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3454 (shift (memq 'shift mod)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3455 (mod-noshift (delete 'shift (copy-sequence mod))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3456 s k1 c2 k2 cmd) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3457 (while (setq s (pop specs)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3458 (setq k1 (nth 0 s) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3459 c2 (nth 1 s) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3460 cmd (nth 2 s)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3461 (when idlwave-shell-activate-prefix-keybindings |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3462 (and k1 (define-key idlwave-shell-mode-prefix-map k1 cmd))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3463 (when (and mod window-system) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3464 (if (char-or-string-p c2) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3465 (setq k2 (vector (append mod-noshift |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3466 (list (if shift (upcase c2) c2))))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3467 (setq k2 (vector (append mod (list c2))))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3468 (define-key idlwave-mode-map k2 cmd) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3469 (define-key idlwave-shell-mode-map k2 cmd)))) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3470 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3471 ;; Enter the prefix map at the two places. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3472 (fset 'idlwave-debug-map idlwave-shell-mode-prefix-map) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3473 (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
|
3474 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3475 ;; The Menus -------------------------------------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3476 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3477 (defvar idlwave-shell-menu-def |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3478 '("Debug" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3479 ["Save and .RUN" idlwave-shell-save-and-run |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3480 (or (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3481 idlwave-shell-last-save-and-action-file)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3482 ["Save and .COMPILE" idlwave-shell-save-and-compile |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3483 (or (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3484 idlwave-shell-last-save-and-action-file)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3485 ["Save and @Batch" idlwave-shell-save-and-batch |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3486 (or (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3487 idlwave-shell-last-save-and-action-file)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3488 ["Goto Next Error" idlwave-shell-goto-next-error t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3489 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3490 ["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
|
3491 ["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
|
3492 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3493 ["Set Breakpoint" idlwave-shell-break-here |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3494 (eq major-mode 'idlwave-mode)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3495 ["Break in Module" idlwave-shell-break-in t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3496 ["Clear Breakpoint" idlwave-shell-clear-current-bp t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3497 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3498 ["List All Breakpoints" idlwave-shell-list-all-bp t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3499 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3500 ["Step (into)" idlwave-shell-step t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3501 ["Step (over)" idlwave-shell-stepover t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3502 ["Skip One Statement" idlwave-shell-skip t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3503 ["Continue" idlwave-shell-cont t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3504 ("Continue to" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3505 ["End of Block" idlwave-shell-up t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3506 ["End of Subprog" idlwave-shell-return t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3507 ["End of Subprog+1" idlwave-shell-out t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3508 ["Here (Cursor Line)" idlwave-shell-to-here |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3509 (eq major-mode 'idlwave-mode)]) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3510 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3511 ["Print expression" idlwave-shell-print t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3512 ["Help on expression" idlwave-shell-help-expression t] |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3513 ["Evaluate Region" idlwave-shell-evaluate-region |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3514 (eq major-mode 'idlwave-mode)] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3515 ["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
|
3516 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3517 ["Redisplay" idlwave-shell-redisplay t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3518 ["Stack Up" idlwave-shell-stack-up t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3519 ["Stack Down" idlwave-shell-stack-down t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3520 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3521 ["Update Working Dir" idlwave-shell-resync-dirs t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3522 ["Reset IDL" idlwave-shell-reset t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3523 "--" |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3524 ["Toggle Toolbar" idlwave-shell-toggle-toolbar t] |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3525 ["Exit IDL" idlwave-shell-quit t])) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3526 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3527 (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
|
3528 '("Debug" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3529 ("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
|
3530 ["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
|
3531 (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
|
3532 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
|
3533 ["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
|
3534 (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
|
3535 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
|
3536 ["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
|
3537 (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
|
3538 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
|
3539 ["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
|
3540 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3541 ["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
|
3542 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3543 ["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
|
3544 ["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
|
3545 ("Breakpoints" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3546 ["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
|
3547 (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
|
3548 ["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
|
3549 ["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
|
3550 ["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
|
3551 ["List All Breakpoints" idlwave-shell-list-all-bp t]) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3552 ("Continue/Step" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3553 ["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
|
3554 ["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
|
3555 ["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
|
3556 ["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
|
3557 ["... 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
|
3558 ["... 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
|
3559 ["... 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
|
3560 ["... 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
|
3561 (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
|
3562 ("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
|
3563 ["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
|
3564 ["Help on expression" idlwave-shell-help-expression t] |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3565 ["Evaluate Region" idlwave-shell-evaluate-region |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3566 (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
|
3567 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3568 ["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
|
3569 ["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
|
3570 ["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
|
3571 ("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
|
3572 ["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
|
3573 ["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
|
3574 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3575 ["Use Input Mode Magic" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3576 (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
|
3577 (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
|
3578 :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
|
3579 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3580 ["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
|
3581 ["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
|
3582 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27607
diff
changeset
|
3583 ["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
|
3584 ["Exit IDL" idlwave-shell-quit t])) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3585 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3586 (if (or (featurep 'easymenu) (load "easymenu" t)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3587 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3588 (easy-menu-define |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3589 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
|
3590 idlwave-shell-menu-def) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3591 (easy-menu-define |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3592 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
|
3593 idlwave-shell-menu-def) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3594 (save-excursion |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3595 (mapcar (lambda (buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3596 (set-buffer buf) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3597 (if (eq major-mode 'idlwave-mode) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3598 (progn |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3599 (easy-menu-remove idlwave-mode-debug-menu) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3600 (easy-menu-add idlwave-mode-debug-menu)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3601 (buffer-list))))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3602 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3603 ;; The Breakpoint Glyph ------------------------------------------------------- |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3604 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3605 (defvar idlwave-shell-bp-glyph nil |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3606 "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
|
3607 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3608 (let ((image-string "/* XPM */ |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3609 static char * file[] = { |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3610 \"14 12 3 1\", |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3611 \" c None s backgroundColor\", |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3612 \". c #4B4B4B4B4B4B\", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3613 \"R c #FFFF00000000\", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3614 \" \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3615 \" \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3616 \" RRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3617 \" RRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3618 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3619 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3620 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3621 \" RRRRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3622 \" RRRRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3623 \" RRRR \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3624 \" \", |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3625 \" \"};")) |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3626 |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3627 (setq idlwave-shell-bp-glyph |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3628 (cond ((and (featurep 'xemacs) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3629 (featurep 'xpm)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3630 (make-glyph image-string)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3631 ((and (not (featurep 'xemacs)) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3632 (fboundp 'image-type-available-p) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3633 (image-type-available-p 'xpm)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
46289
diff
changeset
|
3634 (list 'image :type 'xpm :data image-string :ascent 'center)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3635 (t nil)))) |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3636 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3637 (provide 'idlw-shell) |
27166
b2d17f0c1668
Also provide idlwave.shell, not only idlw-shell.
Carsten Dominik <dominik@science.uva.nl>
parents:
27108
diff
changeset
|
3638 (provide 'idlwave-shell) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3639 |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3640 ;;; Load the toolbar when wanted by the user. |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3641 |
47915
f1ce118178c3
(idlwave-shell-set-bp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47453
diff
changeset
|
3642 (autoload 'idlwave-toolbar-toggle "idlw-toolbar" |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3643 "Toggle the IDLWAVE toolbar") |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3644 (autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar" |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3645 "Add IDLWAVE toolbar") |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3646 (defun idlwave-shell-toggle-toolbar () |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3647 "Toggle the display of the debugging toolbar." |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3648 (interactive) |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3649 (idlwave-toolbar-toggle)) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3650 |
27607
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3651 (if idlwave-shell-use-toolbar |
527d42ebb15e
(idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3652 (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere)) |
52401 | 3653 |
3654 ;;; arch-tag: 20c2e8ce-0709-41d8-a5b6-bb039148440a | |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff
changeset
|
3655 ;;; idlw-shell.el ends here |