annotate lisp/progmodes/idlw-shell.el @ 43813:7c1c9baea70f

(enum event_kind): Added save_session_event.
author Jan Djärv <jan.h.d@swipnet.se>
date Sun, 10 Mar 2002 16:15:48 +0000
parents 154133a72642
children b80d723ad7cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38436
b174db545cfd Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 34708
diff changeset
1 ;;; idlw-shell.el --- run IDL or WAVE as an inferior process of Emacs
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2 ;; Copyright (c) 1999, 2000 Free Software Foundation
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4 ;; Author: Chris Chase <chase@att.com>
41739
49e8031d8893 Update maintainer.
Eli Zaretskii <eliz@gnu.org>
parents: 41608
diff changeset
5 ;; Maintainer: John-David Smith <jdsmith@astro.cornell.edu>
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
6 ;; Version: 4.7
43350
154133a72642 (idlwave-shell-mode): Do not use make-local-hook.
Pavel Janík <Pavel@Janik.cz>
parents: 41739
diff changeset
7 ;; Date: $Date: 2001/12/01 12:54:29 $
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
8 ;; Keywords: processes
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
9
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
11
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
15 ;; any later version.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
16
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
21
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
26
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
28
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
29 ;; This mode is for IDL version 4 or later. It should work on Emacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
30 ;; or XEmacs version 19 or later.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
31
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
32 ;; Runs IDL as an inferior process of Emacs, much like the emacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
33 ;; `shell' or `telnet' commands. Provides command history and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
34 ;; searching. Provides debugging commands available in buffers
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
35 ;; visiting IDL procedure files, e.g., breakpoint setting, stepping,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
36 ;; execution until a certain line, printing expressions under point,
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
37 ;; visual line pointer for current execution line, etc.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
38 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
39 ;; Documentation should be available online with `M-x idlwave-info'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
40
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
41 ;; INSTALLATION:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
42 ;; =============
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
43 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
44 ;; 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
45 ;; 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
46 ;; lines to your .emacs file:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
47 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
48 ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
49 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
50 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
51 ;; SOURCE
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
54 ;; 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
55 ;; web site.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
56 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
57 ;; http://www.strw.leidenuniv.el/~dominik/Tools/idlwave
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 ;; DOCUMENTATION
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
60 ;; =============
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
61 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
62 ;; IDLWAVE is documented online in info format.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
63 ;; 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
64 ;; maintainers webpage (see under SOURCE)
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 ;; KNOWN PROBLEMS
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
68 ;; ==============
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
69 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
70 ;; I don't plan on implementing directory tracking by watching the IDL
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
71 ;; commands entered at the prompt, since too often an IDL procedure
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
72 ;; will change the current directory. If you want the the idl process
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
73 ;; buffer to match the IDL current working just execute `M-x
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
74 ;; idlwave-shell-resync-dirs' (bound to "\C-c\C-d\C-w" by default.)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
75 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
76 ;; 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
77 ;; 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
78 ;; it is a bug in XEmacs.
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
79 ;; 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
80 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
81 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
82 ;; CUSTOMIZATION VARIABLES
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 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
85 ;; 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
86 ;; 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
87 ;; `M-x idlwave-customize'.
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 ;;
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 ;;; Code:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
94
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
95 (require 'comint)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
96 (require 'idlwave)
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 (eval-when-compile (require 'cl))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
99
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
100 (defvar idlwave-shell-have-new-custom nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
101 (eval-and-compile
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
102 ;; Kludge to allow `defcustom' for Emacs 19.
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
103 (condition-case () (require 'custom) (error nil))
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
104 (if (and (featurep 'custom)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
105 (fboundp 'custom-declare-variable)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
106 (fboundp 'defface))
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
107 ;; We've got what we needed
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
108 (setq idlwave-shell-have-new-custom t)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
109 ;; We have the old or no custom-library, hack around it!
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
110 (defmacro defgroup (&rest args) nil)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
111 (defmacro defcustom (var value doc &rest args)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
112 `(defvar ,var ,value ,doc))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
113
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
114 ;;; Customizations: idlwave-shell group
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
115
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
116 (defgroup idlwave-shell-general-setup nil
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
117 "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
118 :prefix "idlwave-shell"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
119 :group 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
120
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
121 (defcustom idlwave-shell-prompt-pattern "^ ?IDL> "
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
122 "*Regexp to match IDL prompt at beginning of a line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
123 For example, \"^IDL> \" or \"^WAVE> \".
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
124 The \"^\" means beginning of line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
125 This variable is used to initialise `comint-prompt-regexp' in the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
126 process buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
127
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
128 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
129 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
130 :type 'regexp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
131
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
132 (defcustom idlwave-shell-process-name "idl"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
133 "*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
134 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
135 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
136 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
137
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
138 ;; (defcustom idlwave-shell-automatic-start...) See idlwave.el
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
139
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
140 (defcustom idlwave-shell-initial-commands "!more=0"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
141 "Initial commands, separated by newlines, to send to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
142 This string is sent to the IDL process by `idlwave-shell-mode' which is
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
143 invoked by `idlwave-shell'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
144 :group 'idlwave-shell-initial-commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
145 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
146
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
147 (defcustom idlwave-shell-use-dedicated-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
148 "*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
149 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
150 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
151
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
152 (defcustom idlwave-shell-frame-parameters
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
153 '((height . 30) (unsplittable . nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
154 "The frame parameters for a dedicated idlwave-shell frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
155 See also `idlwave-shell-use-dedicated-frame'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
156 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
157 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
158 :type '(repeat
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
159 (cons symbol sexp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
160
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
161 (defcustom idlwave-shell-arrows-do-history t
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
162 "*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
163 This variable can have 3 values:
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
164 nil Arrows just move the cursor
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
165 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
166 walk the history
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
167 '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
168 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
169 :group 'idlwave-shell-general-setup
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
170 :type '(choice
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
171 (const :tag "never" nil)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
172 (const :tag "everywhere" t)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
173 (const :tag "in command line only" cmdline)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
174
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
175 (defcustom idlwave-shell-use-toolbar t
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
176 "*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
177 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
178 Exiting the shell will removed everywhere.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
179 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
180 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
181 `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
182 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
183 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
184
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
185 (defcustom idlwave-shell-temp-pro-prefix "/tmp/idltemp"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
186 "*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
187 It should be an absolute pathname.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
188 The full temporary file name is obtained by to using `make-temp-name'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
189 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
190 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
191 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
192
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
193 (defvar idlwave-shell-fix-inserted-breaks nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
194 "*OBSOLETE VARIABLE, is no longer used.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
195
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
196 The documentation of this variable used to be:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
197 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
198
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
199 (defcustom idlwave-shell-prefix-key "\C-c\C-d"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
200 "*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
201 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
202 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
203 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
204 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
205
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
206 (defcustom idlwave-shell-activate-prefix-keybindings t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
207 "Non-nil means, the debug commands will be bound to the prefix key.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
208 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
209 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
210 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
211 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
212
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
213 ;; (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
214
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
215 (defvar idlwave-shell-activate-alt-keybindings nil
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
216 "Obsolete variable. See `idlwave-shell-debug-modifiers'.")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
217
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
218 (defcustom idlwave-shell-use-truename nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
219 "*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
220 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
221 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
222 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
223 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
224 reuse that buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
225 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
226 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
227 to set this option to nil."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
228 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
229 :type 'boolean)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
230
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
231 (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
232 "The characters allowed in file names, as a string.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
233 Used for file name completion. Must not contain `'', `,' and `\"'
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
234 because these are used as separators by IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
235 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
236 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
237
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
238 (defcustom idlwave-shell-mode-hook '()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
239 "*Hook for customising `idlwave-shell-mode'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
240 :group 'idlwave-shell-general-setup
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
241 :type 'hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
242
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
243 (defcustom idlwave-shell-print-expression-function nil
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
244 "When non-nil, a function to handle display of evaluated expressions.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
245 This can be used to arrange for displaying the value of an expression
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
246 in (e.g.) a special frame. The function must accept one argument:
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
247 the expression which was evaluated. The output from IDL will be
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
248 available in the variable `idlwave-shell-command-output'."
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
249 :group 'idlwave-shell-highlighting-and-faces
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
250 :type 'symbol)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
251
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
252 (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
253 "*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
254 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
255 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
256 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
257 back, respectively. See `idlwave-shell-input-mode-spells' for details."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
258 :group 'idlwave-shell-general-setup
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
259 :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
260
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
261 (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
262 '("^<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
263 "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
264
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
265 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
266 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
267 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
268
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
269 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
270 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
271 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
272 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
273 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
274
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
275 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
276 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
277 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
278
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
279 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
280 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
281 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
282
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
283 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
284 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
285 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
286 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
287 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
288 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
289
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
290 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
291 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
292 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
293
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
294 Since the IDLWAVE shell defines the system variable `!IDLWAVE_VERSION',
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
295 you could actually check if you are running under Emacs before printing
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
296 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
297
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
298 Usage:
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
299 ======
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
300 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
301 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
302 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
303
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
304
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
305 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
306 ;; 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
307 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
308 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
309 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
310 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
311 else print,'<onechar>'
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
312 endif
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
313 end"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
314 :group 'idlwave-shell-general-setup
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
315 :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
316 (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
317 (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
318 (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
319
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
320 (defcustom idlwave-shell-graphics-window-size '(500 400)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
321 "Size of IDL graphics windows popped up by special IDLWAVE command.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
322 The command is `C-c C-d C-f' and accepts as a prefix the window nr.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
323 A command like `WINDOW,N,xsize=XX,ysize=YY' is sent to IDL."
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
324 :group 'idlwave-shell-general-setup
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
325 :type '(list
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
326 (integer :tag "x size")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
327 (integer :tag "y size")))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
328
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
329 ;;; Breakpoint Overlays etc
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
330
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
331 (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
332 "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
333 :prefix "idlwave-shell"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
334 :group 'idlwave)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
335
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
336 (defcustom idlwave-shell-mark-stop-line t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
337 "*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
338 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
339 are:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
340
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
341 nil Do not mark the line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
342 'arrow Use the overlay arrow
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
343 '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
344 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
345 otherwise the overlay arrow.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
346 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
347 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
348 a face highlighting may be better.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
349 On Emacs 21, the overlay arrow is displayed in a special area and never
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
350 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
351 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
352 :type '(choice
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
353 (const :tag "No marking" nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
354 (const :tag "Use overlay arrow" arrow)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
355 (const :tag "Highlight with face" face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
356 (const :tag "Face or arrow." t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
357
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
358 (defcustom idlwave-shell-overlay-arrow ">"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
359 "*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
360 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
361 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
362 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
363 See also `idlwave-shell-use-overlay-arrow'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
364 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
365 :type 'string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
366
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
367 (defcustom idlwave-shell-stop-line-face 'highlight
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
368 "*The face for `idlwave-shell-stop-line-overlay'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
369 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
370 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
371 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
372 :type 'symbol)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
373
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
374 (defcustom idlwave-shell-mark-breakpoints t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
375 "*Non-nil means, mark breakpoints in the source files.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
376 Legal values are:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
377 nil Do not mark breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
378 'face Highlight line with `idlwave-shell-breakpoint-face'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
379 '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
380 support glyphs, will use 'face instead.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
381 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
382 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
383 :type '(choice
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
384 (const :tag "No marking" nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
385 (const :tag "Highlight with face" face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
386 (const :tag "Display glyph (red dot)" glyph)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
387 (const :tag "Glyph or face." t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
388
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
389 (defvar idlwave-shell-use-breakpoint-glyph t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
390 "Obsolete variable. See `idlwave-shell-mark-breakpoints.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
391
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
392 (defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp-face
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
393 "*The face for breakpoint lines in the source code.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
394 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
395 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
396 :group 'idlwave-shell-highlighting-and-faces
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
397 :type 'symbol)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
398
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
399 (if idlwave-shell-have-new-custom
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
400 ;; 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
401 (defface idlwave-shell-bp-face
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
402 '((((class color)) (:foreground "Black" :background "Pink"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
403 (t (:underline t)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
404 "Face for highlighting lines-with-breakpoints."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
405 :group 'idlwave-shell-highlighting-and-faces)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
406 ;; 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
407 (copy-face 'underline 'idlwave-shell-bp-face))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
408
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
409 (defcustom idlwave-shell-expression-face 'secondary-selection
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
410 "*The face for `idlwave-shell-expression-overlay'.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
411 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
412 the expression printed by IDL."
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
413 :group 'idlwave-shell-highlighting-and-faces
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
414 :type 'symbol)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
415
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
416 ;;; End user customization variables
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
417
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
418 ;;; External variables
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
419 (defvar comint-last-input-start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
420 (defvar comint-last-input-end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
421
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
422 ;; Other variables
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
423
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
424 (defvar idlwave-shell-temp-file-base
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
425 (make-temp-name idlwave-shell-temp-pro-prefix)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
426 "Base name of the temporary files.")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
427
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
428 (defvar idlwave-shell-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
429 (concat idlwave-shell-temp-file-base ".pro")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
430 "Absolute pathname for temporary IDL file for compiling regions")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
431
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
432 (defvar idlwave-shell-temp-rinfo-save-file
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
433 (concat idlwave-shell-temp-file-base ".sav")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
434 "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
435 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
436 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
437
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
438
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
439 (defvar idlwave-shell-dirstack-query "printd"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
440 "Command used by `idlwave-shell-resync-dirs' to query IDL for
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
441 the directory stack.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
442
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
443 (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
444 "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
445
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
446 (defvar idlwave-shell-mode-line-info nil
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
447 "Additional info displayed in the mode line")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
448
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
449 (defvar idlwave-shell-default-directory nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
450 "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
451
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
452 (defvar idlwave-shell-last-save-and-action-file nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
453 "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
454
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
455 ;; Highlighting uses overlays. When necessary, require the emulation.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
456 (if (not (fboundp 'make-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
457 (condition-case nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
458 (require 'overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
459 (error nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
460
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
461 (defvar idlwave-shell-stop-line-overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
462 "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
463 (defvar idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
464 (defvar idlwave-shell-expression-overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
465 "The overlay for where IDL is currently stopped.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
466 ;; 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
467 ;; are reloading this file.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
468 (if (overlayp idlwave-shell-stop-line-overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
469 (delete-overlay idlwave-shell-stop-line-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
470 (if (overlayp idlwave-shell-expression-overlay)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
471 (delete-overlay idlwave-shell-expression-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
472 ;; Set to nil initially
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
473 (setq idlwave-shell-stop-line-overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
474 idlwave-shell-expression-overlay nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
475
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
476 ;; 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
477 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
478 ((or (null idlwave-shell-mark-stop-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
479 (eq idlwave-shell-mark-stop-line 'arrow))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
480 ;; Leave the overlay nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
481 nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
482
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
483 ((eq idlwave-shell-mark-stop-line 'face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
484 ;; 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
485 ;; So who can display faces?
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
486 (when (or (featurep 'xemacs) ; XEmacs can do also ttys
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
487 (fboundp 'tty-defined-colors) ; Emacs 21 as well
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
488 window-system) ; Window systems always
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
489 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
490 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
491 (overlay-put idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
492 'face idlwave-shell-stop-line-face))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
493
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
494 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
495 ;; 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
496 (if window-system
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
497 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
498 (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
499 (overlay-put idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
500 'face idlwave-shell-stop-line-face)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
501
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
502 ;; Now the expression overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
503 (setq idlwave-shell-expression-overlay (make-overlay 1 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
504 (overlay-put idlwave-shell-expression-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
505 'face idlwave-shell-expression-face)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
506 (defvar idlwave-shell-bp-query "help,/breakpoints"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
507 "Command to obtain list of breakpoints")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
508
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
509 (defvar idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
510 "String for accumulating current command output.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
511
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
512 (defvar idlwave-shell-post-command-hook nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
513 "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
514 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
515 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
516
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
517 (defvar idlwave-shell-hide-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
518 "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
519 buffer.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
520
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
521 (defvar idlwave-shell-accumulation nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
522 "Accumulate last line of output.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
523
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
524 (defvar idlwave-shell-command-line-to-execute nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
525 (defvar idlwave-shell-cleanup-hook nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
526 "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
527
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
528 (defvar idlwave-shell-pending-commands nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
529 "List of commands to be sent to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
530 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
531 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
532 `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
533 from command CMD. PCMD and HIDE are optional.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
534
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
535 (defun idlwave-shell-buffer ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
536 "Name of buffer associated with IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
537 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
538 with `*'s."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
539 (concat "*" idlwave-shell-process-name "*"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
540
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
541 (defvar idlwave-shell-ready nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
542 "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
543
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
544 ;;; 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
545 ;;; resync our idea of where IDL execution currently is.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
546 ;;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
547
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
548 (defvar idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
549 "The frame associated with halt/breakpoint messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
550
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
551 (defvar idlwave-shell-step-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
552 "The frame associated with step messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
553
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
554 (defvar idlwave-shell-trace-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
555 "The frame associated with trace messages.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
556
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
557 (defconst idlwave-shell-halt-messages
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
558 '("^% Execution halted at"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
559 "^% Interrupted at:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
560 "^% Stepped to:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
561 "^% At "
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
562 "^% Stop encountered:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
563 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
564 "*A list of regular expressions matching IDL messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
565 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
566 IDL is currently stopped.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
567
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
568 (defconst idlwave-shell-halt-messages-re
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
569 (mapconcat 'identity idlwave-shell-halt-messages "\\|")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
570 "The regular expression computed from idlwave-shell-halt-messages")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
571
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
572 (defconst idlwave-shell-trace-messages
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
573 '("^% At " ;; First line of a trace message
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
574 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
575 "*A list of regular expressions matching IDL trace messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
576 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
577 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
578
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
579 (defconst idlwave-shell-step-messages
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
580 '("^% Stepped to:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
581 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
582 "*A list of regular expressions matching stepped execution messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
583 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
584 IDL has currently stepped.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
585
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
586 (defvar idlwave-shell-break-message "^% Breakpoint at:"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
587 "*Regular expression matching an IDL breakpoint message line.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
588
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
589
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
590 (defvar idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
591 ;(defvar idlwave-shell-post-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
592 (defvar idlwave-shell-sources-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
593 (defvar idlwave-shell-menu-def)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
594 (defvar idlwave-shell-mode-menu)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
595 (defvar idlwave-shell-initial-commands)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
596 (defvar idlwave-shell-syntax-error)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
597 (defvar idlwave-shell-other-error)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
598 (defvar idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
599 (defvar idlwave-shell-error-last)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
600 (defvar idlwave-shell-bp-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
601 (defvar idlwave-shell-sources-query)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
602 (defvar idlwave-shell-mode-map)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
603 (defvar idlwave-shell-calling-stack-index)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
604
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
605 (defun idlwave-shell-mode ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
606 "Major mode for interacting with an inferior IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
607
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
608 1. Shell Interaction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
609 -----------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
610 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
611 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
612 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
613 end of the buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
614
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
615 Command history, searching of previous commands, command line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
616 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
617 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
618 the arrow keys UP and DOWN.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
619
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
620 2. Completion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
621 ----------
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
622 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
623 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
624 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
625 like in `idlwave-mode'.
27107
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 3. Routine Info
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
628 ------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
629 `\\[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
630 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
631 the one whose argument list is being edited.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
632 To update IDLWAVE's knowledge about compiled or edited modules, use
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
633 \\[idlwave-update-routine-info].
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
634 \\[idlwave-find-module] find the source of a module.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
635 \\[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
636 \\[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
637 point, if online help has been installed.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
638
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
639
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
640 4. Debugging
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
641 ---------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
642 A complete set of commands for compiling and debugging IDL programs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
643 is available from the menu. Also keybindings starting with a
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
644 `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
645 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
646 keybindings is again the menu.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
647
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
648 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
649 installed.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
650
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
651 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
652 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
653 window. Breakpoints are also highlighted in the source.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
654
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
655 \\[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
656 to correspond to the IDL process current directory.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
657
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
658 5. Hooks
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
659 -----
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
660 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
661 `idlwave-shell-mode-hook' (in that order).
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
662
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
663 6. Documentation and Customization
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
664 -------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
665 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
666 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
667 For Postscript and HTML versions of the documentation, check IDLWAVE's
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
668 homepage at `http://www.strw.leidenuniv.nl/~dominik/Tools/idlwave'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
669 IDLWAVE has customize support - see the group `idlwave'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
670
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
671 7. Keybindings
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
672 -----------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
673 \\{idlwave-shell-mode-map}"
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 (interactive)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
676 ;; 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
677 ;; 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
678 (setq comint-prompt-regexp idlwave-shell-prompt-pattern)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
679 (setq comint-process-echoes t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
680 ;; 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
681 (setq comint-input-autoexpand nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
682 (setq comint-input-ring-size 64)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
683 (make-local-variable 'comint-completion-addsuffix)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
684 (set (make-local-variable 'completion-ignore-case) t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
685 (setq comint-completion-addsuffix '("/" . ""))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
686 (setq comint-input-ignoredups t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
687 (setq major-mode 'idlwave-shell-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
688 (setq mode-name "IDL-Shell")
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
689 (setq idlwave-shell-mode-line-info nil)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
690 (setq mode-line-format
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
691 '(""
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
692 mode-line-modified
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
693 mode-line-buffer-identification
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
694 " "
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
695 global-mode-string
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
696 " %[("
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
697 mode-name
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
698 mode-line-process
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
699 minor-mode-alist
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
700 "%n"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
701 ")%]-"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
702 idlwave-shell-mode-line-info
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
703 "---"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
704 (line-number-mode "L%l--")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
705 (column-number-mode "C%c--")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
706 (-3 . "%p")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
707 "-%-"))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
708 ;; (make-local-variable 'idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
709 (setq idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
710 idlwave-shell-trace-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
711 idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
712 idlwave-shell-step-frame nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
713 (idlwave-shell-display-line nil)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
714 (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
715
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
716 ;; 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
717 ;; 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
718 (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
719 (setq idlwave-idlwave_routine_info-compiled nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
720 (setq idlwave-shell-ready nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
721 (setq idlwave-shell-bp-alist nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
722 (idlwave-shell-update-bp-overlays) ; Throw away old overlays
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
723 (setq idlwave-shell-sources-alist nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
724 (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
725 (setq idlwave-shell-hide-output nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
726 (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
727 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
728 (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
729 (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
730 (use-local-map idlwave-shell-mode-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
731 (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
732
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
733 (set (make-local-variable 'comint-scroll-to-bottom-on-input) t)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
734 (set (make-local-variable 'comint-scroll-show-maximum-output) t)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
735
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
736 ;; 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
737 (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
738 (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
739 (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
740 (setq abbrev-mode t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
741 (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
742
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
743 ;; Run the hooks.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
744 (run-hooks 'idlwave-shell-mode-hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
745 (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
746 ;; Define a system variable which knows the version of IDLWAVE
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
747 (idlwave-shell-send-command
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
748 (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
749 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
750 (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
751 (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
752 (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
753 '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
754 'hide)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
755
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
756 (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
757 (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
758 (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
759 (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
760 (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
761 (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
762 dirs))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
763
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
764 (if (not (fboundp 'idl-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
765 (fset 'idl-shell 'idlwave-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
766
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
767 (defvar idlwave-shell-idl-wframe nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
768 "Frame for displaying the idl shell window.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
769 (defvar idlwave-shell-display-wframe nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
770 "Frame for displaying the idl source files.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
771
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
772 (defvar idlwave-shell-calling-stack-index 0)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
773 (defvar idlwave-shell-calling-stack-routine nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
774
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
775 (defun idlwave-shell-source-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
776 "Return the frame to be used for source display."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
777 (if idlwave-shell-use-dedicated-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
778 ;; We want separate frames for source and shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
779 (if (frame-live-p idlwave-shell-display-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
780 ;; The frame exists, so we use it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
781 idlwave-shell-display-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
782 ;; The frame does not exist. We use the current frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
783 ;; However, if the current is the shell frame, we make a new frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
784 (setq idlwave-shell-display-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
785 (if (eq (selected-frame) idlwave-shell-idl-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
786 (make-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
787 (selected-frame))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
788
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
789 (defun idlwave-shell-shell-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
790 "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
791 (if idlwave-shell-use-dedicated-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
792 ;; We want a dedicated frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
793 (if (frame-live-p idlwave-shell-idl-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
794 ;; It does exist, so we use it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
795 idlwave-shell-idl-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
796 ;; 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
797 (if (not (frame-live-p idlwave-shell-display-wframe))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
798 ;; 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
799 (setq idlwave-shell-display-wframe (selected-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
800 ;; Return a new frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
801 (setq idlwave-shell-idl-wframe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
802 (make-frame idlwave-shell-frame-parameters)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
803
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
804 ;;;###autoload
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
805 (defun idlwave-shell (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
806 "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
807 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
808 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
809
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
810 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
811 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
812 separate frames.
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 The command to run comes from variable `idlwave-shell-explicit-file-name'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
815
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
816 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
817 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
818 See also the variable `idlwave-shell-prompt-pattern'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
819
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
820 \(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
821 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
822
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
823 ;; A non-nil arg means, we want a dedicated frame. This will last
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
824 ;; for the current editing session.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
825 (if arg (setq idlwave-shell-use-dedicated-frame t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
826 (if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
827
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
828 ;; Check if the process still exists. If not, create it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
829 (unless (comint-check-proc (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
830 (let* ((prg (or idlwave-shell-explicit-file-name "idl"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
831 (buf (apply 'make-comint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
832 idlwave-shell-process-name prg nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
833 idlwave-shell-command-line-options))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
834 (process (get-buffer-process buf)))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
835 (setq idlwave-idlwave_routine_info-compiled nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
836 (set-process-filter process 'idlwave-shell-filter)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
837 (set-process-sentinel process 'idlwave-shell-sentinel)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
838 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
839 (idlwave-shell-mode)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
840 (let ((window (idlwave-display-buffer (idlwave-shell-buffer) nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
841 (idlwave-shell-shell-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
842 (current-window (selected-window)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
843 (select-window window)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
844 (goto-char (point-max))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
845 (select-window current-window)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
846 (raise-frame (window-frame window))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
847 (if (eq (selected-frame) (window-frame window))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
848 (select-window window))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
849 ))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
850
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
851 (defun idlwave-shell-recenter-shell-window (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
852 "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
853 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
854 (let ((window (selected-window)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
855 (idlwave-shell arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
856 (select-window window)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
857
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
858 (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
859 "Send a command to IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
860
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
861 \(CMD PCMD HIDE\) are placed at the end of `idlwave-shell-pending-commands'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
862 If IDL is ready the first command, CMD, in
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
863 `idlwave-shell-pending-commands' is sent to the IDL process. If optional
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
864 second argument PCMD is non-nil it will be placed on
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
865 `idlwave-shell-post-command-hook' when CMD is executed. If the optional
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
866 third argument HIDE is non-nil, then hide output from CMD.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
867 If optional fourth argument PREEMPT is non-nil CMD is put at front of
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
868 `idlwave-shell-pending-commands'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
869
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
870 IDL is considered ready if the prompt is present
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
871 and if `idlwave-shell-ready' is non-nil."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
872
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
873 ;(setq hide nil) ; FIXME: turn this on for debugging only
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
874 (let (buf proc)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
875 ;; Get or make the buffer and its process
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
876 (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
877 (not (setq proc (get-buffer-process buf))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
878 (if (not idlwave-shell-automatic-start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
879 (error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
880 (substitute-command-keys
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
881 "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
882 (idlwave-shell-recenter-shell-window)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
883 (setq buf (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
884 (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
885 (not (setq proc (get-buffer-process buf))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
886 ;; Still nothing
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
887 (error "Problem with autostarting IDL shell"))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
888
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
889 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
890 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
891 (goto-char (process-mark proc))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
892 ;; 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
893 (if cmd
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
894 (setq idlwave-shell-pending-commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
895 (if preempt
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
896 ;; Put at front.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
897 (append (list (list cmd pcmd hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
898 idlwave-shell-pending-commands)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
899 ;; Put at end.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
900 (append idlwave-shell-pending-commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
901 (list (list cmd pcmd hide))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
902 ;; Check if IDL ready
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
903 (if (and idlwave-shell-ready
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
904 ;; Check for IDL prompt
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
905 (save-excursion
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
906 (forward-line 0)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
907 ;; (beginning-of-line) ; Changed for Emacs 21
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
908 (looking-at idlwave-shell-prompt-pattern)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
909 ;; IDL ready for command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
910 (if idlwave-shell-pending-commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
911 ;; execute command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
912 (let* ((lcmd (car idlwave-shell-pending-commands))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
913 (cmd (car lcmd))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
914 (pcmd (nth 1 lcmd))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
915 (hide (nth 2 lcmd)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
916 ;; If this is an executive command, reset the stack pointer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
917 (if (eq (string-to-char cmd) ?.)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
918 (setq idlwave-shell-calling-stack-index 0))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
919 ;; Set post-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
920 (setq idlwave-shell-post-command-hook pcmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
921 ;; Output hiding
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
922 ;;; Debug code
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
923 ;;; (setq idlwave-shell-hide-output nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
924 (setq idlwave-shell-hide-output hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
925 ;; Pop command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
926 (setq idlwave-shell-pending-commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
927 (cdr idlwave-shell-pending-commands))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
928 ;; Send command for execution
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
929 (set-marker comint-last-input-start (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
930 (set-marker comint-last-input-end (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
931 (comint-simple-send proc cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
932 (setq idlwave-shell-ready nil)))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
933
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
934 (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
935 "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
936 (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
937 (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
938 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
939 (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
940 (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
941 (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
942 (if (equal c ?\C-g)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
943 (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
944 (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
945
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
946 (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
947 (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
948 "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
949 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
950 (cond
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
951 ((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
952 (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
953 ((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
954 (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
955 (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
956 ((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
957 ;; 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
958 (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
959 (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
960 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
961 (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
962
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
963 (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
964 (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
965 "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
966 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
967 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
968 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
969 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
970 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
971 (interactive)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
972
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
973 ;; 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
974 (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
975 (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
976 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
977 (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
978 (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
979 (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
980 (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
981 (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
982
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
983 ;; OK, start the loop
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
984 (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
985 (message
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
986 (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
987 (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
988 ;; 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
989 ;; 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
990 (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
991 ;; 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
992 (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
993 (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
994 (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
995 (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
996 (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
997 ;; 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
998 (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
999 (setq c (read-char))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1000 (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
1001 (cond
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1002 ((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
1003 (ding))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1004 ((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
1005 (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
1006 (ding)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1007 (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
1008 (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
1009 (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
1010 (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
1011 (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
1012
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1013 (defun idlwave-shell-up-or-history (&optional arg)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1014 "When in last line of process buffer, do `comint-previous-input'.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1015 Otherwise just do `previous-line'."
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1016 (interactive "p")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1017 (if (eq t idlwave-shell-arrows-do-history) (goto-char (point-max)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1018 (if (and idlwave-shell-arrows-do-history
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1019 (>= (1+ (save-excursion (end-of-line) (point)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1020 (marker-position
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1021 (process-mark (get-buffer-process (current-buffer))))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1022 (progn
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1023 (and (not (eolp)) (kill-line nil))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1024 (comint-previous-input arg))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1025 (previous-line arg)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1026
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1027 (defun idlwave-shell-down-or-history (&optional arg)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1028 "When in last line of process buffer, do `comint-next-input'.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1029 Otherwise just do `next-line'."
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1030 (interactive "p")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1031 (if (eq t idlwave-shell-arrows-do-history) (goto-char (point-max)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1032 (if (and idlwave-shell-arrows-do-history
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1033 (>= (1+ (save-excursion (end-of-line) (point)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1034 (marker-position
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1035 (process-mark (get-buffer-process (current-buffer))))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1036 (progn
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1037 (and (not (eolp)) (kill-line nil))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1038 (comint-next-input arg))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1039 (next-line arg)))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1040
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1041 ;; There was a report that a newer version of comint.el changed the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1042 ;; name of comint-filter to comint-output-filter. Unfortunately, we
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1043 ;; have yet to upgrade.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1044
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1045 (defun idlwave-shell-comint-filter (process string) nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1046 (if (fboundp 'comint-output-filter)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1047 (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
1048 (fset 'idlwave-shell-comint-filter (symbol-function 'comint-filter)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1049
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1050 (defun idlwave-shell-is-running ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1051 "Return t if the shell process is running."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1052 (eq (process-status idlwave-shell-process-name) 'run))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1053
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1054 (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
1055 "Buffer containing hidden output from IDL commands.")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1056
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1057 (defun idlwave-shell-filter (proc string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1058 "Replace Carriage returns in output. Watch for prompt.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1059 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
1060 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
1061 ;; 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
1062 (when (eq (process-status idlwave-shell-process-name) 'run)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1063 ;; OK, process is still running, so we can use it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1064 (let ((data (match-data)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1065 (unwind-protect
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1066 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1067 ;; May change the original match data.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1068 (let (p)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1069 (while (setq p (string-match "\C-M" string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1070 (aset string p ? )))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1071 ;;; Test/Debug code
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1072 ;; (save-excursion (set-buffer (get-buffer-create "*test*"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1073 ;; (goto-char (point-max))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1074 ;; (insert "%%%" string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1075 ;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1076 ;; Keep output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1077
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1078 ; 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
1079 ; 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
1080 ; 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
1081 ; 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
1082 ; 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
1083 ; (setq idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1084 ; (concat idlwave-shell-command-output string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1085 ;; Insert the string. Do this before getting the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1086 ;; state.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1087 (if idlwave-shell-hide-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1088 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1089 (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
1090 (get-buffer-create idlwave-shell-hidden-output-buffer))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1091 (goto-char (point-max))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1092 (insert string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1093 (idlwave-shell-comint-filter proc string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1094 ;; Watch for prompt - need to accumulate the current line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1095 ;; since it may not be sent all at once.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1096 (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
1097 (progn
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1098 (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
1099 (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
1100 (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
1101 (setq idlwave-shell-accumulation
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1102 (substring string
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1103 (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
1104 (match-end 0)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1105 (setq idlwave-shell-accumulation
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1106 (concat idlwave-shell-accumulation string)))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1107
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1108
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1109 ;; Check for prompt in current line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1110 (if (setq idlwave-shell-ready
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1111 (string-match idlwave-shell-prompt-pattern
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1112 idlwave-shell-accumulation))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1113 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1114 (if idlwave-shell-hide-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1115 (save-excursion
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1116 (set-buffer idlwave-shell-hidden-output-buffer)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1117 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1118 (re-search-forward idlwave-shell-prompt-pattern nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1119 (setq idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1120 (buffer-substring (point-min) (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1121 (delete-region (point-min) (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1122 (setq idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1123 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1124 (set-buffer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1125 (process-buffer proc))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1126 (buffer-substring
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1127 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1128 (goto-char (process-mark proc))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1129 (beginning-of-line nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1130 (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1131 comint-last-input-end))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1132 ;;; Test/Debug code
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1133 ;; (save-excursion (set-buffer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1134 ;; (get-buffer-create "*idlwave-shell-output*"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1135 ;; (goto-char (point-max))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1136 ;; (insert "%%%" string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1137 ;; Scan for state and do post command - bracket them
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1138 ;; with idlwave-shell-ready=nil since they
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1139 ;; may call idlwave-shell-send-command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1140 (let ((idlwave-shell-ready nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1141 (idlwave-shell-scan-for-state)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1142 ;; Unset idlwave-shell-ready to prevent sending
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1143 ;; commands to IDL while running hook.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1144 (if (listp idlwave-shell-post-command-hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1145 (eval idlwave-shell-post-command-hook)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1146 (funcall idlwave-shell-post-command-hook))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1147 ;; Reset to default state for next command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1148 ;; 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
1149 (setq idlwave-shell-accumulation nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1150 idlwave-shell-command-output nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1151 idlwave-shell-post-command-hook nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1152 idlwave-shell-hide-output nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1153 ;; Done with post command. Do pending command if
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1154 ;; any.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1155 (idlwave-shell-send-command))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1156 (store-match-data data)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1157
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1158 (defun idlwave-shell-sentinel (process event)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1159 "The sentinel function for the IDLWAVE shell process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1160 (let* ((buf (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1161 (win (get-buffer-window buf)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1162 (when (get-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1163 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1164 (set-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1165 (goto-char (point-max))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1166 (insert (format "\n\n Process %s %s" process event))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1167 (when (and (> (length (frame-list)) 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1168 (frame-live-p idlwave-shell-idl-wframe))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1169 (delete-frame idlwave-shell-idl-wframe)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1170 (setq idlwave-shell-idl-wframe nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1171 idlwave-shell-display-wframe nil))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1172 (when (window-live-p win)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1173 (delete-window win))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1174 (idlwave-shell-cleanup)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1175
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1176 (defun idlwave-shell-scan-for-state ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1177 "Scan for state info.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1178 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
1179 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
1180 execution halted, stepped, breakpoint, interrupted at and trace
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1181 messages. We ignore error messages otherwise.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1182 For breakpoint messages process any attached count or command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1183 parameters.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1184 Update the windows if a message is found."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1185 (let (update)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1186 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1187 ;; Make sure we have output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1188 ((not idlwave-shell-command-output))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1189
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1190 ;; Various types of HALT messages.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1191 ((string-match idlwave-shell-halt-messages-re
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1192 idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1193 ;; Grab the file and line state info.
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1194 (setq idlwave-shell-calling-stack-index 0)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1195 (setq idlwave-shell-halt-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1196 (idlwave-shell-parse-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1197 (substring idlwave-shell-command-output (match-end 0)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1198 update t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1199
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1200 ;; Handle breakpoints separately
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1201 ((string-match idlwave-shell-break-message
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1202 idlwave-shell-command-output)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1203 (setq idlwave-shell-calling-stack-index 0)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1204 (setq idlwave-shell-halt-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1205 (idlwave-shell-parse-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1206 (substring idlwave-shell-command-output (match-end 0)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1207 update t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1208 ;; We used to to counting hits on breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1209 ;; this is no longer supported since IDL breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1210 ;; have learned counting.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1211 ;; Do breakpoint command processing
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1212 (let ((bp (assoc
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1213 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1214 (nth 0 idlwave-shell-halt-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1215 (nth 1 idlwave-shell-halt-frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1216 idlwave-shell-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1217 (if bp
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1218 (let ((cmd (idlwave-shell-bp-get bp 'cmd)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1219 (if cmd
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1220 ;; Execute command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1221 (if (listp cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1222 (eval cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1223 (funcall cmd))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1224 ;; A breakpoint that we did not know about - perhaps it was
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1225 ;; set by the user or IDL isn't reporting breakpoints like
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1226 ;; we expect. Lets update our list.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1227 (idlwave-shell-bp-query)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1228
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1229 ;; Handle compilation errors in addition to the above
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1230 (if (and idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1231 (or (string-match
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1232 idlwave-shell-syntax-error idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1233 (string-match
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1234 idlwave-shell-other-error idlwave-shell-command-output)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1235 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1236 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1237 (set-buffer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1238 (get-buffer-create idlwave-shell-error-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1239 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1240 (insert idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1241 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1242 (setq idlwave-shell-error-last (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1243 (idlwave-shell-goto-next-error)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1244
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1245 ;; Do update
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1246 (when update
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1247 (idlwave-shell-display-line (idlwave-shell-pc-frame)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1248
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1249
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1250 (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1251 "Buffer containing syntax errors from IDL compilations.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1252
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1253
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1254 ;; 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
1255 ;; 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
1256 ;; 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
1257 (defvar idlwave-shell-syntax-error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1258 "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1259 "A regular expression to match an IDL syntax error.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1260 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
1261 should match the line number.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1262
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1263 (defvar idlwave-shell-other-error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1264 "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1265 "A regular expression to match any IDL error.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1266 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
1267 should match the line number.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1268
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1269 (defvar idlwave-shell-file-line-message
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1270 (concat
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1271 "\\(" ; program name group (1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1272 "\\<[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
1273 "\\([ \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
1274 "\\)" ; end program name group (1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1275 "[ \t\n]+" ; white space
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1276 "\\(" ; line number group (3)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1277 "[0-9]+" ; the line number (the fix point)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1278 "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1279 "\\)" ; end line number group (3)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1280 "[ \t\n]+" ; white space
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1281 "\\(" ; file name group (5)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1282 "[^ \t\n]+" ; file names can contain any non-white
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1283 "\\([ \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
1284 "\\)" ; end line number group (5)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1285 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1286 "*A regular expression to parse out the file name and line number.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1287 The 1st group should match the subroutine name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1288 The 3rd group is the line number.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1289 The 5th group is the file name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1290 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
1291 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
1292
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1293 (defun idlwave-shell-parse-line (string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1294 "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
1295 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
1296 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
1297 or file names.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1298 It is very difficult to come up with a robust solution. This one seems
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1299 to be pretty good though.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1300
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1301 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
1302
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1303 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
1304 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
1305 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
1306
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1307 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
1308 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
1309 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
1310 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
1311 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
1312 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
1313 unlikely."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1314
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1315 (let (number procedure file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1316 (when (string-match idlwave-shell-file-line-message string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1317 (setq procedure (match-string 1 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1318 number (match-string 3 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1319 file (match-string 5 string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1320
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1321 ;; Repair the strings
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1322 (setq procedure (idlwave-shell-repair-string procedure))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1323 (setq number (idlwave-shell-repair-string number))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1324 (setq file (idlwave-shell-repair-file-name file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1325
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1326 ;; If we have a file, return the frame list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1327 (if file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1328 (list (idlwave-shell-file-name file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1329 (string-to-int number)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1330 procedure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1331 ;; No success finding a file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1332 nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1333
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1334 (defun idlwave-shell-repair-string (string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1335 "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
1336 (while (string-match "[ \t]*\n[ \t]*" string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1337 (setq string (replace-match "" t t string)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1338 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1339
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1340 (defun idlwave-shell-repair-file-name (file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1341 "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
1342 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
1343 file name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1344 (let ((file1 "") (file2 "") (start 0))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1345 ;; We scan no further than to the next "^%" line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1346 (if (string-match "^%" file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1347 (setq file (substring file 0 (match-beginning 0))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1348 ;; Take out the line breaks
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1349 (while (string-match "[ \t]*\n[ \t]*" file start)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1350 (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
1351 start (match-end 0)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1352 (setq file2 (concat file1 (substring file start)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1353 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1354 ((file-regular-p file2) file2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1355 ((file-regular-p file1) file1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1356 ;; 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
1357 ;; 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
1358 ;; 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
1359 ;; 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
1360 ((not (string= "" file1)) file1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1361 ((not (string= "" file2)) file2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1362 (t nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1363
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1364 (defun idlwave-shell-cleanup ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1365 "Do necessary cleanup for a terminated IDL process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1366 (setq idlwave-shell-step-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1367 idlwave-shell-halt-frame nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1368 idlwave-shell-pending-commands nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1369 idlwave-shell-command-line-to-execute nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1370 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
1371 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
1372 idlwave-idlwave_routine_info-compiled nil)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1373 (idlwave-shell-delete-temp-files)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1374 (idlwave-shell-display-line nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1375 (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
1376 (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
1377 (idlwave-shell-kill-buffer idlwave-shell-bp-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1378 (idlwave-shell-kill-buffer idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1379 ;; (idlwave-shell-kill-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1380 (and (get-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1381 (bury-buffer (get-buffer (idlwave-shell-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1382 (run-hooks 'idlwave-shell-cleanup-hook))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1383
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1384 (defun idlwave-shell-kill-buffer (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1385 "Kill buffer BUF if it exists."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1386 (if (setq buf (get-buffer buf))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1387 (kill-buffer buf)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1388
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1389 (defun idlwave-shell-kill-shell-buffer-confirm ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1390 (when (idlwave-shell-is-running)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1391 (ding)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1392 (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
1393 (error "Abort"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1394 (message "Killing buffer *idl* and the associated process")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1395
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1396 (defun idlwave-shell-window (n)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1397 "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
1398 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
1399 (interactive "P")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1400 (let ((n (if n (prefix-numeric-value n) 0)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1401 (idlwave-shell-send-command
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1402 (apply 'format "window,%d,xs=%d,ys=%d"
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1403 n idlwave-shell-graphics-window-size))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1404
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1405 (defun idlwave-shell-resync-dirs ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1406 "Resync the buffer's idea of the current directory stack.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1407 This command queries IDL with the command bound to
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1408 `idlwave-shell-dirstack-query' (default \"printd\"), reads the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1409 output for the new directory stack."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1410 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1411 (idlwave-shell-send-command idlwave-shell-dirstack-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1412 'idlwave-shell-filter-directory
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1413 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1414
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1415 (defun idlwave-shell-retall (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1416 "Return from the entire calling stack."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1417 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1418 (idlwave-shell-send-command "retall"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1419
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1420 (defun idlwave-shell-closeall (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1421 "Close all open files."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1422 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1423 (idlwave-shell-send-command "close,/all"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1424
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1425 (defun idlwave-shell-quit (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1426 "Exit the idl process after confirmation.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1427 With prefix ARG, exit without confirmation."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1428 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1429 (if (not (idlwave-shell-is-running))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1430 (error "Shell is not running")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1431 (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
1432 (condition-case nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1433 (idlwave-shell-send-command "exit")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1434 (error nil)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1435
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1436 (defun idlwave-shell-reset (&optional hidden)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1437 "Reset IDL. Return to main level and destroy the leaftover variables.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1438 This issues the following commands:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1439 RETALL
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1440 WIDGET_CONTROL,/RESET
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1441 CLOSE, /ALL
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1442 HEAP_GC, /VERBOSE"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1443 ;; OBJ_DESTROY, OBJ_VALID() FIXME: should this be added?
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1444 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1445 (message "Resetting IDL")
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1446 (setq idlwave-shell-calling-stack-index 0)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1447 (idlwave-shell-send-command "retall" nil hidden)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1448 (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
1449 (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
1450 ;; (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
1451 (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
1452 (idlwave-shell-display-line nil))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1453
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1454 (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
1455 ;; 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
1456 (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
1457 (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
1458 (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
1459 dirs sysdir)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
1460 (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
1461 (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
1462 (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
1463 (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
1464 (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
1465 (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
1466 (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
1467 (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
1468
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1469 (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
1470 "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
1471 (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
1472 (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
1473 sep sep-re file type spec specs name cs key keys class entry)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1474 ;; 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
1475 (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
1476 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
1477 ;; 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
1478 (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
1479 "^>>>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
1480 text)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1481 (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
1482 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
1483 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
1484 ;; 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
1485 (setq sep "@" sep-re "@ *" text "")
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1486 (message "Routine Info warning: No match for BEGIN line"))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1487 (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
1488 (setq text (substring text 0 (match-beginning 0)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1489 (message "Routine Info warning: No match for END line"))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1490 (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
1491 ;; 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
1492 (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
1493 ;; 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
1494 (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
1495 (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
1496 (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
1497 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
1498 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
1499 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
1500 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
1501 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
1502 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
1503 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
1504 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
1505 (not (string-match "\\` *\\'" key)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1506 (mapcar 'list
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1507 (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
1508 (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
1509 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
1510 file (if (equal file "") nil file)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1511 keys (mapcar (lambda (x)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1512 (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
1513 ;; 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
1514 (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
1515 ;; 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
1516 ;; 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
1517 ;; 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
1518 ;; (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
1519 ;; (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
1520
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1521 ;; 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
1522 ;; assuming that if the buffer stuff differs, it is a "new"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1523 ;; version.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1524 ;; 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
1525 ;; but I think frequently a user might have several versions of
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1526 ;; the same function in different programs, and in this case the
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1527 ;; 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
1528 ;; 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
1529
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1530 (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
1531 ((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
1532 ;; 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
1533 (or t (null file)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1534 (not (idlwave-rinfo-assq name 'pro class
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1535 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
1536 ;; FIXME: is it OK to make the library routines dominate?
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1537 ;;(not (idlwave-rinfo-assq name 'pro class
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1538 ;; 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
1539 )
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1540 (setq entry (list name 'pro class (cons 'compiled file) cs keys))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1541 (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
1542 (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
1543 (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
1544
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1545 ((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
1546 ;; 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
1547 (or t (not file)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1548 (not (idlwave-rinfo-assq name 'fun class
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1549 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
1550 ;; FIXME: is it OK to make the library routines dominate?
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1551 ;; (not (idlwave-rinfo-assq name 'fun class
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1552 ;; 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
1553 )
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1554 (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
1555 (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
1556 (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
1557 (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
1558 ;; 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
1559 (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
1560 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
1561
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1562 (defun idlwave-shell-filter-directory ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1563 "Get the current directory from `idlwave-shell-command-output'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1564 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
1565 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1566 (set-buffer (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1567 (if (string-match "Current Directory: *\\(\\S-*\\) *$"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1568 idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1569 (let ((dir (substring idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1570 (match-beginning 1) (match-end 1))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1571 (message "Setting Emacs wd to %s" dir)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1572 (setq idlwave-shell-default-directory dir)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1573 (setq default-directory (file-name-as-directory dir))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1574
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1575 (defun idlwave-shell-complete (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1576 "Do completion in the idlwave-shell buffer.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1577 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
1578 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
1579 keywords."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1580 ;;FIXME: batch files?
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1581 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1582 (let (cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1583 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1584 ((setq cmd (idlwave-shell-executive-command))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1585 ;; 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
1586 (if (member (upcase cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1587 '(".R" ".RU" ".RUN" ".RN" ".RNE" ".RNEW"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1588 ".COM" ".COMP" ".COMPI" ".COMPIL" ".COMPILE"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1589 ;; This command expects file names
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1590 (idlwave-shell-complete-filename)))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1591 ((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
1592 (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
1593 (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
1594 (let ((case-fold-search t))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1595 (not (looking-at ".*obj_new"))))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1596 ;; In a string, could be a file name to here
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1597 (idlwave-shell-complete-filename)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1598 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1599 ;; 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
1600 (idlwave-complete arg)))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1601
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1602 (defun idlwave-shell-complete-filename (&optional arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1603 "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
1604 We assume that we are after a file name when completing one of the
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1605 args of an executive .run, .rnew or .compile. Also, in a string
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1606 constant we complete file names. Otherwise return nil, so that
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1607 other completion functions can do thier work."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1608 (let* ((comint-file-name-chars idlwave-shell-file-name-chars)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1609 (completion-ignore-case (default-value 'completion-ignore-case)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1610 (comint-dynamic-complete-filename)))
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-executive-command ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1613 "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
1614 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1615 (idlwave-beginning-of-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1616 (if (looking-at "[ \t]*\\([.][^ \t\n\r]*\\)")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1617 (match-string 1))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1618
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1619 (defun idlwave-shell-filename-string ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1620 "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
1621 (let ((limit (save-excursion (beginning-of-line) (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1622 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1623 ;; Skip backwards over file name chars
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1624 (skip-chars-backward idlwave-shell-file-name-chars limit)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1625 ;; Check of the next char is a string delimiter
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1626 (memq (preceding-char) '(?\' ?\")))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1627
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1628 ;;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1629 ;;; This section contains code for debugging IDL programs. --------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1630 ;;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1631
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1632 (defun idlwave-shell-redisplay (&optional hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1633 "Tries to resync the display with where execution has stopped.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1634 Issues a \"help,/trace\" command followed by a call to
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1635 `idlwave-shell-display-line'. Also updates the breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1636 overlays."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1637 (interactive)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1638 (setq idlwave-shell-calling-stack-index 0)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1639 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1640 "help,/trace"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1641 '(idlwave-shell-display-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1642 (idlwave-shell-pc-frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1643 hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1644 (idlwave-shell-bp-query))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1645
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1646 (defun idlwave-shell-display-level-in-calling-stack (&optional hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1647 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1648 "help,/trace"
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1649 `(progn
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1650 ;; 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
1651 (setq idlwave-shell-calling-stack-index
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1652 ,idlwave-shell-calling-stack-index)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1653 ;; 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
1654 (idlwave-shell-parse-stack-and-display))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1655 hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1656
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1657 (defun idlwave-shell-parse-stack-and-display ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1658 (let* ((lines (delete "" (idlwave-split-string
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1659 idlwave-shell-command-output "^%")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1660 (stack (delq nil (mapcar 'idlwave-shell-parse-line lines)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1661 (nmax (1- (length stack)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1662 (nmin 0) message)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1663 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1664 ((< 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
1665 (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
1666 (ding)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
1667 (message "Problem with calling stack"))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1668 ((> idlwave-shell-calling-stack-index nmax)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1669 (ding)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1670 (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
1671 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
1672 (- nmax))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1673 ((< idlwave-shell-calling-stack-index nmin)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1674 (ding)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1675 (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
1676 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
1677 (- nmin)))))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1678 (setq idlwave-shell-calling-stack-routine
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1679 (nth 2 (nth idlwave-shell-calling-stack-index stack)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1680 (idlwave-shell-display-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1681 (nth idlwave-shell-calling-stack-index stack))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1682 (message (or message
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1683 (format "In routine %s (stack level %d)"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1684 idlwave-shell-calling-stack-routine
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1685 (- idlwave-shell-calling-stack-index))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1686
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1687 (defun idlwave-shell-stack-up ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1688 "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
1689 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1690 (incf idlwave-shell-calling-stack-index)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1691 (idlwave-shell-display-level-in-calling-stack 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1692 (defun idlwave-shell-stack-down ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1693 "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
1694 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1695 (decf idlwave-shell-calling-stack-index)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1696 (idlwave-shell-display-level-in-calling-stack 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1697
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1698 (defun idlwave-shell-goto-frame (&optional frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1699 "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
1700 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
1701 used. Does nothing if the resulting frame is nil."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1702 (if frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1703 (setq frame (idlwave-shell-pc-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1704 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1705 (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
1706 (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
1707 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1708 (goto-line (nth 1 frame)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1709
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1710 (defun idlwave-shell-pc-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1711 "Returns the frame for IDL execution."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1712 (and idlwave-shell-halt-frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1713 (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
1714 (nth 1 idlwave-shell-halt-frame)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1715 (nth 2 idlwave-shell-halt-frame))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1716
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1717 (defun idlwave-shell-valid-frame (frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1718 "Check that frame is for an existing file."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1719 (file-readable-p (car frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1720
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1721 (defun idlwave-shell-display-line (frame &optional col)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1722 "Display FRAME file in other window with overlay arrow.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1723
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1724 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
1725 If FRAME is nil then remove overlay."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1726 (if (not frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1727 ;; Remove stop-line overlay from old position
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1728 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1729 (setq overlay-arrow-string nil)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1730 (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
1731 (setq idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1732 (if idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1733 (delete-overlay idlwave-shell-stop-line-overlay)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1734 (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
1735 ;; 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
1736 ;; have never encountered this one.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1737 (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
1738 ;;;
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1739 ;;; buffer : the buffer to display a line in.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1740 ;;; select-shell: current buffer is the shell.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1741 ;;;
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1742 (setq idlwave-shell-mode-line-info
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1743 (if (nth 2 frame)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1744 (format "[%d:%s]"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1745 (- idlwave-shell-calling-stack-index)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
1746 (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
1747 (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
1748 (select-shell (equal (buffer-name) (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1749 window pos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1750
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1751 ;; First make sure the shell window is visible
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1752 (idlwave-display-buffer (idlwave-shell-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1753 nil (idlwave-shell-shell-frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1754
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1755 ;; 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
1756 (setq window (idlwave-display-buffer buffer
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1757 nil (idlwave-shell-source-frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1758
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1759 ;; Enter the buffer and mark the line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1760 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1761 (set-buffer buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1762 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1763 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1764 (goto-line (nth 1 frame))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1765 (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
1766 (setq idlwave-shell-is-stopped t)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1767 (if idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1768 ;; Move overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1769 (move-overlay idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1770 (point) (save-excursion (end-of-line) (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1771 (current-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1772 ;; 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
1773 (if idlwave-shell-mark-stop-line
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1774 (setq overlay-arrow-string idlwave-shell-overlay-arrow))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1775 (or overlay-arrow-position ; create the marker if necessary
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1776 (setq overlay-arrow-position (make-marker)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1777 (set-marker overlay-arrow-position (point) buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1778
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1779 ;; 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
1780 (if (or (< pos (point-min)) (> pos (point-max)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1781 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1782 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1783 (goto-char pos)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1784
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1785 ;; 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
1786 (if col (move-to-column col))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1787 (setq pos (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1788
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1789 ;; Make sure pos is really displayed in the window.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1790 (set-window-point window pos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1791
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1792 ;; If we came from the shell, go back there. Otherwise select
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1793 ;; the window where the error is displayed.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1794 (if (and (equal (buffer-name) (idlwave-shell-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1795 (not select-shell))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1796 (select-window window))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1797
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1798
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1799 (defun idlwave-shell-step (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1800 "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
1801 (interactive "p")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1802 (or (not arg) (< arg 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1803 (setq arg 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1804 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1805 (concat ".s " (if (integerp arg) (int-to-string arg) arg))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1806
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1807 (defun idlwave-shell-stepover (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1808 "Stepover one source line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1809 If given prefix argument ARG, step ARG source lines.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1810 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
1811 (interactive "p")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1812 (or (not arg) (< arg 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1813 (setq arg 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1814 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1815 (concat ".so " (if (integerp arg) (int-to-string arg) arg))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1816
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1817 (defun idlwave-shell-break-here (&optional count cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1818 "Set breakpoint at current line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1819
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1820 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
1821 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
1822 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
1823 the statement count times.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1824
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1825 Optional argument CMD is a list or function to evaluate upon reaching
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1826 the breakpoint."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1827
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1828 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1829 (if (listp count)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1830 (setq count nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1831 (idlwave-shell-set-bp
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1832 ;; Create breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1833 (idlwave-shell-bp (idlwave-shell-current-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1834 (list count cmd)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1835 (idlwave-shell-current-module))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1836
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1837 (defun idlwave-shell-set-bp-check (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1838 "Check for failure to set breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1839 This is run on `idlwave-shell-post-command-hook'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1840 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
1841 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
1842 ;; Scan for message
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1843 (if (and idlwave-shell-command-output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1844 (string-match "% BREAKPOINT: *Unable to find code"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1845 idlwave-shell-command-output))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1846 ;; Offer to recompile
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1847 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1848 (if (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1849 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1850 (y-or-n-p
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1851 (concat "Okay to recompile file "
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1852 (idlwave-shell-bp-get bp 'file) " ")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1853 ;; Recompile
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1854 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1855 ;; Clean up before retrying
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1856 (idlwave-shell-command-failure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1857 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1858 (concat ".run " (idlwave-shell-bp-get bp 'file)) nil nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1859 ;; Try setting breakpoint again
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1860 (idlwave-shell-set-bp bp))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1861 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1862 (message "Unable to set breakpoint.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1863 (idlwave-shell-command-failure)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1864 )
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1865 ;; return non-nil if no error found
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1866 nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1867 'okay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1868
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1869 (defun idlwave-shell-command-failure ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1870 "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
1871 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
1872 that detects the failure of a command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1873 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
1874 breakpoint can not be set."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1875 ;; Clear pending commands
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1876 (setq idlwave-shell-pending-commands nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1877
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1878 (defun idlwave-shell-cont ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1879 "Continue executing."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1880 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1881 (idlwave-shell-send-command ".c" '(idlwave-shell-redisplay 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1882
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1883 (defun idlwave-shell-go ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1884 "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
1885 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1886 (idlwave-shell-send-command ".go" '(idlwave-shell-redisplay 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1887
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1888 (defun idlwave-shell-return ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1889 "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
1890 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1891 (idlwave-shell-send-command ".return" '(idlwave-shell-redisplay 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1892
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1893 (defun idlwave-shell-skip ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1894 "Run .SKIP (skip one line, then step)."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1895 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1896 (idlwave-shell-send-command ".skip" '(idlwave-shell-redisplay 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1897
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1898 (defun idlwave-shell-clear-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1899 "Clear breakpoint BP.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1900 Clears in IDL and in `idlwave-shell-bp-alist'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1901 (let ((index (idlwave-shell-bp-get bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1902 (if index
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1903 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1904 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1905 (concat "breakpoint,/clear,"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1906 (if (integerp index) (int-to-string index) index)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1907 (idlwave-shell-bp-query)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1908
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1909 (defun idlwave-shell-current-frame ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1910 "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
1911 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
1912 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1913 ;; In IDL shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1914 (idlwave-shell-pc-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1915 ;; In source
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1916 (list (idlwave-shell-file-name (buffer-file-name))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1917 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1918 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1919 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1920 (beginning-of-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1921 (1+ (count-lines 1 (point))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1922
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1923 (defun idlwave-shell-current-module ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1924 "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
1925 Returns nil if unable to obtain a module name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1926 (if (eq (current-buffer) (get-buffer (idlwave-shell-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1927 ;; In IDL shell
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1928 (nth 2 idlwave-shell-halt-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1929 ;; In pro file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1930 (save-restriction
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1931 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1932 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1933 (if (idlwave-prev-index-position)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1934 (upcase (idlwave-unit-name)))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1935
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1936 (defun idlwave-shell-clear-current-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1937 "Remove breakpoint at current line.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1938 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
1939 at a breakpoint."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1940 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1941 (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
1942 (if bp (idlwave-shell-clear-bp bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1943 ;; Try moving to beginning of statement
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1944 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1945 (idlwave-shell-goto-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1946 (idlwave-beginning-of-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1947 (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
1948 (if bp (idlwave-shell-clear-bp bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1949 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1950 (message "Cannot identify breakpoint for this line"))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1951
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1952 (defun idlwave-shell-to-here ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1953 "Set a breakpoint with count 1 then continue."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1954 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1955 (idlwave-shell-break-here 1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1956 (idlwave-shell-cont))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1957
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1958 (defun idlwave-shell-break-in (&optional module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1959 "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
1960 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
1961 for the first line of the corresponding module."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1962 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1963 ;; get the identifier
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1964 (let (module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1965 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1966 (skip-chars-backward "a-zA-Z0-9_$")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1967 (if (looking-at idlwave-identifier)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1968 (setq module (match-string 0))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1969 (error "No identifier at point")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1970 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1971 idlwave-shell-sources-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1972 `(progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1973 (idlwave-shell-sources-filter)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1974 (idlwave-shell-set-bp-in-module ,module))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1975 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1976
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1977 (defun idlwave-shell-set-bp-in-module (module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1978 "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
1979 contains an entry for that module."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1980 (let ((source-file (car-safe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1981 (cdr-safe
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1982 (assoc (upcase module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1983 idlwave-shell-sources-alist))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1984 buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1985 (if (or (not source-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1986 (not (file-regular-p source-file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1987 (not (setq buf
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1988 (or (idlwave-get-buffer-visiting source-file)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1989 (find-file-noselect source-file)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1990 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1991 (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
1992 module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1993 (beep))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1994 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1995 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1996 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1997 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1998 (let ((case-fold-search t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1999 (if (re-search-forward
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2000 (concat "^[ \t]*\\(pro\\|function\\)[ \t]+"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2001 (downcase module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2002 "[ \t\n,]") nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2003 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2004 (goto-char (match-beginning 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2005 (message "Setting breakpoint for module %s" module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2006 (idlwave-shell-break-here))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2007 (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
2008 (beep))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2009
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2010 (defun idlwave-shell-up ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2011 "Run to end of current block.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2012 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
2013 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2014 (if (idlwave-shell-pc-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2015 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2016 (idlwave-shell-goto-frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2017 ;; find end of subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2018 (let ((eos (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2019 (idlwave-beginning-of-subprogram)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2020 (idlwave-forward-block)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2021 (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2022 (idlwave-backward-up-block -1)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2023 ;; 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
2024 ;; 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
2025 ;; 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
2026 (idlwave-next-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2027 (idlwave-end-of-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2028 ;; Make sure we are not beyond subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2029 (if (< (point) eos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2030 ;; okay
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 ;; Move back inside subprogram
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2033 (goto-char eos)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2034 (idlwave-previous-statement))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2035 (idlwave-shell-to-here)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2036
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2037 (defun idlwave-shell-out ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2038 "Attempt to run until this procedure exits.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2039 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
2040 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2041 (idlwave-shell-send-command (concat ".o")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2042
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2043 (defun idlwave-shell-help-expression (arg)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2044 "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
2045 (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
2046 (idlwave-shell-print arg 'help))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2047
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2048 (defun idlwave-shell-mouse-print (event)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2049 "Call `idlwave-shell-print' at the mouse position."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2050 (interactive "e")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2051 (mouse-set-point event)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2052 (idlwave-shell-print nil nil 'mouse))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2053
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2054 (defun idlwave-shell-mouse-help (event)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2055 "Call `idlwave-shell-print' at the mouse position."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2056 (interactive "e")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2057 (mouse-set-point event)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2058 (idlwave-shell-print nil 'help 'mouse))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2059
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2060 (defun idlwave-shell-print (arg &optional help mouse)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2061 "Print current expression. With HELP, show help on expression.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2062 An expression is an identifier plus 1 pair of matched parentheses
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2063 directly following the identifier - an array or function
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2064 call. Alternatively, an expression is the contents of any matched
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2065 parentheses when the open parentheses is not directly preceded by an
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2066 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
2067 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
2068 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
2069
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2070 With prefix arg ARG, or when called from the shell buffer, prompt
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2071 for an expression."
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2072 (interactive "P")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2073 (save-excursion
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2074 (let (expr beg end cmd)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2075 (if (and (not mouse)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2076 (or arg (eq major-mode 'idlwave-shell-mode)))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2077 (setq expr (read-string "Expression: "))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2078 (idlwave-with-special-syntax1
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2079 ;; 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
2080 (if (looking-at "\\<\\|(")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2081 ;; 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
2082 ;; 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
2083 (if (looking-at "\\>")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2084 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2085 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2086 (if (looking-at "\\>")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2087 ;; 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
2088 ;; function expression.
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2089 (backward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2090 ;; Move to end of expression
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2091 (setq beg (point))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2092 (forward-sexp)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2093 (while (looking-at "\\>[[(]\\|\\.")
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2094 ;; an array
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2095 (forward-sexp))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2096 (setq end (point))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2097 (setq expr (buffer-substring beg end))))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2098 (when (and beg end idlwave-shell-expression-overlay)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2099 (move-overlay idlwave-shell-expression-overlay beg end
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2100 (current-buffer))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2101 (add-hook 'pre-command-hook 'idlwave-shell-delete-expression-overlay))
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2102 (if (and (integerp idlwave-shell-calling-stack-index)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2103 (> idlwave-shell-calling-stack-index 0))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2104 (setq cmd (idlwave-retrieve-expression-from-level
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2105 expr
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2106 idlwave-shell-calling-stack-index
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2107 idlwave-shell-calling-stack-routine
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2108 help))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2109 (setq cmd (concat (if help "help," "print,") expr)))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2110 (if idlwave-shell-print-expression-function
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2111 (idlwave-shell-send-command
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2112 cmd
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2113 (list idlwave-shell-print-expression-function expr)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2114 'hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2115 (idlwave-shell-recenter-shell-window)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2116 (idlwave-shell-send-command cmd)))))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2117
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2118 (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
2119 "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
2120
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2121 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
2122 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
2123 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
2124 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
2125 *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
2126 level.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2127
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2128 Since this function depends upon the undocumented IDL routine routine_names,
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2129 there is no guarantie that this will work with future versions of IDL."
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2130 (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
2131 (fetch (- 0 level))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2132 (start 0)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2133 var tvar fetch-vars pre post)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2134
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2135 ;; FIXME: In the following we try to find the variables in expression
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2136 ;; This is quite empirical - I don't know in what situations this will
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2137 ;; break. We will look for identifiers and exclude cases where we
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2138 ;; know it is not a variable. To distinguish array references from
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2139 ;; function calls, we require that arrays use [] instead of ()
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2140
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2141 (while (string-match
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2142 "\\(\\`\\|[^a-zA-Z0-9$_]\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)\\([^a-zA-Z0-9$_]\\|\\'\\)" expr start)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2143 (setq var (match-string 2 expr)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2144 tvar (concat prefix var)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2145 start (match-beginning 2)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2146 pre (substring expr 0 (match-beginning 2))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2147 post (substring expr (match-end 2)))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2148 (cond
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2149 ;; Exclude identifiers which are not variables
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2150 ((string-match ",[ \t]*/\\'" pre)) ;; a `/' KEYWORD
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2151 ((and (string-match "[,(][ \t]*\\'" pre)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2152 (string-match "\\`[ \t]*=" post))) ;; a `=' KEYWORD
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2153 ((string-match "\\`(" post)) ;; a function
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2154 ((string-match "->[ \t]*\\'" pre)) ;; a method
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2155 ((string-match "\\.\\'" pre)) ;; structure member
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2156 (t ;; seems to be a variable - arrange to get it and replace
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2157 ;; its name in the expression with the temproary name.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2158 (push (cons var tvar) fetch-vars)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2159 (setq expr (concat pre tvar post)))))
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2160 ;; 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
2161 ;; and then prints the expression.
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2162 (concat
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2163 (mapconcat
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2164 (lambda (x)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2165 (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
2166 (nreverse fetch-vars)
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2167 " & ")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2168 (if idlwave-shell-print-expression-function " & " "\n")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2169 (if help "help, " "print, ")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2170 expr
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2171 (format " ; [-%d:%s]" level routine))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2172
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2173 (defun idlwave-shell-delete-expression-overlay ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2174 (condition-case nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2175 (if idlwave-shell-expression-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2176 (delete-overlay idlwave-shell-expression-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2177 (error nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2178 (remove-hook 'pre-command-hook 'idlwave-shell-delete-expression-overlay))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2179
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2180 (defvar idlwave-shell-bp-alist nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2181 "Alist of breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2182 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
2183
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2184 The car is the frame for the breakpoint:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2185 file - full path file name.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2186 line - line number of breakpoint - integer.
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 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
2189 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
2190 module - the module for breakpoint internal to IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2191
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2192 Remaining elements of the cdr:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2193 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
2194 contains two items:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2195
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2196 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
2197 the breakpoint is cleared and removed from the alist.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2198 command - command to execute when breakpoint is reached, either a
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2199 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
2200 list to be evaluated with `eval'.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2201
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2202 (defun idlwave-shell-run-region (beg end &optional n)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2203 "Compile and run the region using the IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2204 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
2205 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
2206 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
2207 problem with begin-end blocks extending over multiple
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2208 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
2209 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
2210
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2211 If there is a prefix argument, display IDL process."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2212 (interactive "r\nP")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2213 (let ((oldbuf (current-buffer)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2214 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2215 (set-buffer (idlwave-find-file-noselect
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2216 idlwave-shell-temp-pro-file 'tmp))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2217 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2218 (insert-buffer-substring oldbuf beg end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2219 (if (not (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2220 (idlwave-previous-statement)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2221 (idlwave-look-at "\\<end\\>")))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2222 (insert "\nend\n"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2223 (save-buffer 0)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2224 (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2225 (if n
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2226 (idlwave-display-buffer (idlwave-shell-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2227 nil (idlwave-shell-shell-frame))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2228
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2229 (defun idlwave-shell-evaluate-region (beg end &optional n)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2230 "Send region to the IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2231 If there is a prefix argument, display IDL process.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2232 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
2233 `idlwave-shell-run-region' for this."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2234 (interactive "r\nP")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2235 (idlwave-shell-send-command (buffer-substring beg end))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2236 (if n
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2237 (idlwave-display-buffer (idlwave-shell-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2238 nil (idlwave-shell-shell-frame))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2239
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2240 (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
2241 "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
2242 (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
2243 (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
2244 (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
2245 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
2246 (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
2247 (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
2248 (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
2249 (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
2250 (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
2251 (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
2252 (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
2253 (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
2254
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2255 (defun idlwave-display-buffer (buf not-this-window-p &optional frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2256 (if (or (< emacs-major-version 20)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2257 (and (= emacs-major-version 20)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2258 (< emacs-minor-version 3)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2259 ;; Only two args.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2260 (display-buffer buf not-this-window-p)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2261 ;; Three ares possible.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2262 (display-buffer buf not-this-window-p frame)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2263
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2264 (defvar idlwave-shell-bp-buffer " *idlwave-shell-bp*"
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2265 "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
2266
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2267 (defun idlwave-shell-bp-query ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2268 "Reconcile idlwave-shell's breakpoint list with IDL's.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2269 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
2270 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2271 (idlwave-shell-send-command idlwave-shell-bp-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2272 'idlwave-shell-filter-bp
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2273 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2274
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2275 (defun idlwave-shell-bp-get (bp &optional item)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2276 "Get a value for a breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2277 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
2278 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
2279 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
2280 'data returns a list of 'count and 'cmd.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2281 Defaults to 'index."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2282 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2283 ;; Frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2284 ((eq item 'line) (nth 1 (car bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2285 ((eq item 'file) (nth 0 (car bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2286 ;; idlwave-shell breakpoint data
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2287 ((eq item 'data) (cdr (cdr bp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2288 ((eq item 'count) (nth 0 (cdr (cdr bp))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2289 ((eq item 'cmd) (nth 1 (cdr (cdr bp))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2290 ;; IDL breakpoint info
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2291 ((eq item 'module) (nth 1 (car (cdr bp))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2292 ;; index - default
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2293 (t (nth 0 (car (cdr bp))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2294
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2295 (defun idlwave-shell-filter-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2296 "Get the breakpoints from `idlwave-shell-command-output'.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2297 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
2298 from previous breakpoint list."
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 (get-buffer-create idlwave-shell-bp-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2301 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2302 (insert idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2303 (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
2304 (let ((old-bp-alist idlwave-shell-bp-alist)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2305 file line index module)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2306 (setq idlwave-shell-bp-alist (list nil))
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2307 (when (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2308 ;; 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
2309 ;; Parse breakpoint lines.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2310 ;; Breakpoints have the form:
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2311 ;; Index Module Line File
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2312 ;; All seperated by whitespace.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2313 ;; Module may be missing if the file is not compiled.
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2314 ;;
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2315 (while (re-search-forward
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2316 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)" nil t)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2317 (setq index (match-string 1)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2318 module (match-string 2)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2319 line (string-to-int (match-string 3))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2320 file (idlwave-shell-file-name (match-string 4)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2321 ;; 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
2322 (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
2323 (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
2324 (list
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2325 (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
2326 ;; 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
2327 nil nil))))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2328 (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
2329 ;; Update count, commands of breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2330 (mapcar 'idlwave-shell-update-bp old-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2331 ;; Update the breakpoint overlays
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2332 (idlwave-shell-update-bp-overlays)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2333 ;; Return the new list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2334 idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2335
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2336 (defun idlwave-shell-update-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2337 "Update BP data in breakpoint list.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2338 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
2339 (let ((match (assoc (car bp) idlwave-shell-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2340 (if match (setcdr (cdr match) (cdr (cdr bp))))))
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-set-bp-data (bp data)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2343 "Set the data of BP to DATA."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2344 (setcdr (cdr bp) data))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2345
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2346 (defun idlwave-shell-bp (frame &optional data module)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2347 "Create a breakpoint structure containing FRAME and DATA. Second
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2348 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
2349 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
2350 attempting match a breakpoint in `idlwave-shell-bp-alist'."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2351 (cons frame (cons (list nil module) data)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2352
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2353 (defvar idlwave-shell-old-bp nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2354 "List of breakpoints previous to setting a new breakpoint.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2355
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2356 (defun idlwave-shell-sources-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2357 "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
2358 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
2359 Otherwise return the filename in bp."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2360 (let*
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2361 ((bp-file (idlwave-shell-bp-get bp 'file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2362 (bp-module (idlwave-shell-bp-get bp 'module))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2363 (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
2364 (if (and internal-file-list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2365 (equal bp-file (nth 0 internal-file-list)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2366 (nth 1 internal-file-list)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2367 bp-file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2368
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2369 (defun idlwave-shell-set-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2370 "Try to set a breakpoint BP.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2371
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2372 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
2373 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
2374 a statement.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2375 Determines IDL's internal representation for the breakpoint which may
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2376 have occured at a different line then used with the breakpoint
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2377 command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2378
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2379 ;; Get and save the old breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2380 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2381 idlwave-shell-bp-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2382 '(progn
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2383 (idlwave-shell-filter-bp)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2384 (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
2385 'hide)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2386 ;; Get sources for IDL compiled procedures followed by setting
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2387 ;; breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2388 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2389 idlwave-shell-sources-query
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2390 `(progn
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2391 (idlwave-shell-sources-filter)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2392 (idlwave-shell-set-bp2 (quote ,bp)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2393 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2394
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2395 (defun idlwave-shell-set-bp2 (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2396 "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
2397 Use the count argument with IDLs breakpoint command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2398 We treat a count of 1 as a temporary breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2399 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
2400 only after reaching the statement count times."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2401 (let*
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2402 ((arg (idlwave-shell-bp-get bp 'count))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2403 (key (cond
41608
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2404 ((not (and arg (numberp arg))) "")
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2405 ((= arg 1)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2406 ",/once")
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2407 ((> arg 1)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2408 (format ",after=%d" arg))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2409 (line (idlwave-shell-bp-get bp 'line)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2410 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2411 (concat "breakpoint,'"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2412 (idlwave-shell-sources-bp bp) "',"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2413 (if (integerp line) (setq line (int-to-string line)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2414 key)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2415 ;; 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
2416 `(progn
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2417 (if (idlwave-shell-set-bp-check (quote ,bp))
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2418 (idlwave-shell-set-bp3 (quote ,bp))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2419 ;; do not hide output
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2420 nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2421 'preempt)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2422
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2423 (defun idlwave-shell-set-bp3 (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2424 "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
2425 (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
2426 `(progn
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2427 (idlwave-shell-filter-bp)
45db352a0971 Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents: 38436
diff changeset
2428 (idlwave-shell-new-bp (quote ,bp)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2429 'hide
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2430 'preempt))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2431
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2432 (defun idlwave-shell-find-bp (frame)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2433 "Return breakpoint from `idlwave-shell-bp-alist' for frame.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2434 Returns nil if frame not found."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2435 (assoc frame idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2436
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2437 (defun idlwave-shell-new-bp (bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2438 "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
2439 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
2440 the line number used with the IDL breakpoint command.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2441 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
2442 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
2443 (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
2444 (bpl idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2445 (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
2446 (setq bpl (cdr bpl))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2447 (if (and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2448 (not bpl)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2449 ;; No additional breakpoint.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2450 ;; 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
2451 (setq bpl (assoc (car bp) idlwave-shell-bp-alist)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2452 (setq bpl (list bpl)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2453 (if (and bpl
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2454 (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
2455 (idlwave-shell-bp-get bp 'file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2456 ;; Got the breakpoint - add count, command to it.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2457 ;; 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
2458 ;; not done for bpl.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2459 (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
2460 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2461 (message "Failed to identify breakpoint in IDL"))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2462
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2463 (defvar idlwave-shell-bp-overlays nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2464 "List of overlays marking breakpoints")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2465
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2466 (defun idlwave-shell-update-bp-overlays ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2467 "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
2468 Existing overlays are recycled, in order to minimize consumption."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2469 (when idlwave-shell-mark-breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2470 (let ((bp-list idlwave-shell-bp-alist)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2471 (ov-list idlwave-shell-bp-overlays)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2472 ov bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2473 ;; Delete the old overlays from their buffers
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2474 (while (setq ov (pop ov-list))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2475 (delete-overlay ov))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2476 (setq ov-list idlwave-shell-bp-overlays
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2477 idlwave-shell-bp-overlays nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2478 (while (setq bp (pop bp-list))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2479 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2480 (idlwave-shell-goto-frame (car bp))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2481 (let* ((end (progn (end-of-line 1) (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2482 (beg (progn (beginning-of-line 1) (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2483 (ov (or (pop ov-list)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2484 (idlwave-shell-make-new-bp-overlay))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2485 (move-overlay ov beg end)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2486 (push ov idlwave-shell-bp-overlays)))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2487
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2488 (defvar idlwave-shell-bp-glyph)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2489 (defun idlwave-shell-make-new-bp-overlay ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2490 "Make a new overlay for highlighting breakpoints.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2491 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
2492 (let ((ov (make-overlay 1 1)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2493 (if (featurep 'xemacs)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2494 ;; This is XEmacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2495 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2496 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2497 ((eq (console-type) 'tty)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2498 ;; 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
2499 (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
2500 ((and (memq idlwave-shell-mark-breakpoints '(t glyph))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2501 idlwave-shell-bp-glyph)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2502 ;; use the glyph
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2503 (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
2504 (idlwave-shell-mark-breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2505 ;; 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
2506 (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
2507 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2508 ;; no marking
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2509 nil))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2510 (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
2511 ;; This is Emacs
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2512 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2513 (window-system
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2514 (if (and (memq idlwave-shell-mark-breakpoints '(t glyph))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2515 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
2516 ;; use a glyph
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2517 (let ((string "@"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2518 (put-text-property 0 1
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
2519 'display idlwave-shell-bp-glyph
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2520 string)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2521 (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
2522 (overlay-put ov 'face idlwave-shell-breakpoint-face)))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2523 (idlwave-shell-mark-breakpoints
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2524 ;; 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
2525 (overlay-put ov 'face idlwave-shell-breakpoint-face))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2526 (t
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2527 ;; No marking
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2528 nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2529 ov))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2530
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2531 (defun idlwave-shell-edit-default-command-line (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2532 "Edit the current execute command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2533 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2534 (setq idlwave-shell-command-line-to-execute
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2535 (read-string "IDL> " idlwave-shell-command-line-to-execute)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2536
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2537 (defun idlwave-shell-execute-default-command-line (arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2538 "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
2539 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
2540 `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
2541 (interactive "P")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2542 (if (or (not idlwave-shell-command-line-to-execute)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2543 arg)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2544 (setq idlwave-shell-command-line-to-execute
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2545 (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
2546 (idlwave-shell-reset 'hidden)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2547 (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
2548 '(idlwave-shell-redisplay 'hide)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2549
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2550 (defun idlwave-shell-save-and-run ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2551 "Save file and run it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2552 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
2553 When called from the shell buffer, re-run the file which was last handled by
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2554 one of the save-and-.. commands."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2555 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2556 (idlwave-shell-save-and-action 'run))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2557
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2558 (defun idlwave-shell-save-and-compile ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2559 "Save file and run it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2560 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
2561 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
2562 one of the save-and-.. commands."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2563 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2564 (idlwave-shell-save-and-action 'compile))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2565
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2566 (defun idlwave-shell-save-and-batch ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2567 "Save file and batch it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2568 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
2569 When called from the shell buffer, re-batch the file which was last handled by
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2570 one of the save-and-.. commands."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2571 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2572 (idlwave-shell-save-and-action 'batch))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2573
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2574 (defun idlwave-shell-save-and-action (action)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2575 "Save file and compile it in IDL.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2576 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
2577 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
2578 handled by this command."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2579 ;; Remove the stop overlay.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2580 (if idlwave-shell-stop-line-overlay
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2581 (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
2582 (setq idlwave-shell-is-stopped nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2583 (setq overlay-arrow-string nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2584 (let (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2585 (cond
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2586 ((eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2587 (save-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2588 (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
2589 (idlwave-shell-last-save-and-action-file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2590 (if (setq buf (idlwave-get-buffer-visiting
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2591 idlwave-shell-last-save-and-action-file))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2592 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2593 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2594 (save-buffer))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2595 (t (setq idlwave-shell-last-save-and-action-file
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2596 (read-file-name "File: ")))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2597 (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
2598 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2599 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2600 (concat (cond ((eq action 'run) ".run ")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2601 ((eq action 'compile) ".compile ")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2602 ((eq action 'batch) "@")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2603 (t (error "Unknown action %s" action)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2604 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
2605 'idlwave-shell-maybe-update-routine-info
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2606 nil)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2607 (idlwave-shell-bp-query))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2608 (let ((msg (format "No such file %s"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2609 idlwave-shell-last-save-and-action-file)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2610 (setq idlwave-shell-last-save-and-action-file nil)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2611 (error msg))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2612
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2613 (defun idlwave-shell-maybe-update-routine-info ()
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2614 "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
2615 (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
2616 (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
2617 (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
2618 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
2619 idlwave-routines)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2620 (idlwave-shell-update-routine-info t)))
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2621
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2622 (defvar idlwave-shell-sources-query "help,/source"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2623 "IDL command to obtain source files for compiled procedures.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2624
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2625 (defvar idlwave-shell-sources-alist nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2626 "Alist of IDL procedure names and compiled source files.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2627 Elements of the alist have the form:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2628
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2629 (module name . (source-file-truename idlwave-internal-filename)).")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2630
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2631 (defun idlwave-shell-sources-query ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2632 "Determine source files for IDL compiled procedures.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2633 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
2634 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2635 (idlwave-shell-send-command idlwave-shell-sources-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2636 'idlwave-shell-sources-filter
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2637 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2638
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2639 (defun idlwave-shell-sources-filter ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2640 "Get source files from `idlwave-shell-sources-query' output.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2641 Create `idlwave-shell-sources-alist' consisting of
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2642 list elements of the form:
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2643 (module name . (source-file-truename idlwave-internal-filename))."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2644 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2645 (set-buffer (get-buffer-create idlwave-shell-bp-buffer))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2646 (erase-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2647 (insert idlwave-shell-command-output)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2648 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2649 (let (cpro cfun)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2650 (if (re-search-forward "Compiled Procedures:" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2651 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2652 (forward-line) ; Skip $MAIN$
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2653 (setq cpro (point))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2654 (if (re-search-forward "Compiled Functions:" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2655 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2656 (setq cfun (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2657 (setq idlwave-shell-sources-alist
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2658 (append
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2659 ;; compiled procedures
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2660 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2661 (beginning-of-line)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2662 (narrow-to-region cpro (point))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2663 (goto-char (point-min))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2664 (idlwave-shell-sources-grep))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2665 ;; compiled functions
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2666 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2667 (widen)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2668 (goto-char cfun)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2669 (idlwave-shell-sources-grep)))))))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2670
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2671 (defun idlwave-shell-sources-grep ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2672 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2673 (let ((al (list nil)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2674 (while (and
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2675 (not (progn (forward-line) (eobp)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2676 (re-search-forward
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2677 "\\s-*\\(\\S-+\\)\\s-+\\(\\S-+\\)" nil t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2678 (nconc al
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2679 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2680 (cons
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2681 (buffer-substring ; name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2682 (match-beginning 1) (match-end 1))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2683 (let ((internal-filename
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2684 (buffer-substring ; source
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2685 (match-beginning 2) (match-end 2))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2686 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2687 (idlwave-shell-file-name internal-filename)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2688 internal-filename))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2689 ))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2690 (cdr al))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2691
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2692
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2693 (defun idlwave-shell-clear-all-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2694 "Remove all breakpoints in IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2695 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2696 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2697 idlwave-shell-bp-query
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2698 '(progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2699 (idlwave-shell-filter-bp)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2700 (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2701 'hide))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2702
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2703 (defun idlwave-shell-list-all-bp ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2704 "List all breakpoints in IDL."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2705 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2706 (idlwave-shell-send-command
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2707 idlwave-shell-bp-query))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2708
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2709 (defvar idlwave-shell-error-last 0
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2710 "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
2711
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2712 (defun idlwave-shell-goto-next-error ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2713 "Move point to next IDL syntax error."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2714 (interactive)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2715 (let (frame col)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2716 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2717 (set-buffer idlwave-shell-error-buffer)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2718 (goto-char idlwave-shell-error-last)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2719 (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
2720 (re-search-forward idlwave-shell-other-error nil t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2721 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2722 (setq frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2723 (list
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2724 (save-match-data
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2725 (idlwave-shell-file-name
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2726 (buffer-substring (match-beginning 1) (match-end 1))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2727 (string-to-int
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2728 (buffer-substring (match-beginning 2)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2729 (match-end 2)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2730 ;; Try to find the column of the error
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2731 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2732 (setq col
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2733 (if (re-search-backward "\\^" nil t)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2734 (current-column)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2735 0)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2736 (setq idlwave-shell-error-last (point)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2737 (if frame
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2738 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2739 (idlwave-shell-display-line frame col))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2740 (beep)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2741 (message "No more errors."))))
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 (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
2744 "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
2745 Otherwise, just expand the file name."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2746 (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
2747 default-directory
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2748 idlwave-shell-default-directory)))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2749 (if idlwave-shell-use-truename
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2750 (file-truename name def-dir)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2751 (expand-file-name name def-dir))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2752
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2753
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2754 ;; Keybindings --------------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2755
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2756 (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
2757 "Keymap for idlwave-mode.")
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2758 (defvar idlwave-shell-mode-prefix-map (make-sparse-keymap))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2759 (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
2760
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2761 ;(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
2762 ;(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
2763 (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
2764 (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
2765 (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
2766 (define-key idlwave-shell-mode-map "\C-c?" 'idlwave-routine-info)
29774
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2767 (define-key idlwave-shell-mode-map "\M-?" 'idlwave-context-help)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2768 (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
2769 (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
2770 (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
2771 (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
2772 (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
2773 (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
2774 (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
2775 'idlwave-shell-debug-map)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2776 (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
2777 (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
2778 (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
2779 (define-key idlwave-mode-map "\C-c\C-x" 'idlwave-shell-send-char)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2780 (define-key idlwave-mode-map
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2781 (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2782 'idlwave-shell-mouse-print)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2783 (define-key idlwave-mode-map
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2784 (if (featurep 'xemacs) [(shift control button2)] [(shift control mouse-2)])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2785 'idlwave-shell-mouse-help)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2786 (define-key idlwave-shell-mode-map
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2787 (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2788 'idlwave-shell-mouse-print)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2789 (define-key idlwave-shell-mode-map
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2790 (if (featurep 'xemacs) [(shift control button2)] [(shift control mouse-2)])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2791 'idlwave-shell-mouse-help)
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2792 (define-key idlwave-shell-mode-map
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2793 (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)])
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2794 '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
2795
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2796
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2797 ;; 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
2798 ;; 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
2799 ;; 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
2800 ;; If `idlwave-shell-debug-modifiers' is non-nil, the second key
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2801 ;; in the list gets bound with the specified modifiers in both
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2802 ;; `idlwave-mode-map' and `idlwave-shell-mode-map'.
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2803
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2804 ;; Used keys: abcdef hi klmnopqrs u wxyz
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2805 ;; Unused keys: g j t v
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2806 (let* ((specs
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2807 '(([(control ?b)] ?b idlwave-shell-break-here)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2808 ([(control ?i)] ?i idlwave-shell-break-in)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2809 ([(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
2810 ([(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
2811 ([(control ?s)] ?s idlwave-shell-step)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2812 ([(control ?n)] ?n idlwave-shell-stepover)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2813 ([(control ?k)] ?k idlwave-shell-skip)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2814 ([(control ?u)] ?u idlwave-shell-up)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2815 ([(control ?o)] ?o idlwave-shell-out)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2816 ([(control ?m)] ?m idlwave-shell-return)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2817 ([(control ?h)] ?h idlwave-shell-to-here)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2818 ([(control ?r)] ?r idlwave-shell-cont)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2819 ([(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
2820 ([(control ?z)] ?z idlwave-shell-reset)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2821 ([(control ?q)] ?q idlwave-shell-quit)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2822 ([(control ?p)] ?p idlwave-shell-print)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2823 ([(??)] ?? idlwave-shell-help-expression)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2824 ([(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
2825 ([( ?@)] ?@ idlwave-shell-save-and-batch)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2826 ([(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
2827 ([(control ?e)] ?e idlwave-shell-run-region)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2828 ([(control ?w)] ?w idlwave-shell-resync-dirs)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2829 ([(control ?l)] ?l idlwave-shell-redisplay)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2830 ([(control ?t)] ?t idlwave-shell-toggle-toolbar)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2831 ([(control up)] up idlwave-shell-stack-up)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2832 ([(control down)] down idlwave-shell-stack-down)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2833 ([(control ?f)] ?f idlwave-shell-window)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2834 (mod (cond ((and idlwave-shell-debug-modifiers
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2835 (listp idlwave-shell-debug-modifiers)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2836 (not (equal '() idlwave-shell-debug-modifiers)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2837 idlwave-shell-debug-modifiers)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2838 (idlwave-shell-activate-alt-keybindings
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2839 '(alt))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2840 (shift (memq 'shift mod))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2841 (mod-noshift (delete 'shift (copy-sequence mod)))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2842 s k1 c2 k2 cmd)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2843 (while (setq s (pop specs))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2844 (setq k1 (nth 0 s)
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2845 c2 (nth 1 s)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2846 cmd (nth 2 s))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2847 (when idlwave-shell-activate-prefix-keybindings
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2848 (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
2849 (when (and mod window-system)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2850 (if (char-or-string-p c2)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2851 (setq k2 (vector (append mod-noshift
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2852 (list (if shift (upcase c2) c2)))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2853 (setq k2 (vector (append mod (list c2)))))
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2854 (define-key idlwave-mode-map k2 cmd)
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2855 (define-key idlwave-shell-mode-map k2 cmd))))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2856
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2857 ;; Enter the prefix map at the two places.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2858 (fset 'idlwave-debug-map idlwave-shell-mode-prefix-map)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2859 (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
2860
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2861 ;; The Menus --------------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2862
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2863 (defvar idlwave-shell-menu-def
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2864 '("Debug"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2865 ["Save and .RUN" idlwave-shell-save-and-run
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2866 (or (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2867 idlwave-shell-last-save-and-action-file)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2868 ["Save and .COMPILE" idlwave-shell-save-and-compile
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2869 (or (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2870 idlwave-shell-last-save-and-action-file)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2871 ["Save and @Batch" idlwave-shell-save-and-batch
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2872 (or (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2873 idlwave-shell-last-save-and-action-file)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2874 ["Goto Next Error" idlwave-shell-goto-next-error t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2875 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2876 ["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
2877 ["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
2878 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2879 ["Set Breakpoint" idlwave-shell-break-here
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2880 (eq major-mode 'idlwave-mode)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2881 ["Break in Module" idlwave-shell-break-in t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2882 ["Clear Breakpoint" idlwave-shell-clear-current-bp t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2883 ["Clear All Breakpoints" idlwave-shell-clear-all-bp t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2884 ["List All Breakpoints" idlwave-shell-list-all-bp t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2885 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2886 ["Step (into)" idlwave-shell-step t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2887 ["Step (over)" idlwave-shell-stepover t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2888 ["Skip One Statement" idlwave-shell-skip t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2889 ["Continue" idlwave-shell-cont t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2890 ("Continue to"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2891 ["End of Block" idlwave-shell-up t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2892 ["End of Subprog" idlwave-shell-return t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2893 ["End of Subprog+1" idlwave-shell-out t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2894 ["Here (Cursor Line)" idlwave-shell-to-here
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2895 (eq major-mode 'idlwave-mode)])
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2896 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2897 ["Print expression" idlwave-shell-print t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2898 ["Help on expression" idlwave-shell-help-expression t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2899 ["Evaluate Region" idlwave-shell-evaluate-region
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2900 (eq major-mode 'idlwave-mode)]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2901 ["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
2902 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2903 ["Redisplay" idlwave-shell-redisplay t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2904 ["Stack Up" idlwave-shell-stack-up t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2905 ["Stack Down" idlwave-shell-stack-down t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2906 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2907 ["Update Working Dir" idlwave-shell-resync-dirs t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2908 ["Reset IDL" idlwave-shell-reset t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2909 "--"
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2910 ["Toggle Toolbar" idlwave-shell-toggle-toolbar t]
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2911 ["Exit IDL" idlwave-shell-quit t]))
34433
31e98a1ac98f Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents: 34342
diff changeset
2912
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 (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
2914 '("Debug"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2915 ("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
2916 ["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
2917 (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
2918 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
2919 ["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
2920 (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
2921 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
2922 ["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
2923 (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
2924 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
2925 ["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
2926 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2927 ["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
2928 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2929 ["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
2930 ["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
2931 ("Breakpoints"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2932 ["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
2933 (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
2934 ["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
2935 ["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
2936 ["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
2937 ["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
2938 ("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
2939 ["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
2940 ["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
2941 ["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
2942 ["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
2943 ["... 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
2944 ["... 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
2945 ["... 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
2946 ["... 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
2947 (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
2948 ("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
2949 ["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
2950 ["Help on expression" idlwave-shell-help-expression t]
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2951 ["Evaluate Region" idlwave-shell-evaluate-region
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2952 (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
2953 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2954 ["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
2955 ["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
2956 ["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
2957 ("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
2958 ["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
2959 ["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
2960 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2961 ["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
2962 (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
2963 (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
2964 :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
2965 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2966 ["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
2967 ["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
2968 "--"
8eff9cc9cbae Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents: 27607
diff changeset
2969 ["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
2970 ["Exit IDL" idlwave-shell-quit t]))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2971
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2972 (if (or (featurep 'easymenu) (load "easymenu" t))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2973 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2974 (easy-menu-define
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2975 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
2976 idlwave-shell-menu-def)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2977 (easy-menu-define
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2978 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
2979 idlwave-shell-menu-def)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2980 (save-excursion
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2981 (mapcar (lambda (buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2982 (set-buffer buf)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2983 (if (eq major-mode 'idlwave-mode)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2984 (progn
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2985 (easy-menu-remove idlwave-mode-debug-menu)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2986 (easy-menu-add idlwave-mode-debug-menu))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2987 (buffer-list)))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2988
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2989 ;; The Breakpoint Glyph -------------------------------------------------------
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2990
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2991 (defvar idlwave-shell-bp-glyph nil
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2992 "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
2993
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2994 (let ((image-string "/* XPM */
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2995 static char * file[] = {
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2996 \"14 12 3 1\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2997 \" c #FFFFFFFFFFFF s backgroundColor\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2998 \". c #4B4B4B4B4B4B\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2999 \"R c #FFFF00000000\",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3000 \" \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3001 \" \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3002 \" RRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3003 \" RRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3004 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3005 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3006 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3007 \" RRRRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3008 \" RRRRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3009 \" RRRR \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3010 \" \",
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3011 \" \"};"))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3012
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3013 (setq idlwave-shell-bp-glyph
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3014 (cond ((and (featurep 'xemacs)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3015 (featurep 'xpm))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3016 (make-glyph image-string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3017 ((and (not (featurep 'xemacs))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3018 (fboundp 'image-type-available-p)
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3019 (image-type-available-p 'xpm))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3020 (list 'image :type 'xpm :data image-string))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3021 (t nil))))
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3022
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3023 (provide 'idlw-shell)
27166
b2d17f0c1668 Also provide idlwave.shell, not only idlw-shell.
Carsten Dominik <dominik@science.uva.nl>
parents: 27108
diff changeset
3024 (provide 'idlwave-shell)
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3025
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3026 ;;; Load the toolbar when wanted by the user.
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3027
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3028 (autoload 'idlwave-toolbar-toggle "idlw-toolbar"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3029 "Toggle the IDLWAVE toolbar")
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3030 (autoload 'idlwave-toolbar-add-everywhere "idlw-toolbar"
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3031 "Add IDLWAVE toolbar")
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3032 (defun idlwave-shell-toggle-toolbar ()
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3033 "Toggle the display of the debugging toolbar."
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3034 (interactive)
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3035 (idlwave-toolbar-toggle))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3036
27607
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3037 (if idlwave-shell-use-toolbar
527d42ebb15e (idlwave-shell-print): Fixed bug with
Carsten Dominik <dominik@science.uva.nl>
parents: 27185
diff changeset
3038 (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere))
27107
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3039
7b2b73f13427 Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3040 ;;; idlw-shell.el ends here