Mercurial > emacs
annotate lisp/progmodes/idlwave.el @ 70825:7cdd7550b8a1
*** empty log message ***
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Sun, 21 May 2006 22:25:22 +0000 |
parents | d6353257b05e |
children | 81a55a7dc3c3 b6689e223e2f 146cd8369025 |
rev | line source |
---|---|
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1 ;; idlwave.el --- IDL editing mode for GNU Emacs |
68773
dc49655f57ae
Update copyright for 2006.
Nick Roberts <nickrob@snap.net.nz>
parents:
66963
diff
changeset
|
2 ;; Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3 ;; Free Software Foundation |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> |
60690 | 6 ;; Carsten Dominik <dominik@science.uva.nl> |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7 ;; Chris Chase <chase@att.com> |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9 ;; Version: 6.0_em22 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
10 ;; Keywords: languages |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
11 |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34708
diff
changeset
|
12 ;; This file is part of GNU Emacs. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
13 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
14 ;; GNU Emacs is free software; you can redistribute it and/or modify |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
15 ;; it under the terms of the GNU General Public License as published by |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
16 ;; the Free Software Foundation; either version 2, or (at your option) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
17 ;; any later version. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
18 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
19 ;; GNU Emacs is distributed in the hope that it will be useful, |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
22 ;; GNU General Public License for more details. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
23 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
24 ;; You should have received a copy of the GNU General Public License |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
27 ;; Boston, MA 02110-1301, USA. | |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
28 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
29 ;;; Commentary: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
30 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
31 ;; IDLWAVE enables feature-rich development and interaction with IDL, |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
32 ;; the Interactive Data Language. It provides a compelling, |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
33 ;; full-featured alternative to the IDLDE development environment |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
34 ;; bundled with IDL. |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
35 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
36 ;; In the remotely distant past, based on pascal.el, though bears |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
37 ;; little resemblance to it now. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
38 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
39 ;; Incorporates many ideas, such as abbrevs, action routines, and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
40 ;; continuation line indenting, from wave.el. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
41 ;; wave.el original written by Lubos Pochman, Precision Visuals, Boulder. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
42 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
43 ;; See the mode description ("C-h m" in idlwave-mode or "C-h f idlwave-mode") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
44 ;; for features, key bindings, and info. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
45 ;; Also, Info format documentation is available with `M-x idlwave-info' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
46 ;; |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
47 ;; New versions of IDLWAVE, documentation, and more information |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
48 ;; available from: |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
49 ;; http://idlwave.org |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
50 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
51 ;; INSTALLATION |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
52 ;; ============ |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
53 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
54 ;; Follow the instructions in the INSTALL file of the distribution. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
55 ;; In short, put this file on your load path and add the following |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
56 ;; lines to your .emacs file: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
57 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
58 ;; (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
26956
diff
changeset
|
59 ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
60 ;; (setq auto-mode-alist (cons '("\\.pro\\'" . idlwave-mode) auto-mode-alist)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
61 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
62 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
63 ;; SOURCE |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
64 ;; ====== |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
65 ;; |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
66 ;; The newest version of this file is available from the maintainer's |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
67 ;; Webpage: |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
68 ;; |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
69 ;; http://idlwave.org |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
70 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
71 ;; DOCUMENTATION |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
72 ;; ============= |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
73 ;; |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
74 ;; IDLWAVE is documented online in info format. A printable version |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
75 ;; of the documentation is available from the maintainers webpage (see |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
76 ;; SOURCE). |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
77 ;; |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
78 ;; |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
79 ;; ACKNOWLEDGMENTS |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
80 ;; =============== |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
81 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
82 ;; Thanks to the following people for their contributions and comments: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
83 ;; |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
84 ;; Ulrik Dickow <dickow_at_nbi.dk> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
85 ;; Eric E. Dors <edors_at_lanl.gov> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
86 ;; Stein Vidar H. Haugan <s.v.h.haugan_at_astro.uio.no> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
87 ;; David Huenemoerder <dph_at_space.mit.edu> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
88 ;; Kevin Ivory <Kevin.Ivory_at_linmpi.mpg.de> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
89 ;; Dick Jackson <dick_at_d-jackson.com> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
90 ;; Xuyong Liu <liu_at_stsci.edu> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
91 ;; Simon Marshall <Simon.Marshall_at_esrin.esa.it> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
92 ;; Laurent Mugnier <mugnier_at_onera.fr> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
93 ;; Lubos Pochman <lubos_at_rsinc.com> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
94 ;; Bob Portmann <portmann_at_al.noaa.gov> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
95 ;; Patrick M. Ryan <pat_at_jaameri.gsfc.nasa.gov> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
96 ;; Marty Ryba <ryba_at_ll.mit.edu> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
97 ;; Paul Sorenson <aardvark62_at_msn.com> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
98 ;; Phil Sterne <sterne_at_dublin.llnl.gov> |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
99 ;; Phil Williams <williams_at_irc.chmcc.org> |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
100 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
101 ;; CUSTOMIZATION: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
102 ;; ============= |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
103 ;; |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
104 ;; IDLWAVE has extensive customize support; to learn about the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
105 ;; variables which control the mode's behavior, use `M-x |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
106 ;; idlwave-customize'. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
107 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
108 ;; You can set your own preferred values with Customize, or with Lisp |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
109 ;; code in .emacs. For an example of what to put into .emacs, check |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
110 ;; the TexInfo documentation or see a complete .emacs available at the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
111 ;; website. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
112 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
113 ;; KNOWN PROBLEMS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
114 ;; ============== |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
115 ;; |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
116 ;; IDLWAVE support for the IDL-derived PV-WAVE CL language of Visual |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
117 ;; Numerics, Inc. is growing less and less complete as the two |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
118 ;; languages grow increasingly apart. The mode probably shouldn't |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
119 ;; even have "WAVE" in its title, but it's catchy, and was required |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
120 ;; to avoid conflict with the CORBA idl.el mode. Caveat WAVEor. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
121 ;; |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
122 ;; Moving the point backwards in conjunction with abbrev expansion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
123 ;; does not work as I would like it, but this is a problem with |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
124 ;; emacs abbrev expansion done by the self-insert-command. It ends |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
125 ;; up inserting the character that expanded the abbrev after moving |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
126 ;; point backward, e.g., "\cl" expanded with a space becomes |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
127 ;; "LONG( )" with point before the close paren. This is solved by |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
128 ;; using a temporary function in `post-command-hook' - not pretty, |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
129 ;; but it works. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
130 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
131 ;; Tabs and spaces are treated equally as whitespace when filling a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
132 ;; comment paragraph. To accomplish this, tabs are permanently |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
133 ;; replaced by spaces in the text surrounding the paragraph, which |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
134 ;; may be an undesirable side-effect. Replacing tabs with spaces is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
135 ;; limited to comments only and occurs only when a comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
136 ;; paragraph is filled via `idlwave-fill-paragraph'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
137 ;; |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
138 ;; Muti-statement lines (using "&") on block begin and end lines can |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
139 ;; ruin the formatting. For example, multiple end statements on a |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
140 ;; line: endif & endif. Using "&" outside of block begin/end lines |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
141 ;; should be okay. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
142 ;; |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
143 ;; Determining the expression at point for printing and other |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
144 ;; examination commands is somewhat rough: currently only fairly |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
145 ;; simple entities are found. You can always drag-select or examine |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
146 ;; a pre-selected region. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
147 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
148 ;; When forcing completion of method keywords, the initial |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
149 ;; query for a method has multiple entries for some methods. Would |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
150 ;; be too difficult to fix this hardly used case. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
151 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
152 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
153 ;;; Code: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
154 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
155 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
156 (eval-when-compile (require 'cl)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
157 (require 'idlw-help) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
158 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
159 ;; For XEmacs |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
160 (unless (fboundp 'line-beginning-position) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
161 (defalias 'line-beginning-position 'point-at-bol)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
162 (unless (fboundp 'line-end-position) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
163 (defalias 'line-end-position 'point-at-eol)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
164 (unless (fboundp 'char-valid-p) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
165 (defalias 'char-valid-p 'characterp)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
166 (unless (fboundp 'match-string-no-properties) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
167 (defalias 'match-string-no-properties 'match-string)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
168 |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
169 (if (not (fboundp 'cancel-timer)) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
170 (condition-case nil |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
171 (require 'timer) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
172 (error nil))) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
173 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
174 (eval-and-compile |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
175 ;; Kludge to allow `defcustom' for Emacs 19. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
176 (condition-case () (require 'custom) (error nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
177 (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
178 nil ;; We've got what we needed |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
179 ;; We have the old or no custom-library, hack around it! |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
180 (defmacro defgroup (&rest args) nil) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
181 (defmacro defcustom (var value doc &rest args) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
182 `(defvar ,var ,value ,doc)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
183 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
184 (defgroup idlwave nil |
64046
d7d0b751409c
(idlwave): Finish `defgroup' description with period.
Juanma Barranquero <lekktu@gmail.com>
parents:
64001
diff
changeset
|
185 "Major mode for editing IDL .pro files." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
186 :tag "IDLWAVE" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
187 :link '(url-link :tag "Home Page" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
188 "http://idlwave.org") |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
189 :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
190 "idlw-shell.el") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
191 :link '(emacs-commentary-link :tag "Commentary in idlwave.el" "idlwave.el") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
192 :link '(custom-manual "(idlwave)Top") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
193 :prefix "idlwave" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
194 :group 'languages) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
195 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
196 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
197 ;;; Variables for indentation behavior --------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
198 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
199 (defgroup idlwave-code-formatting nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
200 "Indentation and formatting options for IDLWAVE mode." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
201 :group 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
202 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
203 (defcustom idlwave-main-block-indent 2 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
204 "*Extra indentation for the main block of code. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
205 That is the block between the FUNCTION/PRO statement and the END |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
206 statement for that program unit." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
207 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
208 :type 'integer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
209 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
210 (defcustom idlwave-block-indent 3 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
211 "*Extra indentation applied to block lines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
212 If you change this, you probably also want to change `idlwave-end-offset'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
213 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
214 :type 'integer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
215 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
216 (defcustom idlwave-end-offset -3 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
217 "*Extra indentation applied to block END lines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
218 A value equal to negative `idlwave-block-indent' will make END lines |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
219 line up with the block BEGIN lines." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
220 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
221 :type 'integer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
222 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
223 (defcustom idlwave-continuation-indent 3 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
224 "*Extra indentation applied to continuation lines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
225 This extra offset applies to the first of a set of continuation lines. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
226 The following lines receive the same indentation as the first." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
227 :group 'idlwave-code-formatting |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
228 :type 'integer) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
229 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
230 (defcustom idlwave-max-extra-continuation-indent 40 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
231 "*Maximum additional indentation for special continuation indent. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
232 Several special indentations are tried to help line up continuation |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
233 lines in routine calls or definitions, other statements with |
47125
8eeb03f91048
(idlwave-max-extra-continuation-indent): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
46529
diff
changeset
|
234 parentheses, or assignment statements. This variable specifies a |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
235 maximum amount by which this special indentation can exceed the |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
236 standard continuation indentation, otherwise defaulting to a fixed |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
237 offset. Set to 0 to effectively disable all special continuation |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
238 indentation, or to a large number (like 100) to enable it in all |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
239 cases. See also `idlwave-indent-to-open-paren', which can override |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
240 this variable." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
241 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
242 :type 'integer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
243 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
244 (defcustom idlwave-indent-to-open-paren t |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
245 "*Non-nil means, indent continuation lines to innermost open |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
246 parenthesis. This indentation occurs even if otherwise disallowed by |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
247 `idlwave-max-extra-continuation-indent'. Matching parens and the |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
248 interleaving args are lined up. Example: |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
249 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
250 x = function_a(function_b(function_c( a, b, [1,2,3, $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
251 4,5,6 $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
252 ], $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
253 c, d $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
254 ))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
255 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
256 When this variable is nil, paren alignment may still occur, based on |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
257 the value of `max-extra-continuation-indent', which, if zero, would |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
258 yield: |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
259 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
260 x = function_a(function_b(function_c( a, b, [1,2,3, $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
261 4,5,6 $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
262 ], $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
263 c, d $ |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
264 )))" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
265 :group 'idlwave-code-formatting |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
266 :type 'boolean) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
267 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
268 (defcustom idlwave-indent-parens-nested nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
269 "*Non-nil means, indent continuation lines with parens by nesting |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
270 lines at consecutively deeper levels." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
271 :group 'idlwave-code-formatting |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
272 :type 'boolean) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
273 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
274 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
275 (defcustom idlwave-hanging-indent t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
276 "*If set non-nil then comment paragraphs are indented under the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
277 hanging indent given by `idlwave-hang-indent-regexp' match in the first line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
278 of the paragraph." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
279 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
280 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
281 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
282 (defcustom idlwave-hang-indent-regexp "- " |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
283 "*Regular expression matching the position of the hanging indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
284 in the first line of a comment paragraph. The size of the indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
285 extends to the end of the match for the regular expression." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
286 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
287 :type 'regexp) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
288 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
289 (defcustom idlwave-use-last-hang-indent nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
290 "*If non-nil then use last match on line for `idlwave-indent-regexp'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
291 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
292 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
293 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
294 (defcustom idlwave-fill-comment-line-only t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
295 "*If non-nil then auto fill will only operate on comment lines." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
296 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
297 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
298 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
299 (defcustom idlwave-auto-fill-split-string t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
300 "*If non-nil then auto fill will split strings with the IDL `+' operator. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
301 When the line end falls within a string, string concatenation with the |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
302 '+' operator will be used to distribute a long string over lines. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
303 If nil and a string is split then a terminal beep and warning are issued. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
304 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
305 This variable is ignored when `idlwave-fill-comment-line-only' is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
306 non-nil, since in this case code is not auto-filled." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
307 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
308 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
309 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
310 (defcustom idlwave-split-line-string t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
311 "*If non-nil then `idlwave-split-line' will split strings with `+'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
312 When the splitting point of a line falls inside a string, split the string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
313 using the `+' string concatenation operator. If nil and a string is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
314 split then a terminal beep and warning are issued." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
315 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
316 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
317 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
318 (defcustom idlwave-no-change-comment ";;;" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
319 "*The indentation of a comment that starts with this regular |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
320 expression will not be changed. Note that the indentation of a comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
321 at the beginning of a line is never changed." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
322 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
323 :type 'string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
324 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
325 (defcustom idlwave-begin-line-comment nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
326 "*A comment anchored at the beginning of line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
327 A comment matching this regular expression will not have its |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
328 indentation changed. If nil the default is \"^;\", i.e., any line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
329 beginning with a \";\". Expressions for comments at the beginning of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
330 the line should begin with \"^\"." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
331 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
332 :type '(choice (const :tag "Any line beginning with `;'" nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
333 'regexp)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
334 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
335 (defcustom idlwave-code-comment ";;[^;]" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
336 "*A comment that starts with this regular expression on a line by |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
337 itself is indented as if it is a part of IDL code. As a result if |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
338 the comment is not preceded by whitespace it is unchanged." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
339 :group 'idlwave-code-formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
340 :type 'regexp) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
341 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
342 ;; Comments not matching any of the above will be indented as a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
343 ;; right-margin comment, i.e., to a minimum of `comment-column'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
344 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
345 ;;; Routine Info and Completion --------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
346 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
347 (defgroup idlwave-routine-info nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
348 "Routine Info options for IDLWAVE mode." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
349 :group 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
350 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
351 (defcustom idlwave-use-library-catalogs t |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
352 "*Non-nil means search the IDL path for library catalog files. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
353 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
354 These files, named .idlwave_catalog, document routine information for |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
355 individual directories and libraries of IDL .pro files. Many popular |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
356 libraries come with catalog files by default, so leaving this on is a |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
357 usually a good idea.." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
358 :group 'idlwave-routine-info |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
359 :type 'boolean) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
360 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
361 (defcustom idlwave-init-rinfo-when-idle-after 10 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
362 "*Seconds of idle time before routine info is automatically |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
363 initialized. Initializing the routine info can take a long time, in |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
364 particular if a large number of library catalogs are involved. When |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
365 Emacs is idle for more than the number of seconds specified by this |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
366 variable, it starts the initialization. The process is split into |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
367 five steps, in order to keep work interruption as short as possible. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
368 If one of the steps finishes, and no user input has arrived in the |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
369 mean time, initialization proceeds immediately to the next step. A |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
370 good value for this variable is about 1/3 of the time initialization |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
371 take in your setup. So if you have a fast machine and no problems |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
372 with a slow network connection, don't hesitate to set this to 2 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
373 seconds. A Value of 0 means, don't initialize automatically, but |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
374 instead wait until routine information is needed, and initialize |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
375 then." |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
376 :group 'idlwave-routine-info |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
377 :type 'number) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
378 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
379 (defcustom idlwave-scan-all-buffers-for-routine-info t |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
380 "*Non-nil means, scan buffers for IDL programs when updating info. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
381 The scanning is done by the command `idlwave-update-routine-info'. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
382 The following values are allowed: |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
383 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
384 nil Don't scan any buffers. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
385 t Scan all idlwave-mode buffers in the current editing session. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
386 current Scan only the current buffer, but no other buffers." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
387 :group 'idlwave-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
388 :type '(choice |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
389 (const :tag "No buffer" nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
390 (const :tag "All buffers" t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
391 (const :tag "Current buffer only" 'current))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
392 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
393 (defcustom idlwave-query-shell-for-routine-info t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
394 "*Non-nil means query the shell for info about compiled routines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
395 Querying the shell is useful to get information about compiled modules, |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
396 and it is turned on by default. However, when you have a complete library |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
397 scan, this is not necessary." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
398 :group 'idlwave-routine-info |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
399 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
400 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
401 (defcustom 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:
27606
diff
changeset
|
402 '(find-file save-buffer kill-buffer compile-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
403 "*Controls under what circumstances routine info is updated automatically. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
404 Possible values: |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
405 nil Never |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
406 t All available |
47479 | 407 \(...) A list of circumstances. Allowed members are: |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
408 find-file Add info for new IDLWAVE buffers. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
409 save-buffer Update buffer info when buffer is saved |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
410 kill-buffer Remove buffer info when buffer gets killed |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
411 compile-buffer Update shell info after `idlwave-shell-save-and...'" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
412 :group 'idlwave-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
413 :type '(choice |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
414 (const :tag "Never" nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
415 (const :tag "As often as possible" t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
416 (set :tag "Checklist" :greedy t |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
417 (const :tag "When visiting a file" find-file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
418 (const :tag "When saving a buffer" save-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
419 (const :tag "After a buffer was killed" kill-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
420 (const :tag "After a buffer was compiled successfully, update shell info" compile-buffer)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
421 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
422 (defcustom idlwave-rinfo-max-source-lines 5 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
423 "*Maximum number of source files displayed in the Routine Info window. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
424 When an integer, it is the maximum number of source files displayed. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
425 t means to show all source files." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
426 :group 'idlwave-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
427 :type 'integer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
428 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
429 (defcustom idlwave-library-path nil |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
430 "Library path for Windows and MacOS (OS9). Not needed under Unix. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
431 When selecting the directories to scan for IDL user catalog routine |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
432 info, IDLWAVE can, under UNIX, query the shell for the exact search |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
433 path \(the value of !PATH). However, under Windows and MacOS |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
434 (pre-OSX), the IDLWAVE shell does not work. In this case, this |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
435 variable can be set to specify the paths where IDLWAVE can find PRO |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
436 files. The shell will only be asked for a list of paths when this |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
437 variable is nil. The value is a list of directories. A directory |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
438 preceeded by a `+' will be searched recursively. If you set this |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
439 variable on a UNIX system, the shell will not be queried. See also |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
440 `idlwave-system-directory'." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
441 :group 'idlwave-routine-info |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
442 :type '(repeat (directory))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
443 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
444 (defcustom idlwave-system-directory "" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
445 "The IDL system directory for Windows and MacOS. Not needed under |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
446 UNIX. Set this to the value of the `!DIR' system variable in IDL. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
447 IDLWAVE uses this to find out which of the library routines belong to |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
448 the official system library. All files inside the `lib' subdirectory |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
449 are considered system library files - so don't install private stuff |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
450 in this directory. On UNIX systems, IDLWAVE queries the shell for the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
451 value of `!DIR'. See also `idlwave-library-path'." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
452 :group 'idlwave-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
453 :type 'directory) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
454 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
455 ;; Configuration files |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
456 (defcustom idlwave-config-directory |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
457 (convert-standard-filename "~/.idlwave") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
458 "*Directory for configuration files and user-library catalog." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
459 :group 'idlwave-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
460 :type 'file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
461 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
462 (defvar idlwave-user-catalog-file "idlusercat.el") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
463 (defvar idlwave-xml-system-rinfo-converted-file "idl_xml_rinfo.el") |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
464 (defvar idlwave-path-file "idlpath.el") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
465 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
466 (defvar idlwave-libinfo-file nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
467 "*Obsolete variable, no longer used.") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
468 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
469 (defcustom idlwave-special-lib-alist nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
470 "Alist of regular expressions matching special library directories. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
471 When listing routine source locations, IDLWAVE gives a short hint where |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
472 the file defining the routine is located. By default it lists `SystemLib' |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
473 for routines in the system library `!DIR/lib' and `Library' for anything |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
474 else. This variable can define additional types. The car of each entry |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
475 is a regular expression matching the file name (they normally will match |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
476 on the path). The cdr is the string to be used as identifier. Max 10 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
477 chars are allowed." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
478 :group 'idlwave-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
479 :type '(repeat |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
480 (cons regexp string))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
481 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
482 (defcustom idlwave-auto-write-paths t |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
483 "Write out path (!PATH) and system directory (!DIR) info automatically. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
484 Path info is needed to locate library catalog files. If non-nil, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
485 whenever the path-list changes as a result of shell-query, etc., it is |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
486 written to file. Otherwise, the menu option \"Write Paths\" can be |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
487 used to force a write." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
488 :group 'idlwave-routine-info |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
489 :type 'boolean) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
490 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
491 (defgroup idlwave-completion nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
492 "Completion options for IDLWAVE mode." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
493 :prefix "idlwave" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
494 :group 'idlwave) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
495 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
496 (eval-and-compile |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
497 (defconst idlwave-tmp |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
498 '(choice :tag "by applying the function" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
499 (const upcase) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
500 (const downcase) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
501 (const capitalize) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
502 (const preserve) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
503 (symbol :tag "Other")))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
504 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
505 (defcustom idlwave-completion-case '((routine . upcase) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
506 (keyword . upcase) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
507 (class . preserve) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
508 (method . preserve)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
509 "Association list setting the case of completed words. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
510 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
511 This variable determines the case (UPPER/lower/Capitalized...) of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
512 words inserted into the buffer by completion. The preferred case can |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
513 be specified separately for routine names, keywords, classes and |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
514 methods. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
515 This alist should therefore have entries for `routine' (normal |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
516 functions and procedures, i.e. non-methods), `keyword', `class', and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
517 `method'. Plausible values are |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
518 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
519 upcase upcase whole word, like `BOX_CURSOR' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
520 downcase downcase whole word, like `read_ppm' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
521 capitalize capitalize each part, like `Widget_Control' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
522 preserve preserve case as is, like `IDLgrView' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
523 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
524 The value can also be any Emacs Lisp function which transforms the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
525 case of characters in a string. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
526 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
527 A value of `preserve' means that the case of the completed word is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
528 identical to the way it was written in the definition statement of the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
529 routine. This was implemented to allow for mixed-case completion, in |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
530 particular of object classes and methods. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
531 If a completable word is defined in multiple locations, the meaning of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
532 `preserve' is not unique since the different definitions might be |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
533 cased differently. Therefore IDLWAVE always takes the case of the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
534 *first* definition it encounters during routine info collection and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
535 uses the case derived from it consistently. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
536 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
537 Note that a lowercase-only string in the buffer will always be completed in |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
538 lower case (but see the variable `idlwave-completion-force-default-case'). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
539 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
540 After changing this variable, you need to either restart Emacs or press |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
541 `C-u C-c C-i' to update the internal lists." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
542 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
543 :type `(repeat |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
544 (cons (symbol :tag "Derive completion case for") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
545 ,idlwave-tmp))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
546 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
547 (defcustom idlwave-completion-force-default-case nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
548 "*Non-nil means, completion will always honor `idlwave-completion-case'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
549 When nil, only the completion of a mixed case or upper case string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
550 will honor the default settings in `idlwave-completion-case', while |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
551 the completion of lower case strings will be completed entirely in |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
552 lower case." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
553 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
554 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
555 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
556 (defcustom idlwave-complete-empty-string-as-lower-case nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
557 "*Non-nil means, the empty string is considered downcase for completion. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
558 The case of what is already in the buffer determines the case of completions. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
559 When this variable is non-nil, the empty string is considered to be downcase. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
560 Completing on the empty string then offers downcase versions of the possible |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
561 completions." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
562 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
563 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
564 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
565 (defvar idlwave-default-completion-case-is-down nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
566 "Obsolete variable. See `idlwave-complete-empty-string-as-lower-case' and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
567 `idlwave-completion-case'.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
568 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
569 (defcustom idlwave-buffer-case-takes-precedence nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
570 "*Non-nil means, the case of tokens in buffers dominates over system stuff. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
571 To make this possible, we need to re-case everything each time we update |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
572 the routine info from the buffers. This is slow. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
573 The default is to consider the case given in the system and library files |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
574 first which makes updating much faster." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
575 :group 'idlwave-completion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
576 :type 'boolean) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
577 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
578 (defcustom idlwave-highlight-help-links-in-completion t |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
579 "*Non-nil means, highlight completions for which system help is available. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
580 Help can then be accessed with mouse-3. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
581 This option is only effective when the online help system is installed." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
582 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
583 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
584 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
585 (defcustom idlwave-support-inheritance t |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
586 "Non-nil means, treat inheritance with completion, online help etc. |
47261
863b1f0c98f8
(idlwave-support-inheritance, idlwave-routine-entry-compare): Fix spacing.
Juanma Barranquero <lekktu@gmail.com>
parents:
47125
diff
changeset
|
587 When nil, IDLWAVE only knows about the native methods and tags of a class, |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
588 not about inherited ones." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
589 :group 'idlwave-routine-info |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
590 :type 'boolean) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
591 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
592 (defcustom idlwave-keyword-class-inheritance '("^[gs]etproperty$" "^init$") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
593 "List of regular expressions for class-driven keyword inheritance. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
594 Keyword inheritance is often tied to class inheritance by \"chaining\" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
595 up the class tree. While it cannot be assumed that the presence of an |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
596 _EXTRA or _REF_EXTRA symbol guarantees such chaining will occur, for |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
597 certain methods this assumption is almost always true. The methods |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
598 for which to assume this can be set here." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
599 :group 'idlwave-routine-info |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
600 :type '(repeat (regexp :tag "Match method:"))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
601 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
602 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
603 (defcustom idlwave-completion-show-classes 1 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
604 "*Number of classes to show when completing object methods and keywords. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
605 When completing methods or keywords for an object with unknown class, |
60925
a9c571ede913
* progmodes/cperl-mode.el, progmodes/idlw-shell.el,
Werner LEMBERG <wl@gnu.org>
parents:
60917
diff
changeset
|
606 the *Completions* buffer will show the valid classes for each completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
607 like this: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
608 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
609 MyMethod <Class1,Class2,Class3> |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
610 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
611 The value of this variable may be nil to inhibit display, or an integer to |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
612 indicate the maximum number of classes to display. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
613 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
614 On XEmacs, a full list of classes will also be placed into a `help-echo' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
615 property on the competion items, so that the list of classes for the current |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
616 item is displayed in the echo area. If the value of this variable is a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
617 negative integer, the `help-echo' property will be suppressed." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
618 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
619 :type '(choice (const :tag "Don't show" nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
620 (integer :tag "Number of classes shown" 1))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
621 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
622 (defcustom idlwave-completion-fontify-classes t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
623 "*Non-nil means, fontify the classes in completions buffer. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
624 This makes it easier to distinguish the completion items from the extra |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
625 class info listed. See `idlwave-completion-show-classes'." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
626 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
627 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
628 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
629 (defcustom idlwave-query-class '((method-default . nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
630 (keyword-default . nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
631 "Association list governing specification of object classes for completion. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
632 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
633 When IDLWAVE tries to complete object-oriented methods, it usually |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
634 cannot determine the class of a given object from context. In order |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
635 to provide the user with a correct list of methods or keywords, it |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
636 needs to determine the appropriate class. IDLWAVE has two ways of |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
637 doing this (well, three ways if you count the shell... see |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
638 `idlwave-shell-query-for-class'): |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
639 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
640 1. Combine the items of all available classes which contain this |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
641 method for the purpose of completion. So when completing a method, |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
642 all methods of all known classes are available, and when completing |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
643 a keyword, all keywords allowed for this method in any class are |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
644 shown. This behavior is very much like normal completion and is |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
645 therefore the default. It works much better than one might think - |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
646 only for the INIT, GETPROPERTY and SETPROPERTY the keyword lists |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
647 become uncomfortably long. See also |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
648 `idlwave-completion-show-classes'. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
649 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
650 2. The second possibility is to ask the user on each occasion. To |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
651 make this less interruptive, IDLWAVE can store the class as a text |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
652 property on the object operator `->'. For a given object in the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
653 source code, class selection will then be needed only once |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
654 - for example to complete the method. Keywords to the method can |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
655 then be completed directly, because the class is already known. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
656 You will have to turn on the storage of the selected class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
657 explicitly with the variable `idlwave-store-inquired-class'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
658 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
659 This variable allows you to configure IDLWAVE's method and |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
660 method-keyword completion behavior. Its value is an alist, which |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
661 should contain at least two elements: (method-default . VALUE) and |
47479 | 662 \(keyword-default . VALUE), where VALUE is either t or nil. These |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
663 specify if the class should be found during method and keyword |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
664 completion, respectively. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
665 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
666 The alist may have additional entries specifying exceptions from the |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
667 keyword completion rule for specific methods, like INIT or |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
668 GETPROPERTY. In order to turn on class specification for the INIT |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
669 method, add an entry (\"INIT\" . t). The method name must be ALL-CAPS." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
670 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
671 :type '(list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
672 (cons (const method-default) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
673 (boolean :tag "Determine class when completing METHODS ")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
674 (cons (const keyword-default) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
675 (boolean :tag "Determine class when completing KEYWORDS ")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
676 (repeat |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
677 :tag "Exceptions to defaults" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
678 :inline t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
679 (cons (string :tag "MODULE" :value "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
680 (boolean :tag "Determine class for this method"))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
681 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
682 (defcustom idlwave-store-inquired-class t |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
683 "*Non-nil means, store class of a method call as text property on `->'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
684 IDLWAVE sometimes has to ask the user for the class associated with a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
685 particular object method call. This happens during the commands |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
686 `idlwave-routine-info' and `idlwave-complete', depending upon the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
687 value of the variable `idlwave-query-class'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
688 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
689 When you specify a class, this information can be stored as a text |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
690 property on the `->' arrow in the source code, so that during the same |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
691 editing session, IDLWAVE will not have to ask again. When this |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
692 variable is non-nil, IDLWAVE will store and reuse the class information. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
693 The class stored can be checked and removed with `\\[idlwave-routine-info]' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
694 on the arrow. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
695 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
696 The default of this variable is nil, since the result of commands then |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
697 is more predictable. However, if you know what you are doing, it can |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
698 be nice to turn this on. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
699 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
700 An arrow which knows the class will be highlighted with |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
701 `idlwave-class-arrow-face'. The command \\[idlwave-routine-info] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
702 displays (with prefix arg: deletes) the class stored on the arrow |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
703 at point." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
704 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
705 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
706 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
707 (defcustom idlwave-class-arrow-face 'bold |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
708 "*Face to highlight object operator arrows `->' which carry a class property. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
709 When IDLWAVE stores a class name as text property on an object arrow |
47479 | 710 \(see variable `idlwave-store-inquired-class', it highlights the arrow |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
711 with this font in order to remind the user that this arrow is special." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
712 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
713 :type 'symbol) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
714 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
715 (defcustom idlwave-resize-routine-help-window t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
716 "*Non-nil means, resize the Routine-info *Help* window to fit the content." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
717 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
718 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
719 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
720 (defcustom idlwave-keyword-completion-adds-equal t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
721 "*Non-nil means, completion automatically adds `=' after completed keywords." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
722 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
723 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
724 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
725 (defcustom idlwave-function-completion-adds-paren t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
726 "*Non-nil means, completion automatically adds `(' after completed function. |
42205 | 727 nil means, don't add anything. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
728 A value of `2' means, also add the closing parenthesis and position cursor |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
729 between the two." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
730 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
731 :type '(choice (const :tag "Nothing" nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
732 (const :tag "(" t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
733 (const :tag "()" 2))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
734 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
735 (defcustom idlwave-completion-restore-window-configuration t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
736 "*Non-nil means, try to restore the window configuration after completion. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
737 When completion is not unique, Emacs displays a list of completions. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
738 This messes up your window configuration. With this variable set, IDLWAVE |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
739 restores the old configuration after successful completion." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
740 :group 'idlwave-completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
741 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
742 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
743 ;;; Variables for abbrev and action behavior ----------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
744 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
745 (defgroup idlwave-abbrev-and-indent-action nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
746 "IDLWAVE performs actions when expanding abbreviations or indenting lines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
747 The variables in this group govern this." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
748 :group 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
749 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
750 (defcustom idlwave-do-actions nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
751 "*Non-nil means performs actions when indenting. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
752 The actions that can be performed are listed in `idlwave-indent-action-table'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
753 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
754 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
755 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
756 (defcustom idlwave-abbrev-start-char "\\" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
757 "*A single character string used to start abbreviations in abbrev mode. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
758 Possible characters to chose from: ~`\% |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
759 or even '?'. '.' is not a good choice because it can make structure |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
760 field names act like abbrevs in certain circumstances. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
761 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
762 Changes to this in `idlwave-mode-hook' will have no effect. Instead a user |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
763 must set it directly using `setq' in the .emacs file before idlwave.el |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
764 is loaded." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
765 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
766 :type 'string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
767 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
768 (defcustom idlwave-surround-by-blank nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
769 "*Non-nil means, enable `idlwave-surround'. |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
770 If non-nil, `=',`<',`>',`&',`,', `->' are surrounded with spaces by |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
771 `idlwave-surround'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
772 See help for `idlwave-indent-action-table' for symbols using `idlwave-surround'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
773 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
774 Also see the default key bindings for keys using `idlwave-surround'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
775 Keys are bound and made into actions calling `idlwave-surround' with |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
776 `idlwave-action-and-binding'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
777 See help for `idlwave-action-and-binding' for examples. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
778 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
779 Also see help for `idlwave-surround'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
780 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
781 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
782 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
783 (defcustom idlwave-pad-keyword t |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
784 "*Non-nil means pad '=' in keywords (routine calls or defs) like assignment. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
785 Whenever `idlwave-surround' is non-nil then this affects how '=' is |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
786 padded for keywords and for variables. If t, pad the same as for |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
787 assignments. If nil then spaces are removed. With any other value, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
788 spaces are left unchanged." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
789 :group 'idlwave-abbrev-and-indent-action |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
790 :type '(choice |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
791 (const :tag "Pad like assignments" t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
792 (const :tag "Remove space near `='" nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
793 (const :tag "Keep space near `='" 'keep))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
794 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
795 (defcustom idlwave-show-block t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
796 "*Non-nil means point blinks to block beginning for `idlwave-show-begin'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
797 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
798 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
799 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
800 (defcustom idlwave-expand-generic-end nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
801 "*Non-nil means expand generic END to ENDIF/ENDELSE/ENDWHILE etc." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
802 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
803 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
804 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
805 (defcustom idlwave-reindent-end t |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
806 "*Non-nil means re-indent line after END was typed." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
807 :group 'idlwave-abbrev-and-indent-action |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
808 :type 'boolean) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
809 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
810 (defcustom idlwave-abbrev-move t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
811 "*Non-nil means the abbrev hook can move point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
812 Set to nil by `idlwave-expand-region-abbrevs'. To see the abbrev |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
813 definitions, use the command `list-abbrevs', for abbrevs that move |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
814 point. Moving point is useful, for example, to place point between |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
815 parentheses of expanded functions. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
816 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
817 See `idlwave-check-abbrev'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
818 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
819 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
820 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
821 (defcustom idlwave-abbrev-change-case nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
822 "*Non-nil means all abbrevs will be forced to either upper or lower case. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
823 If the value t, all expanded abbrevs will be upper case. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
824 If the value is 'down then abbrevs will be forced to lower case. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
825 If nil, the case will not change. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
826 If `idlwave-reserved-word-upcase' is non-nil, reserved words will always be |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
827 upper case, regardless of this variable." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
828 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
829 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
830 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
831 (defcustom idlwave-reserved-word-upcase nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
832 "*Non-nil means, reserved words will be made upper case via abbrev expansion. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
833 If nil case of reserved words is controlled by `idlwave-abbrev-change-case'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
834 Has effect only if in abbrev-mode." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
835 :group 'idlwave-abbrev-and-indent-action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
836 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
837 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
838 ;;; Action/Expand Tables. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
839 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
840 ;; The average user may have difficulty modifying this directly. It |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
841 ;; can be modified/set in idlwave-mode-hook, but it is easier to use |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
842 ;; idlwave-action-and-binding. See help for idlwave-action-and-binding for |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
843 ;; examples of how to add an action. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
844 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
845 ;; The action table is used by `idlwave-indent-line' whereas both the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
846 ;; action and expand tables are used by `idlwave-indent-and-action'. In |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
847 ;; general, the expand table is only used when a line is explicitly |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
848 ;; indented. Whereas, in addition to being used when the expand table |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
849 ;; is used, the action table is used when a line is indirectly |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
850 ;; indented via line splitting, auto-filling or a new line creation. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
851 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
852 ;; Example actions: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
853 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
854 ;; Capitalize system vars |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
855 ;; (idlwave-action-and-binding idlwave-sysvar '(capitalize-word 1) t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
856 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
857 ;; Capitalize procedure name |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
858 ;; (idlwave-action-and-binding "\\<\\(pro\\|function\\)\\>[ \t]*\\<" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
859 ;; '(capitalize-word 1) t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
860 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
861 ;; Capitalize common block name |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
862 ;; (idlwave-action-and-binding "\\<common\\>[ \t]+\\<" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
863 ;; '(capitalize-word 1) t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
864 ;; Capitalize label |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
865 ;; (idlwave-action-and-binding (concat "^[ \t]*" idlwave-label) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
866 ;; '(capitalize-word -1) t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
867 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
868 (defvar idlwave-indent-action-table nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
869 "*Associated array containing action lists of search string (car), |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
870 and function as a cdr. This table is used by `idlwave-indent-line'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
871 See documentation for `idlwave-do-action' for a complete description of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
872 the action lists. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
873 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
874 Additions to the table are made with `idlwave-action-and-binding' when a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
875 binding is not requested. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
876 See help on `idlwave-action-and-binding' for examples.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
877 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
878 (defvar idlwave-indent-expand-table nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
879 "*Associated array containing action lists of search string (car), |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
880 and function as a cdr. The table is used by the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
881 `idlwave-indent-and-action' function. See documentation for |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
882 `idlwave-do-action' for a complete description of the action lists. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
883 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
884 Additions to the table are made with `idlwave-action-and-binding' when a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
885 binding is requested. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
886 See help on `idlwave-action-and-binding' for examples.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
887 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
888 ;;; Documentation header and history keyword --------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
889 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
890 (defgroup idlwave-documentation nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
891 "Options for documenting IDLWAVE files." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
892 :group 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
893 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
894 ;; FIXME: make defcustom? |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
895 (defvar idlwave-file-header |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
896 (list nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
897 ";+ |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
898 ; NAME: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
899 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
900 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
901 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
902 ; PURPOSE: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
903 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
904 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
905 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
906 ; CATEGORY: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
907 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
908 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
909 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
910 ; CALLING SEQUENCE: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
911 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
912 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
913 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
914 ; INPUTS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
915 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
916 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
917 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
918 ; OPTIONAL INPUTS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
919 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
920 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
921 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
922 ; KEYWORD PARAMETERS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
923 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
924 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
925 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
926 ; OUTPUTS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
927 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
928 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
929 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
930 ; OPTIONAL OUTPUTS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
931 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
932 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
933 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
934 ; COMMON BLOCKS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
935 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
936 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
937 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
938 ; SIDE EFFECTS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
939 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
940 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
941 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
942 ; RESTRICTIONS: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
943 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
944 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
945 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
946 ; PROCEDURE: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
947 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
948 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
949 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
950 ; EXAMPLE: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
951 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
952 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
953 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
954 ; MODIFICATION HISTORY: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
955 ; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
956 ;- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
957 ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
958 "*A list (PATHNAME STRING) specifying the doc-header template to use for |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
959 summarizing a file. If PATHNAME is non-nil then this file will be included. |
42205 | 960 Otherwise STRING is used. If nil, the file summary will be omitted. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
961 For example you might set PATHNAME to the path for the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
962 lib_template.pro file included in the IDL distribution.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
963 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
964 (defcustom idlwave-header-to-beginning-of-file t |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
965 "*Non-nil means, the documentation header will always be at start of file. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
966 When nil, the header is positioned between the PRO/FUNCTION line of |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
967 the current routine and the code, allowing several routine headers in |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
968 a file." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
969 :group 'idlwave-documentation |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
970 :type 'boolean) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
971 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
972 (defcustom idlwave-timestamp-hook 'idlwave-default-insert-timestamp |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
973 "*The hook function used to update the timestamp of a function." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
974 :group 'idlwave-documentation |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
975 :type 'function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
976 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
977 (defcustom idlwave-doc-modifications-keyword "HISTORY" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
978 "*The modifications keyword to use with the log documentation commands. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
979 A ':' is added to the keyword end. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
980 Inserted by doc-header and used to position logs by doc-modification. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
981 If nil it will not be inserted." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
982 :group 'idlwave-documentation |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
983 :type 'string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
984 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
985 (defcustom idlwave-doclib-start "^;+\\+" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
986 "*Regexp matching the start of a document library header." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
987 :group 'idlwave-documentation |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
988 :type 'regexp) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
989 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
990 (defcustom idlwave-doclib-end "^;+-" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
991 "*Regexp matching the end of a document library header." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
992 :group 'idlwave-documentation |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
993 :type 'regexp) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
994 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
995 ;;; External Programs ------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
996 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
997 (defgroup idlwave-external-programs nil |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
998 "Path locations of external commands used by IDLWAVE." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
999 :group 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1000 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1001 (defcustom idlwave-shell-explicit-file-name "idl" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1002 "*If non-nil, this is the command to run IDL. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1003 Should be an absolute file path or path relative to the current environment |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1004 execution search path. If you want to specify command line switches |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1005 for the idl program, use `idlwave-shell-command-line-options'. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1006 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1007 I know the name of this variable is badly chosen, but I cannot change |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1008 it without compromizing backwards-compatibility." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1009 :group 'idlwave-external-programs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1010 :type 'string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1011 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1012 (defcustom idlwave-shell-command-line-options nil |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1013 "*A list of command line options for calling the IDL program. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1014 Since IDL is executed directly without going through a shell like /bin/sh, |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1015 this should be a list of strings like '(\"-rt=file\" \"-nw\") with a separate |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1016 string for each argument. But you may also give a single string which |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1017 contains the options whitespace-separated. Emacs will be kind enough to |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1018 split it for you." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1019 :type '(choice |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1020 string |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1021 (repeat (string :value ""))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1022 :group 'idlwave-external-programs) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1023 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1024 (defcustom idlwave-help-application "idlhelp" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1025 "*The external application providing reference help for programming. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1026 Obsolete, if the IDL Assistant is being used for help." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1027 :group 'idlwave-external-programs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1028 :type 'string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1029 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1030 ;;; Some Shell variables which must be defined here.----------------------- |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1031 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1032 (defcustom idlwave-shell-debug-modifiers '() |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1033 "List of modifiers to be used for the debugging commands. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1034 Will be used to bind debugging commands in the shell buffer and in all |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1035 source buffers. These are additional convenience bindings, the debugging |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1036 commands are always available with the `C-c C-d' prefix. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1037 If you set this to '(control shift), this means setting a breakpoint will |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1038 be on `C-S-b', compiling a source file on `C-S-c' etc. Possible modifiers |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1039 are `control', `meta', `super', `hyper', `alt', and `shift'." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1040 :group 'idlwave-shell-general-setup |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1041 :type '(set :tag "Specify modifiers" |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1042 (const control) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1043 (const meta) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1044 (const super) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1045 (const hyper) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1046 (const alt) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1047 (const shift))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1048 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1049 (defcustom idlwave-shell-automatic-start nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1050 "*If non-nil attempt invoke idlwave-shell if not already running. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1051 This is checked when an attempt to send a command to an |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1052 IDL process is made." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1053 :group 'idlwave-shell-general-setup |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1054 :type 'boolean) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1055 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1056 ;;; Miscellaneous variables ------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1057 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1058 (defgroup idlwave-misc nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1059 "Miscellaneous options for IDLWAVE mode." |
66963
a11fdee52c05
Add :link (custom-group-link font-lock-faces) to defgroup.
Juri Linkov <juri@jurta.org>
parents:
65584
diff
changeset
|
1060 :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1061 :group 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1062 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1063 (defcustom idlwave-startup-message t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1064 "*Non-nil displays a startup message when `idlwave-mode' is first called." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1065 :group 'idlwave-misc |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1066 :type 'boolean) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1067 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1068 (defcustom idlwave-default-font-lock-items |
47479 | 1069 '(pros-and-functions batch-files idlwave-idl-keywords label goto |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1070 common-blocks class-arrows) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1071 "Items which should be fontified on the default fontification level 2. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1072 IDLWAVE defines 3 levels of fontification. Level 1 is very little, level 3 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1073 is everything and level 2 is specified by this list. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1074 This variable must be set before IDLWAVE gets loaded. It is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1075 a list of symbols, the following symbols are allowed. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1076 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1077 pros-and-functions Procedure and Function definitions |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1078 batch-files Batch Files |
47479 | 1079 idlwave-idl-keywords IDL Keywords |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1080 label Statement Labels |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1081 goto Goto Statements |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1082 common-blocks Common Blocks |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1083 keyword-parameters Keyword Parameters in routine definitions and calls |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1084 system-variables System Variables |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1085 fixme FIXME: Warning in comments (on XEmacs only v. 21.0 and up) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1086 class-arrows Object Arrows with class property" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1087 :group 'idlwave-misc |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1088 :type '(set |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1089 :inline t :greedy t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1090 (const :tag "Procedure and Function definitions" pros-and-functions) |
47479 | 1091 (const :tag "Batch Files" batch-files) |
1092 (const :tag "IDL Keywords (reserved words)" idlwave-idl-keywords) | |
1093 (const :tag "Statement Labels" label) | |
1094 (const :tag "Goto Statements" goto) | |
1095 (const :tag "Tags in Structure Definition" structtag) | |
1096 (const :tag "Structure Name" structname) | |
1097 (const :tag "Common Blocks" common-blocks) | |
1098 (const :tag "Keyword Parameters" keyword-parameters) | |
1099 (const :tag "System Variables" system-variables) | |
1100 (const :tag "FIXME: Warning" fixme) | |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1101 (const :tag "Object Arrows with class property " class-arrows))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1102 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1103 (defcustom idlwave-mode-hook nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1104 "Normal hook. Executed when a buffer is put into `idlwave-mode'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1105 :group 'idlwave-misc |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1106 :type 'hook) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1107 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1108 (defcustom idlwave-load-hook nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1109 "Normal hook. Executed when idlwave.el is loaded." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1110 :group 'idlwave-misc |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1111 :type 'hook) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1112 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1113 (defvar idlwave-experimental nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1114 "Non-nil means turn on a few experimental features. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1115 This variable is only for the maintainer, to test difficult stuff, |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1116 while still distributing stable releases. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1117 As a user, you should not set this to t.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1118 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1119 ;;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1120 ;;; End customization variables section |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1121 ;;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1122 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1123 ;;; Non customization variables |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1124 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1125 ;;; font-lock mode - Additions by Phil Williams, Ulrik Dickow and |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1126 ;;; Simon Marshall <simon_at_gnu.ai.mit.edu> |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1127 ;;; and Carsten Dominik... |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1128 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1129 ;; The following are the reserved words in IDL. Maybe we should |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1130 ;; highlight some more stuff as well? |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1131 ;; Procedure declarations. Fontify keyword plus procedure name. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1132 (defvar idlwave-idl-keywords |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1133 ;; To update this regexp, update the list of keywords and |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1134 ;; evaluate the form. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1135 ;; (insert |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1136 ;; (prin1-to-string |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1137 ;; (concat |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1138 ;; "\\<\\(" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1139 ;; (regexp-opt |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1140 ;; '("||" "&&" "and" "or" "xor" "not" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1141 ;; "eq" "ge" "gt" "le" "lt" "ne" |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1142 ;; "for" "do" "endfor" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1143 ;; "if" "then" "endif" "else" "endelse" |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1144 ;; "case" "of" "endcase" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1145 ;; "switch" "break" "continue" "endswitch" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1146 ;; "begin" "end" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1147 ;; "repeat" "until" "endrep" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1148 ;; "while" "endwhile" |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1149 ;; "goto" "return" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1150 ;; "inherits" "mod" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1151 ;; "compile_opt" "forward_function" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1152 ;; "on_error" "on_ioerror")) ; on_error is not officially reserved |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1153 ;; "\\)\\>"))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1154 "\\<\\(&&\\|and\\|b\\(egin\\|reak\\)\\|c\\(ase\\|o\\(mpile_opt\\|ntinue\\)\\)\\|do\\|e\\(lse\\|nd\\(case\\|else\\|for\\|if\\|rep\\|switch\\|while\\)?\\|q\\)\\|for\\(ward_function\\)?\\|g\\(oto\\|[et]\\)\\|i\\(f\\|nherits\\)\\|l[et]\\|mod\\|n\\(e\\|ot\\)\\|o\\(n_\\(error\\|ioerror\\)\\|[fr]\\)\\|re\\(peat\\|turn\\)\\|switch\\|then\\|until\\|while\\|xor\\|||\\)\\>") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1155 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1156 |
47479 | 1157 (let* (;; Procedure declarations. Fontify keyword plus procedure name. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1158 ;; Function declarations. Fontify keyword plus function name. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1159 (pros-and-functions |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1160 '("\\<\\(function\\|pro\\)\\>[ \t]+\\(\\sw+\\(::\\sw+\\)?\\)" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1161 (1 font-lock-keyword-face) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1162 (2 font-lock-function-name-face nil t))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1163 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1164 ;; Common blocks |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1165 (common-blocks |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1166 '("\\<\\(common\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*,?" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1167 (1 font-lock-keyword-face) ; "common" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1168 (2 font-lock-reference-face nil t) ; block name |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1169 ("[ \t]*\\(\\sw+\\)[ ,]*" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1170 ;; Start with point after block name and comma |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1171 (goto-char (match-end 0)) ; needed for XEmacs, could be nil |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1172 nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1173 (1 font-lock-variable-name-face) ; variable names |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1174 ))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1175 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1176 ;; Batch files |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1177 (batch-files |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1178 '("^[ \t]*\\(@[^ \t\n]+\\)" (1 font-lock-string-face))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1179 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1180 ;; FIXME warning. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1181 (fixme |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1182 '("\\<FIXME:" (0 font-lock-warning-face t))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1183 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1184 ;; Labels |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1185 (label |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1186 '("^[ \t]*\\([a-zA-Z]\\sw*:\\)" (1 font-lock-reference-face))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1187 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1188 ;; The goto statement and its label |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1189 (goto |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1190 '("\\(goto\\)[ \t]*,[ \t]*\\([a-zA-Z]\\sw*\\)" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1191 (1 font-lock-keyword-face) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1192 (2 font-lock-reference-face))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1193 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1194 ;; Tags in structure definitions. Note that this definition |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1195 ;; actually collides with labels, so we have to use the same |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1196 ;; face. It also matches named subscript ranges, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1197 ;; e.g. vec{bottom:top]. No good way around this. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1198 (structtag |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1199 '("\\<\\([a-zA-Z][a-zA-Z0-9_]*:\\)[^:]" (1 font-lock-reference-face))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1200 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1201 ;; Structure names |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1202 (structname |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1203 '("\\({\\|\\<inherits\\s-\\)\\s-*\\([a-zA-Z][a-zA-Z0-9_]*\\)[},\t \n]" |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1204 (2 font-lock-function-name-face))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1205 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1206 ;; Keyword parameters, like /xlog or ,xrange=[] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1207 ;; This is anchored to the comma preceeding the keyword. |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1208 ;; Treats continuation lines, works only during whole buffer |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1209 ;; fontification. Slow, use it only in fancy fontification. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1210 (keyword-parameters |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1211 '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\([ \t]*\\(;.*\\)?\n\\)*[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1212 (6 font-lock-reference-face))) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1213 |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1214 ;; System variables start with a bang. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1215 (system-variables |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1216 '("\\(![a-zA-Z_0-9]+\\(\\.\\sw+\\)?\\)" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1217 (1 font-lock-variable-name-face))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1218 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1219 ;; Special and unusual operators (not used because too noisy) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1220 (special-operators |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1221 '("[<>#]" (0 font-lock-keyword-face))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1222 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1223 ;; All operators (not used because too noisy) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1224 (all-operators |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1225 '("[-*^#+<>/]" (0 font-lock-keyword-face))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1226 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1227 ;; Arrows with text property `idlwave-class' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1228 (class-arrows |
47479 | 1229 '(idlwave-match-class-arrows (0 idlwave-class-arrow-face)))) |
1230 | |
1231 (defconst idlwave-font-lock-keywords-1 | |
1232 (list pros-and-functions batch-files) | |
1233 "Subdued level highlighting for IDLWAVE mode.") | |
1234 | |
1235 (defconst idlwave-font-lock-keywords-2 | |
1236 (mapcar 'symbol-value idlwave-default-font-lock-items) | |
1237 "Medium level highlighting for IDLWAVE mode.") | |
1238 | |
1239 (defconst idlwave-font-lock-keywords-3 | |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1240 (list pros-and-functions |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1241 batch-files |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1242 idlwave-idl-keywords |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1243 label goto |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1244 structtag |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1245 structname |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1246 common-blocks |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1247 keyword-parameters |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1248 system-variables |
47479 | 1249 class-arrows) |
1250 "Gaudy level highlighting for IDLWAVE mode.")) | |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1251 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1252 (defun idlwave-match-class-arrows (limit) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1253 ;; Match an object arrow with class property |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1254 (and idlwave-store-inquired-class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1255 (re-search-forward "->" limit 'limit) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1256 (get-text-property (match-beginning 0) 'idlwave-class))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1257 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1258 (defvar idlwave-font-lock-keywords idlwave-font-lock-keywords-2 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1259 "Default expressions to highlight in IDLWAVE mode.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1260 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1261 (defvar idlwave-font-lock-defaults |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1262 '((idlwave-font-lock-keywords |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1263 idlwave-font-lock-keywords-1 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1264 idlwave-font-lock-keywords-2 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1265 idlwave-font-lock-keywords-3) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1266 nil t |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1267 ((?$ . "w") (?_ . "w") (?. . "w") (?| . "w") (?& . "w")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1268 beginning-of-line)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1269 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1270 (put 'idlwave-mode 'font-lock-defaults |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1271 idlwave-font-lock-defaults) ; XEmacs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1272 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1273 (defconst idlwave-comment-line-start-skip "^[ \t]*;" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1274 "Regexp to match the start of a full-line comment. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1275 That is the _beginning_ of a line containing a comment delimiter `;' preceded |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1276 only by whitespace.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1277 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1278 (defconst idlwave-begin-block-reg |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1279 "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1280 "Regular expression to find the beginning of a block. The case does |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1281 not matter. The search skips matches in comments.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1282 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1283 (defconst idlwave-begin-unit-reg "^\\s-*\\(pro\\|function\\)\\>\\|\\`" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1284 "Regular expression to find the beginning of a unit. The case does |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1285 not matter.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1286 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1287 (defconst idlwave-end-unit-reg "^\\s-*\\(pro\\|function\\)\\>\\|\\'" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1288 "Regular expression to find the line that indicates the end of unit. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1289 This line is the end of buffer or the start of another unit. The case does |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1290 not matter. The search skips matches in comments.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1291 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1292 (defconst idlwave-continue-line-reg "\\<\\$" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1293 "Regular expression to match a continued line.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1294 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1295 (defconst idlwave-end-block-reg |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1296 "\\<end\\(\\|case\\|switch\\|else\\|for\\|if\\|rep\\|while\\)\\>" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1297 "Regular expression to find the end of a block. The case does |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1298 not matter. The search skips matches found in comments.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1299 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1300 (defconst idlwave-block-matches |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1301 '(("pro" . "end") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1302 ("function" . "end") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1303 ("case" . "endcase") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1304 ("else" . "endelse") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1305 ("for" . "endfor") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1306 ("then" . "endif") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1307 ("repeat" . "endrep") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1308 ("switch" . "endswitch") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1309 ("while" . "endwhile")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1310 "Matches between statements and the corresponding END variant. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1311 The cars are the reserved words starting a block. If the block really |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1312 begins with BEGIN, the cars are the reserved words before the begin |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1313 which can be used to identify the block type. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1314 This is used to check for the correct END type, to close blocks and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1315 to expand generic end statements to their detailed form.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1316 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1317 (defconst idlwave-block-match-regexp |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1318 "\\<\\(else\\|for\\|then\\|repeat\\|while\\)\\>" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1319 "Regular expression matching reserved words which can stand before |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1320 blocks starting with a BEGIN statement. The matches must have associations |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1321 `idlwave-block-matches'") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1322 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1323 (defconst idlwave-identifier "[a-zA-Z_][a-zA-Z0-9$_]*" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1324 "Regular expression matching an IDL identifier.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1325 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1326 (defconst idlwave-sysvar (concat "!" idlwave-identifier) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1327 "Regular expression matching IDL system variables.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1328 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1329 (defconst idlwave-variable (concat idlwave-identifier "\\|" idlwave-sysvar) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1330 "Regular expression matching IDL variable names.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1331 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1332 (defconst idlwave-label (concat idlwave-identifier ":") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1333 "Regular expression matching IDL labels.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1334 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1335 (defconst idlwave-method-call (concat idlwave-identifier "\\s *->" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1336 "\\(\\s *" idlwave-identifier "::\\)?" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1337 )) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1338 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1339 (defconst idlwave-statement-match |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1340 (list |
45318 | 1341 ;; "endif else" is the only possible "end" that can be |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1342 ;; followed by a statement on the same line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1343 '(endelse . ("end\\(\\|if\\)\\s +else" "end\\(\\|if\\)\\s +else")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1344 ;; all other "end"s can not be followed by a statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1345 (cons 'end (list idlwave-end-block-reg nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1346 '(if . ("if\\>" "then")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1347 '(for . ("for\\>" "do")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1348 '(begin . ("begin\\>" nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1349 '(pdef . ("pro\\>\\|function\\>" nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1350 '(while . ("while\\>" "do")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1351 '(repeat . ("repeat\\>" "repeat")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1352 '(goto . ("goto\\>" nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1353 '(case . ("case\\>" nil)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1354 '(switch . ("switch\\>" nil)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1355 (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1356 "\\(" idlwave-method-call "\\s *\\)?" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1357 idlwave-identifier |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1358 "\\s *(") nil)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1359 (cons 'call (list (concat |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1360 "\\(" idlwave-method-call "\\s *\\)?" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1361 idlwave-identifier |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1362 "\\( *\\($\\|\\$\\)\\|\\s *,\\)") nil)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1363 (cons 'assign (list (concat |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1364 "\\(" idlwave-variable "\\) *=") nil))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1365 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1366 "Associated list of statement matching regular expressions. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1367 Each regular expression matches the start of an IDL statement. The |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1368 first element of each association is a symbol giving the statement |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1369 type. The associated value is a list. The first element of this list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1370 is a regular expression matching the start of an IDL statement for |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1371 identifying the statement type. The second element of this list is a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1372 regular expression for finding a substatement for the type. The |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1373 substatement starts after the end of the found match modulo |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1374 whitespace. If it is nil then the statement has no substatement. The |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1375 list order matters since matching an assignment statement exactly is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1376 not possible without parsing. Thus assignment statement become just |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1377 the leftover unidentified statements containing an equal sign." ) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1378 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1379 (defvar idlwave-fill-function 'auto-fill-function |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1380 "IDL mode auto fill function.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1381 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1382 (defvar idlwave-comment-indent-function 'comment-indent-function |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1383 "IDL mode comment indent function.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1384 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1385 ;; Note that this is documented in the v18 manuals as being a string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1386 ;; of length one rather than a single character. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1387 ;; The code in this file accepts either format for compatibility. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1388 (defvar idlwave-comment-indent-char ?\ |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1389 "Character to be inserted for IDL comment indentation. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1390 Normally a space.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1391 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1392 (defconst idlwave-continuation-char ?$ |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1393 "Character which is inserted as a last character on previous line by |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1394 \\[idlwave-split-line] to begin a continuation line. Normally $.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1395 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1396 (defconst idlwave-mode-version "6.0_em22") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1397 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1398 (defmacro idlwave-keyword-abbrev (&rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1399 "Creates a function for abbrev hooks to call `idlwave-check-abbrev' with args." |
41608
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
1400 `(quote (lambda () |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1401 ,(append '(idlwave-check-abbrev) args)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1402 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1403 ;; If I take the time I can replace idlwave-keyword-abbrev with |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1404 ;; idlwave-code-abbrev and remove the quoted abbrev check from |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1405 ;; idlwave-check-abbrev. Then, e.g, (idlwave-keyword-abbrev 0 t) becomes |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1406 ;; (idlwave-code-abbrev idlwave-check-abbrev 0 t). In fact I should change |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1407 ;; the name of idlwave-check-abbrev to something like idlwave-modify-abbrev. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1408 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1409 (defmacro idlwave-code-abbrev (&rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1410 "Creates a function for abbrev hooks that ensures abbrevs are not quoted. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1411 Specifically, if the abbrev is in a comment or string it is unexpanded. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1412 Otherwise ARGS forms a list that is evaluated." |
41608
45db352a0971
Converted backquote to the new style.
Sam Steingold <sds@gnu.org>
parents:
38436
diff
changeset
|
1413 `(quote (lambda () |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1414 ,(prin1-to-string args) ;; Puts the code in the doc string |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1415 (if (idlwave-quoted) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1416 (progn (unexpand-abbrev) nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1417 ,(append args))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1418 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1419 (defvar idlwave-mode-map (make-sparse-keymap) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1420 "Keymap used in IDL mode.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1421 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1422 (defvar idlwave-mode-syntax-table (make-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1423 "Syntax table in use in `idlwave-mode' buffers.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1424 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1425 (modify-syntax-entry ?+ "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1426 (modify-syntax-entry ?- "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1427 (modify-syntax-entry ?* "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1428 (modify-syntax-entry ?/ "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1429 (modify-syntax-entry ?^ "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1430 (modify-syntax-entry ?# "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1431 (modify-syntax-entry ?= "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1432 (modify-syntax-entry ?% "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1433 (modify-syntax-entry ?< "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1434 (modify-syntax-entry ?> "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1435 (modify-syntax-entry ?\' "\"" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1436 (modify-syntax-entry ?\" "\"" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1437 (modify-syntax-entry ?\\ "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1438 (modify-syntax-entry ?_ "_" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1439 (modify-syntax-entry ?{ "(}" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1440 (modify-syntax-entry ?} "){" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1441 (modify-syntax-entry ?$ "_" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1442 (modify-syntax-entry ?. "." idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1443 (modify-syntax-entry ?\; "<" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1444 (modify-syntax-entry ?\n ">" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1445 (modify-syntax-entry ?\f ">" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1446 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1447 (defvar idlwave-find-symbol-syntax-table |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1448 (copy-syntax-table idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1449 "Syntax table that treats symbol characters as word characters.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1450 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1451 (modify-syntax-entry ?$ "w" idlwave-find-symbol-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1452 (modify-syntax-entry ?_ "w" idlwave-find-symbol-syntax-table) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1453 (modify-syntax-entry ?! "w" idlwave-find-symbol-syntax-table) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1454 (modify-syntax-entry ?. "w" idlwave-find-symbol-syntax-table) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1455 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1456 (defmacro idlwave-with-special-syntax (&rest body) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1457 "Execute BODY with a different syntax table." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1458 `(let ((saved-syntax (syntax-table))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1459 (unwind-protect |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1460 (progn |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1461 (set-syntax-table idlwave-find-symbol-syntax-table) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1462 ,@body) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1463 (set-syntax-table saved-syntax)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1464 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1465 ;(defmacro idlwave-with-special-syntax1 (&rest body) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1466 ; "Execute BODY with a different syntax table." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1467 ; `(let ((saved-syntax (syntax-table))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1468 ; (unwind-protect |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1469 ; (progn |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1470 ; (set-syntax-table idlwave-find-symbol-syntax-table) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1471 ; ,@body) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1472 ; (set-syntax-table saved-syntax)))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1473 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1474 (defun idlwave-action-and-binding (key cmd &optional select) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1475 "KEY and CMD are made into a key binding and an indent action. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1476 KEY is a string - same as for the `define-key' function. CMD is a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1477 function of no arguments or a list to be evaluated. CMD is bound to |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1478 KEY in `idlwave-mode-map' by defining an anonymous function calling |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1479 `self-insert-command' followed by CMD. If KEY contains more than one |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1480 character a binding will only be set if SELECT is 'both. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1481 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1482 \(KEY . CMD\) is also placed in the `idlwave-indent-expand-table', |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1483 replacing any previous value for KEY. If a binding is not set then it |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1484 will instead be placed in `idlwave-indent-action-table'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1485 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1486 If the optional argument SELECT is nil then an action and binding are |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1487 created. If SELECT is 'noaction, then a binding is always set and no |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1488 action is created. If SELECT is 'both then an action and binding |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1489 will both be created even if KEY contains more than one character. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1490 Otherwise, if SELECT is non-nil then only an action is created. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1491 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1492 Some examples: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1493 No spaces before and 1 after a comma |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1494 (idlwave-action-and-binding \",\" '(idlwave-surround 0 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1495 A minimum of 1 space before and after `=' (see `idlwave-expand-equal'). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1496 (idlwave-action-and-binding \"=\" '(idlwave-expand-equal -1 -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1497 Capitalize system variables - action only |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1498 (idlwave-action-and-binding idlwave-sysvar '(capitalize-word 1) t)" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1499 (if (not (equal select 'noaction)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1500 ;; Add action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1501 (let* ((table (if select 'idlwave-indent-action-table |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1502 'idlwave-indent-expand-table)) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
1503 (table-key (regexp-quote key)) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
1504 (cell (assoc table-key (eval table)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1505 (if cell |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1506 ;; Replace action command |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1507 (setcdr cell cmd) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1508 ;; New action |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
1509 (set table (append (eval table) (list (cons table-key cmd))))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1510 ;; Make key binding for action |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1511 (if (or (and (null select) (= (length key) 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1512 (equal select 'noaction) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1513 (equal select 'both)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1514 (define-key idlwave-mode-map key |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1515 (append '(lambda () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1516 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1517 (self-insert-command 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1518 (list (if (listp cmd) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1519 cmd |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1520 (list cmd))))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1521 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1522 (fset 'idlwave-debug-map (make-sparse-keymap)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1523 |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1524 (define-key idlwave-mode-map "\C-c " 'idlwave-hard-tab) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1525 (define-key idlwave-mode-map [(control tab)] 'idlwave-hard-tab) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
1526 ;(define-key idlwave-mode-map "\C-c\C- " 'idlwave-hard-tab) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1527 (define-key idlwave-mode-map "'" 'idlwave-show-matching-quote) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1528 (define-key idlwave-mode-map "\"" 'idlwave-show-matching-quote) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1529 (define-key idlwave-mode-map "\C-g" 'idlwave-keyboard-quit) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1530 (define-key idlwave-mode-map "\C-c;" 'idlwave-toggle-comment-region) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1531 (define-key idlwave-mode-map "\C-\M-a" 'idlwave-beginning-of-subprogram) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1532 (define-key idlwave-mode-map "\C-\M-e" 'idlwave-end-of-subprogram) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1533 (define-key idlwave-mode-map "\C-c{" 'idlwave-beginning-of-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1534 (define-key idlwave-mode-map "\C-c}" 'idlwave-end-of-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1535 (define-key idlwave-mode-map "\C-c]" 'idlwave-close-block) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
1536 (define-key idlwave-mode-map [(meta control h)] 'idlwave-mark-subprogram) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1537 (define-key idlwave-mode-map "\M-\C-n" 'idlwave-forward-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1538 (define-key idlwave-mode-map "\M-\C-p" 'idlwave-backward-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1539 (define-key idlwave-mode-map "\M-\C-d" 'idlwave-down-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1540 (define-key idlwave-mode-map "\M-\C-u" 'idlwave-backward-up-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1541 (define-key idlwave-mode-map "\M-\r" 'idlwave-split-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1542 (define-key idlwave-mode-map "\M-\C-q" 'idlwave-indent-subprogram) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1543 (define-key idlwave-mode-map "\C-c\C-p" 'idlwave-previous-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1544 (define-key idlwave-mode-map "\C-c\C-n" 'idlwave-next-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1545 ;; (define-key idlwave-mode-map "\r" 'idlwave-newline) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1546 ;; (define-key idlwave-mode-map "\t" 'idlwave-indent-line) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1547 (define-key idlwave-mode-map [(shift iso-lefttab)] 'idlwave-indent-statement) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1548 (define-key idlwave-mode-map "\C-c\C-a" 'idlwave-auto-fill-mode) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1549 (define-key idlwave-mode-map "\M-q" 'idlwave-fill-paragraph) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1550 (define-key idlwave-mode-map "\M-s" 'idlwave-edit-in-idlde) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1551 (define-key idlwave-mode-map "\C-c\C-h" 'idlwave-doc-header) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1552 (define-key idlwave-mode-map "\C-c\C-m" 'idlwave-doc-modification) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1553 (define-key idlwave-mode-map "\C-c\C-c" 'idlwave-case) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1554 (define-key idlwave-mode-map "\C-c\C-d" 'idlwave-debug-map) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1555 (when (and (boundp 'idlwave-shell-debug-modifiers) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1556 (listp idlwave-shell-debug-modifiers) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1557 (not (equal idlwave-shell-debug-modifiers '()))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1558 ;; Bind the debug commands also with the special modifiers. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1559 (let ((shift (memq 'shift idlwave-shell-debug-modifiers)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1560 (mods-noshift (delq 'shift |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1561 (copy-sequence idlwave-shell-debug-modifiers)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1562 (define-key idlwave-mode-map |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1563 (vector (append mods-noshift (list (if shift ?C ?c)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1564 'idlwave-shell-save-and-run) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1565 (define-key idlwave-mode-map |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1566 (vector (append mods-noshift (list (if shift ?B ?b)))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1567 'idlwave-shell-break-here) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1568 (define-key idlwave-mode-map |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1569 (vector (append mods-noshift (list (if shift ?E ?e)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1570 'idlwave-shell-run-region))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1571 (define-key idlwave-mode-map "\C-c\C-d\C-c" 'idlwave-shell-save-and-run) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1572 (define-key idlwave-mode-map "\C-c\C-d\C-b" 'idlwave-shell-break-here) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1573 (define-key idlwave-mode-map "\C-c\C-d\C-e" 'idlwave-shell-run-region) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1574 (define-key idlwave-mode-map "\C-c\C-f" 'idlwave-for) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1575 ;; (define-key idlwave-mode-map "\C-c\C-f" 'idlwave-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1576 ;; (define-key idlwave-mode-map "\C-c\C-p" 'idlwave-procedure) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1577 (define-key idlwave-mode-map "\C-c\C-r" 'idlwave-repeat) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1578 (define-key idlwave-mode-map "\C-c\C-w" 'idlwave-while) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1579 (define-key idlwave-mode-map "\C-c\C-k" 'idlwave-kill-autoloaded-buffers) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1580 (define-key idlwave-mode-map "\C-c\C-s" 'idlwave-shell) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1581 (define-key idlwave-mode-map "\C-c\C-l" 'idlwave-shell-recenter-shell-window) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1582 (define-key idlwave-mode-map "\C-c\C-b" 'idlwave-list-buffer-load-path-shadows) |
27185
ae5b17b9c403
fixed some bugs associated with the new file names
Carsten Dominik <dominik@science.uva.nl>
parents:
27107
diff
changeset
|
1583 (autoload 'idlwave-shell "idlw-shell" |
ae5b17b9c403
fixed some bugs associated with the new file names
Carsten Dominik <dominik@science.uva.nl>
parents:
27107
diff
changeset
|
1584 "Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'." t) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
26956
diff
changeset
|
1585 (autoload 'idlwave-shell-send-command "idlw-shell") |
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
26956
diff
changeset
|
1586 (autoload 'idlwave-shell-recenter-shell-window "idlw-shell" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1587 "Run `idlwave-shell' and switch back to current window" t) |
27107
7b2b73f13427
Renamed idlwave-*.el into idlw-*.el.
Eli Zaretskii <eliz@gnu.org>
parents:
26956
diff
changeset
|
1588 (autoload 'idlwave-shell-save-and-run "idlw-shell" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1589 "Save and run buffer under the shell." t) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1590 (autoload 'idlwave-shell-break-here "idlw-shell" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1591 "Set breakpoint in current line." t) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1592 (autoload 'idlwave-shell-run-region "idlw-shell" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1593 "Compile and run the region." t) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1594 (define-key idlwave-mode-map "\C-c\C-v" 'idlwave-find-module) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
1595 (define-key idlwave-mode-map "\C-c\C-t" 'idlwave-find-module-this-file) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1596 (define-key idlwave-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:
27606
diff
changeset
|
1597 (define-key idlwave-mode-map "\M-?" 'idlwave-context-help) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1598 (define-key idlwave-mode-map [(control meta ?\?)] 'idlwave-online-help) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1599 ;; Pickup both forms of Esc/Meta binding |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1600 (define-key idlwave-mode-map [(meta tab)] 'idlwave-complete) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1601 (define-key idlwave-mode-map [?\e?\t] 'idlwave-complete) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1602 (define-key idlwave-mode-map "\M-\C-i" 'idlwave-complete) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1603 (define-key idlwave-mode-map "\C-c\C-i" 'idlwave-update-routine-info) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1604 (define-key idlwave-mode-map "\C-c=" 'idlwave-resolve) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1605 (define-key idlwave-mode-map |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1606 (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:
27606
diff
changeset
|
1607 'idlwave-mouse-context-help) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1608 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1609 ;; Set action and key bindings. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1610 ;; See description of the function `idlwave-action-and-binding'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1611 ;; Automatically add spaces for the following characters |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1612 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1613 ;; Actions for & are complicated by && |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1614 (idlwave-action-and-binding "&" 'idlwave-custom-ampersand-surround) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1615 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1616 ;; Automatically add spaces to equal sign if not keyword. This needs |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1617 ;; to go ahead of > and <, so >= and <= will be treated correctly |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1618 (idlwave-action-and-binding "=" '(idlwave-expand-equal -1 -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1619 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1620 ;; Actions for > and < are complicated by >=, <=, and ->... |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1621 (idlwave-action-and-binding "<" '(idlwave-custom-ltgtr-surround nil)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1622 (idlwave-action-and-binding ">" '(idlwave-custom-ltgtr-surround 'gtr)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1623 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1624 (idlwave-action-and-binding "," '(idlwave-surround 0 -1 1)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1625 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1626 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1627 ;;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1628 ;;; Abbrev Section |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1629 ;;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1630 ;;; When expanding abbrevs and the abbrev hook moves backward, an extra |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1631 ;;; space is inserted (this is the space typed by the user to expanded |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1632 ;;; the abbrev). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1633 ;;; |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1634 (defvar idlwave-mode-abbrev-table nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1635 "Abbreviation table used for IDLWAVE mode") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1636 (define-abbrev-table 'idlwave-mode-abbrev-table ()) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1637 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1638 (defun idlwave-define-abbrev (name expansion hook &optional noprefix table) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1639 "Define-abbrev with backward compatibility. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1640 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1641 If NOPREFIX is non-nil, don't prepend prefix character. Installs into |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1642 idlwave-mode-abbrev-table unless TABLE is non-nil." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1643 (let ((abbrevs-changed nil) ;; mask the current value to avoid save |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1644 (args (list (or table idlwave-mode-abbrev-table) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1645 (if noprefix name (concat idlwave-abbrev-start-char name)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1646 expansion |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1647 hook))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1648 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1649 (apply 'define-abbrev (append args '(0 t))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1650 (error (apply 'define-abbrev args))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1651 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1652 (condition-case nil |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1653 (modify-syntax-entry (string-to-char idlwave-abbrev-start-char) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1654 "w" idlwave-mode-syntax-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1655 (error nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1656 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1657 ;; |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1658 ;; Templates |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1659 ;; |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1660 (idlwave-define-abbrev "c" "" (idlwave-code-abbrev idlwave-case)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1661 (idlwave-define-abbrev "sw" "" (idlwave-code-abbrev idlwave-switch)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1662 (idlwave-define-abbrev "f" "" (idlwave-code-abbrev idlwave-for)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1663 (idlwave-define-abbrev "fu" "" (idlwave-code-abbrev idlwave-function)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1664 (idlwave-define-abbrev "pr" "" (idlwave-code-abbrev idlwave-procedure)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1665 (idlwave-define-abbrev "r" "" (idlwave-code-abbrev idlwave-repeat)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1666 (idlwave-define-abbrev "w" "" (idlwave-code-abbrev idlwave-while)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1667 (idlwave-define-abbrev "i" "" (idlwave-code-abbrev idlwave-if)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1668 (idlwave-define-abbrev "elif" "" (idlwave-code-abbrev idlwave-elif)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1669 ;; |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1670 ;; Keywords, system functions, conversion routines |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1671 ;; |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1672 (idlwave-define-abbrev "ap" "arg_present()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1673 (idlwave-define-abbrev "b" "begin" (idlwave-keyword-abbrev 0 t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1674 (idlwave-define-abbrev "co" "common" (idlwave-keyword-abbrev 0 t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1675 (idlwave-define-abbrev "cb" "byte()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1676 (idlwave-define-abbrev "cx" "fix()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1677 (idlwave-define-abbrev "cl" "long()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1678 (idlwave-define-abbrev "cf" "float()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1679 (idlwave-define-abbrev "cs" "string()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1680 (idlwave-define-abbrev "cc" "complex()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1681 (idlwave-define-abbrev "cd" "double()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1682 (idlwave-define-abbrev "e" "else" (idlwave-keyword-abbrev 0 t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1683 (idlwave-define-abbrev "ec" "endcase" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1684 (idlwave-define-abbrev "es" "endswitch" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1685 (idlwave-define-abbrev "ee" "endelse" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1686 (idlwave-define-abbrev "ef" "endfor" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1687 (idlwave-define-abbrev "ei" "endif else if" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1688 (idlwave-define-abbrev "el" "endif else" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1689 (idlwave-define-abbrev "en" "endif" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1690 (idlwave-define-abbrev "er" "endrep" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1691 (idlwave-define-abbrev "ew" "endwhile" 'idlwave-show-begin) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1692 (idlwave-define-abbrev "g" "goto," (idlwave-keyword-abbrev 0 t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1693 (idlwave-define-abbrev "h" "help," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1694 (idlwave-define-abbrev "k" "keyword_set()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1695 (idlwave-define-abbrev "n" "n_elements()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1696 (idlwave-define-abbrev "on" "on_error," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1697 (idlwave-define-abbrev "oi" "on_ioerror," (idlwave-keyword-abbrev 0 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1698 (idlwave-define-abbrev "ow" "openw," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1699 (idlwave-define-abbrev "or" "openr," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1700 (idlwave-define-abbrev "ou" "openu," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1701 (idlwave-define-abbrev "p" "print," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1702 (idlwave-define-abbrev "pt" "plot," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1703 (idlwave-define-abbrev "re" "read," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1704 (idlwave-define-abbrev "rf" "readf," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1705 (idlwave-define-abbrev "ru" "readu," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1706 (idlwave-define-abbrev "rt" "return" (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1707 (idlwave-define-abbrev "sc" "strcompress()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1708 (idlwave-define-abbrev "sn" "strlen()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1709 (idlwave-define-abbrev "sl" "strlowcase()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1710 (idlwave-define-abbrev "su" "strupcase()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1711 (idlwave-define-abbrev "sm" "strmid()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1712 (idlwave-define-abbrev "sp" "strpos()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1713 (idlwave-define-abbrev "st" "strput()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1714 (idlwave-define-abbrev "sr" "strtrim()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1715 (idlwave-define-abbrev "t" "then" (idlwave-keyword-abbrev 0 t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1716 (idlwave-define-abbrev "u" "until" (idlwave-keyword-abbrev 0 t)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1717 (idlwave-define-abbrev "wu" "writeu," (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1718 (idlwave-define-abbrev "iap" "if arg_present() then" (idlwave-keyword-abbrev 6)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1719 (idlwave-define-abbrev "ik" "if keyword_set() then" (idlwave-keyword-abbrev 6)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1720 (idlwave-define-abbrev "ine" "if n_elements() eq 0 then" (idlwave-keyword-abbrev 11)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1721 (idlwave-define-abbrev "inn" "if n_elements() ne 0 then" (idlwave-keyword-abbrev 11)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1722 (idlwave-define-abbrev "np" "n_params()" (idlwave-keyword-abbrev 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1723 (idlwave-define-abbrev "s" "size()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1724 (idlwave-define-abbrev "wi" "widget_info()" (idlwave-keyword-abbrev 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1725 (idlwave-define-abbrev "wc" "widget_control," (idlwave-keyword-abbrev 0)) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
1726 (idlwave-define-abbrev "pv" "ptr_valid()" (idlwave-keyword-abbrev 1)) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
1727 (idlwave-define-abbrev "ipv" "if ptr_valid() then" (idlwave-keyword-abbrev 6)) |
63427
6cec4d429edd
idlwave-complete-class-structure-tag-help): Follow error conventions.
Juanma Barranquero <lekktu@gmail.com>
parents:
62772
diff
changeset
|
1728 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1729 ;; This section is reserved words only. (From IDL user manual) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1730 ;; |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1731 (idlwave-define-abbrev "and" "and" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1732 (idlwave-define-abbrev "begin" "begin" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1733 (idlwave-define-abbrev "break" "break" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1734 (idlwave-define-abbrev "case" "case" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1735 (idlwave-define-abbrev "common" "common" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1736 (idlwave-define-abbrev "continue" "continue" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1737 (idlwave-define-abbrev "do" "do" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1738 (idlwave-define-abbrev "else" "else" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1739 (idlwave-define-abbrev "end" "end" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1740 (idlwave-define-abbrev "endcase" "endcase" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1741 (idlwave-define-abbrev "endelse" "endelse" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1742 (idlwave-define-abbrev "endfor" "endfor" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1743 (idlwave-define-abbrev "endif" "endif" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1744 (idlwave-define-abbrev "endrep" "endrep" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1745 (idlwave-define-abbrev "endswitch" "endswitch" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1746 (idlwave-define-abbrev "endwhi" "endwhi" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1747 (idlwave-define-abbrev "endwhile" "endwhile" 'idlwave-show-begin-check t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1748 (idlwave-define-abbrev "eq" "eq" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1749 (idlwave-define-abbrev "for" "for" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1750 (idlwave-define-abbrev "function" "function" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1751 (idlwave-define-abbrev "ge" "ge" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1752 (idlwave-define-abbrev "goto" "goto" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1753 (idlwave-define-abbrev "gt" "gt" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1754 (idlwave-define-abbrev "if" "if" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1755 (idlwave-define-abbrev "le" "le" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1756 (idlwave-define-abbrev "lt" "lt" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1757 (idlwave-define-abbrev "mod" "mod" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1758 (idlwave-define-abbrev "ne" "ne" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1759 (idlwave-define-abbrev "not" "not" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1760 (idlwave-define-abbrev "of" "of" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1761 (idlwave-define-abbrev "on_ioerror" "on_ioerror" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1762 (idlwave-define-abbrev "or" "or" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1763 (idlwave-define-abbrev "pro" "pro" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1764 (idlwave-define-abbrev "repeat" "repeat" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1765 (idlwave-define-abbrev "switch" "switch" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1766 (idlwave-define-abbrev "then" "then" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1767 (idlwave-define-abbrev "until" "until" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1768 (idlwave-define-abbrev "while" "while" (idlwave-keyword-abbrev 0 t) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1769 (idlwave-define-abbrev "xor" "xor" (idlwave-keyword-abbrev 0 t) t) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1770 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1771 (defvar imenu-create-index-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1772 (defvar extract-index-name-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1773 (defvar prev-index-position-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1774 (defvar imenu-extract-index-name-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1775 (defvar imenu-prev-index-position-function) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1776 ;; defined later - so just make the compiler hush |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1777 (defvar idlwave-mode-menu) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1778 (defvar idlwave-mode-debug-menu) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1779 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1780 ;;;###autoload |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1781 (defun idlwave-mode () |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1782 "Major mode for editing IDL source files (version 6.0_em22). |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1783 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1784 The main features of this mode are |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1785 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1786 1. Indentation and Formatting |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1787 -------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1788 Like other Emacs programming modes, C-j inserts a newline and indents. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1789 TAB is used for explicit indentation of the current line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1790 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1791 To start a continuation line, use \\[idlwave-split-line]. This |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1792 function can also be used in the middle of a line to split the line |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1793 at that point. When used inside a long constant string, the string |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1794 is split at that point with the `+' concatenation operator. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1795 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1796 Comments are indented as follows: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1797 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1798 `;;;' Indentation remains unchanged. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1799 `;;' Indent like the surrounding code |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1800 `;' Indent to a minimum column. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1801 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1802 The indentation of comments starting in column 0 is never changed. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1803 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1804 Use \\[idlwave-fill-paragraph] to refill a paragraph inside a |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1805 comment. The indentation of the second line of the paragraph |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1806 relative to the first will be retained. Use |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1807 \\[idlwave-auto-fill-mode] to toggle auto-fill mode for these |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1808 comments. When the variable `idlwave-fill-comment-line-only' is |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1809 nil, code can also be auto-filled and auto-indented. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1810 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1811 To convert pre-existing IDL code to your formatting style, mark the |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1812 entire buffer with \\[mark-whole-buffer] and execute |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1813 \\[idlwave-expand-region-abbrevs]. Then mark the entire buffer |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1814 again followed by \\[indent-region] (`indent-region'). |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1815 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1816 2. Routine Info |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1817 ------------ |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1818 IDLWAVE displays information about the calling sequence and the |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1819 accepted keyword parameters of a procedure or function with |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1820 \\[idlwave-routine-info]. \\[idlwave-find-module] jumps to the |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1821 source file of a module. These commands know about system |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1822 routines, all routines in idlwave-mode buffers and (when the |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1823 idlwave-shell is active) about all modules currently compiled under |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1824 this shell. It also makes use of pre-compiled or custom-scanned |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1825 user and library catalogs many popular libraries ship with by |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1826 default. Use \\[idlwave-update-routine-info] to update this |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1827 information, which is also used for completion (see item 4). |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1828 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1829 3. Online IDL Help |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1830 --------------- |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1831 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1832 \\[idlwave-context-help] displays the IDL documentation relevant |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1833 for the system variable, keyword, or routines at point. A single |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1834 key stroke gets you directly to the right place in the docs. See |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1835 the manual to configure where and how the HTML help is displayed. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1836 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1837 4. Completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1838 ---------- |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1839 \\[idlwave-complete] completes the names of procedures, functions |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1840 class names, keyword parameters, system variables and tags, class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1841 tags, structure tags, filenames and much more. It is context |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1842 sensitive and figures out what is expected at point. Lower case |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1843 strings are completed in lower case, other strings in mixed or |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1844 upper case. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1845 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1846 5. Code Templates and Abbreviations |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1847 -------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1848 Many Abbreviations are predefined to expand to code fragments and templates. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1849 The abbreviations start generally with a `\\`. Some examples |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1850 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1851 \\pr PROCEDURE template |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1852 \\fu FUNCTION template |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1853 \\c CASE statement template |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
1854 \\sw SWITCH statement template |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1855 \\f FOR loop template |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1856 \\r REPEAT Loop template |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1857 \\w WHILE loop template |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1858 \\i IF statement template |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1859 \\elif IF-ELSE statement template |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1860 \\b BEGIN |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1861 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1862 For a full list, use \\[idlwave-list-abbrevs]. Some templates also |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1863 have direct keybindings - see the list of keybindings below. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1864 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1865 \\[idlwave-doc-header] inserts a documentation header at the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1866 beginning of the current program unit (pro, function or main). |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1867 Change log entries can be added to the current program unit with |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1868 \\[idlwave-doc-modification]. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1869 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1870 6. Automatic Case Conversion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1871 ------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1872 The case of reserved words and some abbrevs is controlled by |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1873 `idlwave-reserved-word-upcase' and `idlwave-abbrev-change-case'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1874 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1875 7. Automatic END completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1876 ------------------------ |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1877 If the variable `idlwave-expand-generic-end' is non-nil, each END typed |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1878 will be converted to the specific version, like ENDIF, ENDFOR, etc. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1879 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1880 8. Hooks |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1881 ----- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1882 Loading idlwave.el runs `idlwave-load-hook'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1883 Turning on `idlwave-mode' runs `idlwave-mode-hook'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1884 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1885 9. Documentation and Customization |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1886 ------------------------------- |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1887 Info documentation for this package is available. Use |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1888 \\[idlwave-info] to display (complain to your sysadmin if that does |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1889 not work). For Postscript, PDF, and HTML versions of the |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1890 documentation, check IDLWAVE's homepage at `http://idlwave.org'. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1891 IDLWAVE has customize support - see the group `idlwave'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1892 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1893 10.Keybindings |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1894 ----------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1895 Here is a list of all keybindings of this mode. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1896 If some of the key bindings below show with ??, use \\[describe-key] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1897 followed by the key sequence to see what the key sequence does. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1898 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1899 \\{idlwave-mode-map}" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1900 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1901 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1902 (kill-all-local-variables) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1903 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1904 (if idlwave-startup-message |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1905 (message "Emacs IDLWAVE mode version %s." idlwave-mode-version)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1906 (setq idlwave-startup-message nil) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1907 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1908 (setq local-abbrev-table idlwave-mode-abbrev-table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1909 (set-syntax-table idlwave-mode-syntax-table) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1910 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1911 (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1912 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1913 (make-local-variable idlwave-comment-indent-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1914 (set idlwave-comment-indent-function 'idlwave-comment-hook) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1915 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1916 (set (make-local-variable 'comment-start-skip) ";+[ \t]*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1917 (set (make-local-variable 'comment-start) ";") |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1918 (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1919 (set (make-local-variable 'require-final-newline) t) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1920 (set (make-local-variable 'abbrev-all-caps) t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1921 (set (make-local-variable 'indent-tabs-mode) nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1922 (set (make-local-variable 'completion-ignore-case) t) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1923 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1924 (use-local-map idlwave-mode-map) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1925 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1926 (when (featurep 'easymenu) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1927 (easy-menu-add idlwave-mode-menu idlwave-mode-map) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1928 (easy-menu-add idlwave-mode-debug-menu idlwave-mode-map)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1929 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1930 (setq mode-name "IDLWAVE") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1931 (setq major-mode 'idlwave-mode) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1932 (setq abbrev-mode t) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1933 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1934 (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1935 (setq comment-end "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1936 (set (make-local-variable 'comment-multi-line) nil) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1937 (set (make-local-variable 'paragraph-separate) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
1938 "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1939 (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1940 (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
1941 (set (make-local-variable 'parse-sexp-ignore-comments) t) |
47930
43574ede3ab1
(idlwave-region-active-p): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47479
diff
changeset
|
1942 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1943 ;; Set tag table list to use IDLTAGS as file name. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1944 (if (boundp 'tag-table-alist) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1945 (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1946 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1947 ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1948 ;; Following line is for Emacs - XEmacs uses the corresponding property |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1949 ;; on the `idlwave-mode' symbol. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1950 (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1951 (set (make-local-variable 'font-lock-mark-block-function) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1952 'idlwave-mark-subprogram) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1953 (set (make-local-variable 'font-lock-fontify-region-function) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1954 'idlwave-font-lock-fontify-region) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1955 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1956 ;; Imenu setup |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1957 (set (make-local-variable 'imenu-create-index-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1958 'imenu-default-create-index-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1959 (set (make-local-variable 'imenu-extract-index-name-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1960 'idlwave-unit-name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1961 (set (make-local-variable 'imenu-prev-index-position-function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1962 'idlwave-prev-index-position) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1963 |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1964 ;; HideShow setup |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1965 (add-to-list 'hs-special-modes-alist |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1966 (list 'idlwave-mode |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1967 idlwave-begin-block-reg |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1968 idlwave-end-block-reg |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1969 ";" |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1970 'idlwave-forward-block nil)) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1971 |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
1972 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1973 ;; Make a local post-command-hook and add our hook to it |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1974 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1975 ;; (make-local-hook 'post-command-hook) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1976 (add-hook 'post-command-hook 'idlwave-command-hook nil 'local) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1977 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1978 ;; Make local hooks for buffer updates |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1979 ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1980 ;; (make-local-hook 'kill-buffer-hook) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1981 (add-hook 'kill-buffer-hook 'idlwave-kill-buffer-update nil 'local) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1982 ;; (make-local-hook 'after-save-hook) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1983 ;; (add-hook 'after-save-hook 'idlwave-save-buffer-update nil 'local) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1984 (add-hook 'after-save-hook 'idlwave-revoke-license-to-kill nil 'local) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1985 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1986 ;; Setup directories and file, if necessary |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1987 (idlwave-setup) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1988 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1989 ;; Update the routine info with info about current buffer? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
1990 (idlwave-new-buffer-update) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1991 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1992 ;; Check help location |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1993 (idlwave-help-check-locations) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1994 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1995 ;; Run the mode hook |
62772
f2892faa87d4
* progmodes/ada-mode.el (ada-mode):
Lute Kamstra <lute@gnu.org>
parents:
62575
diff
changeset
|
1996 (run-mode-hooks 'idlwave-mode-hook)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
1997 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1998 (defvar idlwave-setup-done nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
1999 (defun idlwave-setup () |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2000 (unless idlwave-setup-done |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2001 (if (not (file-directory-p idlwave-config-directory)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2002 (make-directory idlwave-config-directory)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2003 (setq |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2004 idlwave-user-catalog-file (expand-file-name |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2005 idlwave-user-catalog-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2006 idlwave-config-directory) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2007 idlwave-xml-system-rinfo-converted-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2008 (expand-file-name |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2009 idlwave-xml-system-rinfo-converted-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2010 idlwave-config-directory) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2011 idlwave-path-file (expand-file-name |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2012 idlwave-path-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2013 idlwave-config-directory)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2014 (idlwave-read-paths) ; we may need these early |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2015 (setq idlwave-setup-done t))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2016 |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2017 (defun idlwave-font-lock-fontify-region (beg end &optional verbose) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2018 "Fontify continuation lines correctly." |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2019 (let (pos) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2020 (save-excursion |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2021 (goto-char beg) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2022 (forward-line -1) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2023 (when (setq pos (idlwave-is-continuation-line)) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2024 (goto-char pos) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2025 (idlwave-beginning-of-statement) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2026 (setq beg (point))))) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2027 (font-lock-default-fontify-region beg end verbose)) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2028 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2029 ;; |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2030 ;; Code Formatting ---------------------------------------------------- |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2031 ;; |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2032 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2033 (defun idlwave-hard-tab () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2034 "Inserts TAB in buffer in current position." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2035 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2036 (insert "\t")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2037 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2038 ;;; This stuff is experimental |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2039 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2040 (defvar idlwave-command-hook nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2041 "If non-nil, a list that can be evaluated using `eval'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2042 It is evaluated in the lisp function `idlwave-command-hook' which is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2043 placed in `post-command-hook'.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2044 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2045 (defun idlwave-command-hook () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2046 "Command run after every command. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2047 Evaluates a non-nil value of the *variable* `idlwave-command-hook' and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2048 sets the variable to zero afterwards." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2049 (and idlwave-command-hook |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2050 (listp idlwave-command-hook) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2051 (condition-case nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2052 (eval idlwave-command-hook) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2053 (error nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2054 (setq idlwave-command-hook nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2055 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2056 ;;; End experiment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2057 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2058 ;; It would be better to use expand.el for better abbrev handling and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2059 ;; versatility. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2060 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2061 (defun idlwave-check-abbrev (arg &optional reserved) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2062 "Reverses abbrev expansion if in comment or string. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2063 Argument ARG is the number of characters to move point |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2064 backward if `idlwave-abbrev-move' is non-nil. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2065 If optional argument RESERVED is non-nil then the expansion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2066 consists of reserved words, which will be capitalized if |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2067 `idlwave-reserved-word-upcase' is non-nil. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2068 Otherwise, the abbrev will be capitalized if `idlwave-abbrev-change-case' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2069 is non-nil, unless its value is \`down in which case the abbrev will be |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2070 made into all lowercase. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2071 Returns non-nil if abbrev is left expanded." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2072 (if (idlwave-quoted) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2073 (progn (unexpand-abbrev) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2074 nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2075 (if (and reserved idlwave-reserved-word-upcase) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2076 (upcase-region last-abbrev-location (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2077 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2078 ((equal idlwave-abbrev-change-case 'down) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2079 (downcase-region last-abbrev-location (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2080 (idlwave-abbrev-change-case |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2081 (upcase-region last-abbrev-location (point))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2082 (if (and idlwave-abbrev-move (> arg 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2083 (if (boundp 'post-command-hook) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2084 (setq idlwave-command-hook (list 'backward-char (1+ arg))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2085 (backward-char arg))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2086 t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2087 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2088 (defun idlwave-in-comment () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2089 "Returns t if point is inside a comment, nil otherwise." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2090 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2091 (let ((here (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2092 (and (idlwave-goto-comment) (> here (point)))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2093 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2094 (defun idlwave-goto-comment () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2095 "Move to start of comment delimiter on current line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2096 Moves to end of line if there is no comment delimiter. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2097 Ignores comment delimiters in strings. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2098 Returns point if comment found and nil otherwise." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2099 (let ((eos (progn (end-of-line) (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2100 (data (match-data)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2101 found) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2102 ;; Look for first comment delimiter not in a string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2103 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2104 (setq found (search-forward comment-start eos 'lim)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2105 (while (and found (idlwave-in-quote)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2106 (setq found (search-forward comment-start eos 'lim))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2107 (store-match-data data) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2108 (and found (not (idlwave-in-quote)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2109 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2110 (backward-char 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2111 (point))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2112 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2113 (defvar transient-mark-mode) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2114 (defvar zmacs-regions) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2115 (defvar mark-active) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2116 (defun idlwave-region-active-p () |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2117 "Is transient-mark-mode on and the region active? |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2118 Works on both Emacs and XEmacs." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2119 (if (featurep 'xemacs) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2120 (and zmacs-regions (region-active-p)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2121 (and transient-mark-mode mark-active))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2122 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2123 (defun idlwave-show-matching-quote () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2124 "Insert quote and show matching quote if this is end of a string." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2125 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2126 (let ((bq (idlwave-in-quote)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2127 (inq last-command-char)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2128 (if (and bq (not (idlwave-in-comment))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2129 (let ((delim (char-after bq))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2130 (insert inq) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2131 (if (eq inq delim) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2132 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2133 (goto-char bq) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2134 (sit-for 1)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2135 ;; Not the end of a string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2136 (insert inq)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2137 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2138 (defun idlwave-show-begin-check () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2139 "Ensure that the previous word was a token before `idlwave-show-begin'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2140 An END token must be preceded by whitespace." |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2141 (if (not (idlwave-quoted)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2142 (if |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2143 (save-excursion |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2144 (backward-word 1) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2145 (backward-char 1) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2146 (looking-at "[ \t\n\f]")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2147 (idlwave-show-begin)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2148 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2149 (defun idlwave-show-begin () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2150 "Finds the start of current block and blinks to it for a second. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2151 Also checks if the correct end statement has been used." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2152 ;; All end statements are reserved words |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2153 ;; Re-indent end line |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2154 ;;(insert-char ?\ 1) ;; So indent, etc. work well |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2155 ;;(backward-char 1) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2156 (let* ((pos (point-marker)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2157 (last-abbrev-marker (copy-marker last-abbrev-location)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2158 (eol-pos (save-excursion (end-of-line) (point))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2159 begin-pos end-pos end end1 ) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2160 (if idlwave-reindent-end (idlwave-indent-line)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2161 (setq last-abbrev-location (marker-position last-abbrev-marker)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2162 (when (and (idlwave-check-abbrev 0 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2163 idlwave-show-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2164 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2165 ;; Move inside current block |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2166 (goto-char last-abbrev-marker) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2167 (idlwave-block-jump-out -1 'nomark) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2168 (setq begin-pos (point)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2169 (idlwave-block-jump-out 1 'nomark) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2170 (setq end-pos (point)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2171 (if (> end-pos eol-pos) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2172 (setq end-pos pos)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2173 (goto-char end-pos) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2174 (setq end (buffer-substring |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2175 (progn |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2176 (skip-chars-backward "a-zA-Z") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2177 (point)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2178 end-pos)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2179 (goto-char begin-pos) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2180 (when (setq end1 (cdr (idlwave-block-master))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2181 (cond |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2182 ((null end1)) ; no-operation |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2183 ((string= (downcase end) (downcase end1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2184 (sit-for 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2185 ((string= (downcase end) "end") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2186 ;; A generic end |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2187 (if idlwave-expand-generic-end |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2188 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2189 (goto-char pos) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2190 (backward-char 3) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2191 (insert (if (string= end "END") (upcase end1) end1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2192 (delete-char 3))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2193 (sit-for 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2194 (t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2195 (beep) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2196 (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2197 end1 end) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2198 (sit-for 1)))))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2199 ;;(delete-char 1)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2200 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2201 (defun idlwave-block-master () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2202 (let ((case-fold-search t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2203 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2204 (cond |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2205 ((looking-at "pro\\|case\\|switch\\|function\\>") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2206 (assoc (downcase (match-string 0)) idlwave-block-matches)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2207 ((looking-at "begin\\>") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2208 (let ((limit (save-excursion |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2209 (idlwave-beginning-of-statement) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2210 (point)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2211 (cond |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2212 ((re-search-backward ":[ \t]*\\=" limit t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2213 ;; seems to be a case thing |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2214 '("begin" . "end")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2215 ((re-search-backward idlwave-block-match-regexp limit t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2216 (assoc (downcase (match-string 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2217 idlwave-block-matches)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2218 (t |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2219 ;; Just a normal block |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2220 '("begin" . "end"))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2221 (t nil))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2222 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2223 (defun idlwave-close-block () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2224 "Terminate the current block with the correct END statement." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2225 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2226 ;; Start new line if we are not in a new line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2227 (unless (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2228 (skip-chars-backward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2229 (bolp)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2230 (let ((idlwave-show-block nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2231 (newline-and-indent))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2232 (let ((last-abbrev-location (point))) ; for upcasing |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2233 (insert "end") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2234 (idlwave-show-begin))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2235 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2236 (defun idlwave-custom-ampersand-surround (&optional is-action) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2237 "Surround &, leaving room for && (which surrround as well)." |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2238 (let* ((prev-char (char-after (- (point) 2))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2239 (next-char (char-after (point))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2240 (amp-left (eq prev-char ?&)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2241 (amp-right (eq next-char ?&)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2242 (len (if amp-left 2 1))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2243 (unless amp-right ;no need to do it twice, amp-left will catch it. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2244 (idlwave-surround -1 (if (or is-action amp-left) -1) len)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2245 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2246 (defun idlwave-custom-ltgtr-surround (gtr &optional is-action) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2247 "Surround > and < by blanks, leaving room for >= and <=, and considering ->." |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2248 (let* ((prev-char (char-after (- (point) 2))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2249 (next-char (char-after (point))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2250 (method-invoke (and gtr (eq prev-char ?-))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2251 (len (if method-invoke 2 1))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2252 (unless (eq next-char ?=) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2253 ;; Key binding: pad only on left, to save for possible >=/<= |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2254 (idlwave-surround -1 (if (or is-action method-invoke) -1) len)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2255 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2256 (defun idlwave-surround (&optional before after length is-action) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2257 "Surround the LENGTH characters before point with blanks. |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2258 LENGTH defaults to 1. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2259 Optional arguments BEFORE and AFTER affect the behavior before and |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2260 after the characters (see also description of `idlwave-make-space'): |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2261 |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2262 nil do nothing |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2263 0 force no spaces |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2264 integer > 0 force exactly n spaces |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2265 integer < 0 at least |n| spaces |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2266 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2267 The function does nothing if any of the following conditions is true: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2268 - `idlwave-surround-by-blank' is nil |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2269 - the character before point is inside a string or comment" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2270 (when (and idlwave-surround-by-blank (not (idlwave-quoted))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2271 (let ((length (or length 1))) ; establish a default for LENGTH |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2272 (backward-char length) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2273 (save-restriction |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2274 (let ((here (point))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2275 (skip-chars-backward " \t") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2276 (if (bolp) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2277 ;; avoid clobbering indent |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2278 (progn |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2279 (move-to-column (idlwave-calculate-indent)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2280 (if (<= (point) here) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2281 (narrow-to-region (point) here)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2282 (goto-char here))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2283 (idlwave-make-space before)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2284 (skip-chars-forward " \t")) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2285 (forward-char length) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2286 (idlwave-make-space after) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2287 ;; Check to see if the line should auto wrap |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2288 (if (and (equal (char-after (1- (point))) ?\ ) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2289 (> (current-column) fill-column)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2290 (funcall auto-fill-function))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2291 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2292 (defun idlwave-make-space (n) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2293 "Make space at point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2294 The space affected is all the spaces and tabs around point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2295 If n is non-nil then point is left abs(n) spaces from the beginning of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2296 the contiguous space. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2297 The amount of space at point is determined by N. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2298 If the value of N is: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2299 nil - do nothing. |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2300 > 0 - exactly N spaces. |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2301 < 0 - a minimum of -N spaces, i.e., do not change if there are |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2302 already -N spaces. |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
2303 0 - no spaces (i.e. remove any existing space)." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2304 (if (integerp n) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2305 (let |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2306 ((start-col (progn (skip-chars-backward " \t") (current-column))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2307 (left (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2308 (end-col (progn (skip-chars-forward " \t") (current-column)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2309 (delete-horizontal-space) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2310 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2311 ((> n 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2312 (idlwave-indent-to (+ start-col n)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2313 (goto-char (+ left n))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2314 ((< n 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2315 (idlwave-indent-to end-col (- n)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2316 (goto-char (- left n))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2317 ;; n = 0, done |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2318 )))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2319 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2320 (defun idlwave-newline () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2321 "Inserts a newline and indents the current and previous line." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2322 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2323 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2324 ;; Handle unterminated single and double quotes |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2325 ;; If not in a comment and in a string then insertion of a newline |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2326 ;; will mean unbalanced quotes. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2327 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2328 (if (and (not (idlwave-in-comment)) (idlwave-in-quote)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2329 (progn (beep) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2330 (message "Warning: unbalanced quotes?"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2331 (newline) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2332 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2333 ;; The current line is being split, the cursor should be at the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2334 ;; beginning of the new line skipping the leading indentation. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2335 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2336 ;; The reason we insert the new line before indenting is that the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2337 ;; indenting could be confused by keywords (e.g. END) on the line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2338 ;; after the split point. This prevents us from just using |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2339 ;; `indent-for-tab-command' followed by `newline-and-indent'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2340 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2341 (beginning-of-line 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2342 (idlwave-indent-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2343 (forward-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2344 (idlwave-indent-line)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2345 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2346 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2347 ;; Use global variable 'comment-column' to set parallel comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2348 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2349 ;; Modeled on lisp.el |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2350 ;; Emacs Lisp and IDL (Wave CL) have identical comment syntax |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2351 (defun idlwave-comment-hook () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2352 "Compute indent for the beginning of the IDL comment delimiter." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2353 (if (or (looking-at idlwave-no-change-comment) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2354 (if idlwave-begin-line-comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2355 (looking-at idlwave-begin-line-comment) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2356 (looking-at "^;"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2357 (current-column) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2358 (if (looking-at idlwave-code-comment) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2359 (if (save-excursion (skip-chars-backward " \t") (bolp)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2360 ;; On line by itself, indent as code |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2361 (let ((tem (idlwave-calculate-indent))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2362 (if (listp tem) (car tem) tem)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2363 ;; after code - do not change |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2364 (current-column)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2365 (skip-chars-backward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2366 (max (if (bolp) 0 (1+ (current-column))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2367 comment-column)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2368 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2369 (defun idlwave-split-line () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2370 "Continue line by breaking line at point and indent the lines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2371 For a code line insert continuation marker. If the line is a line comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2372 then the new line will contain a comment with the same indentation. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2373 Splits strings with the IDL operator `+' if `idlwave-split-line-string' is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2374 non-nil." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2375 (interactive) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2376 ;; Expand abbreviation, just like normal RET would. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2377 (and abbrev-mode (expand-abbrev)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2378 (let (beg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2379 (if (not (idlwave-in-comment)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2380 ;; For code line add continuation. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2381 ;; Check if splitting a string. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2382 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2383 (if (setq beg (idlwave-in-quote)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2384 (if idlwave-split-line-string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2385 ;; Split the string. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2386 (progn (insert (setq beg (char-after beg)) " + " |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2387 idlwave-continuation-char beg) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2388 (backward-char 1) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2389 (newline-and-indent) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2390 (forward-char 1)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2391 ;; Do not split the string. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2392 (beep) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2393 (message "Warning: continuation inside string!!") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2394 (insert " " idlwave-continuation-char)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2395 ;; Not splitting a string. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2396 (if (not (member (char-before) '(?\ ?\t))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2397 (insert " ")) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2398 (insert idlwave-continuation-char) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2399 (newline-and-indent))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2400 (indent-new-comment-line)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2401 ;; Indent previous line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2402 (setq beg (- (point-max) (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2403 (forward-line -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2404 (idlwave-indent-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2405 (goto-char (- (point-max) beg)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2406 ;; Reindent new line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2407 (idlwave-indent-line))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2408 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2409 (defun idlwave-beginning-of-subprogram () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2410 "Moves point to the beginning of the current program unit." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2411 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2412 (idlwave-find-key idlwave-begin-unit-reg -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2413 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2414 (defun idlwave-end-of-subprogram () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2415 "Moves point to the start of the next program unit." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2416 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2417 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2418 (idlwave-find-key idlwave-end-unit-reg 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2419 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2420 (defun idlwave-mark-statement () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2421 "Mark current IDL statement." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2422 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2423 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2424 (let ((end (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2425 (idlwave-beginning-of-statement) |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2426 (push-mark end nil t))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2427 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2428 (defun idlwave-mark-block () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2429 "Mark containing block." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2430 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2431 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2432 (idlwave-backward-up-block -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2433 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2434 (let ((end (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2435 (idlwave-backward-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2436 (idlwave-beginning-of-statement) |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2437 (push-mark end nil t))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2438 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2439 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2440 (defun idlwave-mark-subprogram () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2441 "Put mark at beginning of program, point at end. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2442 The marks are pushed." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2443 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2444 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2445 (idlwave-beginning-of-subprogram) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2446 (let ((beg (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2447 (idlwave-forward-block) |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2448 (push-mark beg nil t)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2449 (exchange-point-and-mark)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2450 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2451 (defun idlwave-backward-up-block (&optional arg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2452 "Move to beginning of enclosing block if prefix ARG >= 0. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2453 If prefix ARG < 0 then move forward to enclosing block end." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2454 (interactive "p") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2455 (idlwave-block-jump-out (- arg) 'nomark)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2456 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2457 (defun idlwave-beginning-of-block () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2458 "Go to the beginning of the current block." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2459 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2460 (idlwave-block-jump-out -1 'nomark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2461 (forward-word 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2462 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2463 (defun idlwave-end-of-block () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2464 "Go to the beginning of the current block." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2465 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2466 (idlwave-block-jump-out 1 'nomark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2467 (backward-word 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2468 |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2469 (defun idlwave-forward-block (&optional arg) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2470 "Move across next nested block." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2471 (interactive) |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2472 (let ((arg (or arg 1))) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2473 (if (idlwave-down-block arg) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2474 (idlwave-block-jump-out arg 'nomark)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2475 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2476 (defun idlwave-backward-block () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2477 "Move backward across previous nested block." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2478 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2479 (if (idlwave-down-block -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2480 (idlwave-block-jump-out -1 'nomark))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2481 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2482 (defun idlwave-down-block (&optional arg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2483 "Go down a block. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2484 With ARG: ARG >= 0 go forwards, ARG < 0 go backwards. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2485 Returns non-nil if successfull." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2486 (interactive "p") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2487 (let (status) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2488 (if (< arg 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2489 ;; Backward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2490 (let ((eos (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2491 (idlwave-block-jump-out -1 'nomark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2492 (point)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2493 (if (setq status (idlwave-find-key |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2494 idlwave-end-block-reg -1 'nomark eos)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2495 (idlwave-beginning-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2496 (message "No nested block before beginning of containing block."))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2497 ;; Forward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2498 (let ((eos (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2499 (idlwave-block-jump-out 1 'nomark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2500 (point)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2501 (if (setq status (idlwave-find-key |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2502 idlwave-begin-block-reg 1 'nomark eos)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2503 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2504 (message "No nested block before end of containing block.")))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2505 status)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2506 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2507 (defun idlwave-mark-doclib () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2508 "Put point at beginning of doc library header, mark at end. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2509 The marks are pushed." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2510 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2511 (let (beg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2512 (here (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2513 (goto-char (point-max)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2514 (if (re-search-backward idlwave-doclib-start nil t) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2515 (progn |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2516 (setq beg (progn (beginning-of-line) (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2517 (if (re-search-forward idlwave-doclib-end nil t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2518 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2519 (forward-line 1) |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
2520 (push-mark beg nil t) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2521 (message "Could not find end of doc library header."))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2522 (message "Could not find doc library header start.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2523 (goto-char here))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2524 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2525 (defun idlwave-current-routine () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2526 "Return (NAME TYPE CLASS) of current routine." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2527 (idlwave-routines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2528 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2529 (idlwave-beginning-of-subprogram) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2530 (if (looking-at "[ \t]*\\<\\(pro\\|function\\)\\>\\s-+\\(\\([a-zA-Z0-9$_]+\\)::\\)?\\([a-zA-Z0-9$_]+\\)") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2531 (let* ((type (if (string= (downcase (match-string 1)) "pro") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2532 'pro 'function)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2533 (class (idlwave-sintern-class (match-string 3))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2534 (name (idlwave-sintern-routine-or-method (match-string 4) class))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2535 (list name type class))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2536 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2537 (defvar idlwave-shell-prompt-pattern) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2538 (defun idlwave-beginning-of-statement () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2539 "Move to beginning of the current statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2540 Skips back past statement continuations. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2541 Point is placed at the beginning of the line whether or not this is an |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2542 actual statement." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2543 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2544 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2545 ((eq major-mode 'idlwave-shell-mode) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2546 (if (re-search-backward idlwave-shell-prompt-pattern nil t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2547 (goto-char (match-end 0)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2548 (t |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2549 (if (save-excursion (forward-line -1) (idlwave-is-continuation-line)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2550 (idlwave-previous-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2551 (beginning-of-line))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2552 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2553 (defun idlwave-previous-statement () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2554 "Moves point to beginning of the previous statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2555 Returns t if the current line before moving is the beginning of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2556 the first non-comment statement in the file, and nil otherwise." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2557 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2558 (let (first-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2559 (if (not (= (forward-line -1) 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2560 ;; first line in file |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2561 t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2562 ;; skip blank lines, label lines, include lines and line comments |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2563 (while (and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2564 ;; The current statement is the first statement until we |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2565 ;; reach another statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2566 (setq first-statement |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2567 (or |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2568 (looking-at idlwave-comment-line-start-skip) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2569 (looking-at "[ \t]*$") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2570 (looking-at (concat "[ \t]*" idlwave-label "[ \t]*$")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2571 (looking-at "^@"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2572 (= (forward-line -1) 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2573 ;; skip continuation lines |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2574 (while (and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2575 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2576 (forward-line -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2577 (idlwave-is-continuation-line)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2578 (= (forward-line -1) 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2579 first-statement))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2580 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2581 (defun idlwave-end-of-statement () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2582 "Moves point to the end of the current IDL statement. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2583 If not in a statement just moves to end of line. Returns position." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2584 (interactive) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2585 (while (and (idlwave-is-continuation-line) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2586 (= (forward-line 1) 0)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2587 (while (and (idlwave-is-comment-or-empty-line) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2588 (= (forward-line 1) 0)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2589 (end-of-line) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2590 (point)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2591 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2592 (defun idlwave-end-of-statement0 () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2593 "Moves point to the end of the current IDL statement. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2594 If not in a statement just moves to end of line. Returns position." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2595 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2596 (while (and (idlwave-is-continuation-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2597 (= (forward-line 1) 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2598 (end-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2599 (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2600 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2601 (defun idlwave-next-statement () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2602 "Moves point to beginning of the next IDL statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2603 Returns t if that statement is the last |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2604 non-comment IDL statement in the file, and nil otherwise." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2605 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2606 (let (last-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2607 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2608 ;; skip blank lines, label lines, include lines and line comments |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2609 (while (and (= (forward-line 1) 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2610 ;; The current statement is the last statement until |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2611 ;; we reach a new statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2612 (setq last-statement |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2613 (or |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2614 (looking-at idlwave-comment-line-start-skip) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2615 (looking-at "[ \t]*$") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2616 (looking-at (concat "[ \t]*" idlwave-label "[ \t]*$")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2617 (looking-at "^@"))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2618 last-statement)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2619 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2620 (defun idlwave-skip-multi-commands (&optional lim) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2621 "Skip past multiple commands on a line (with `&')." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2622 (let ((save-point (point))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2623 (when (re-search-forward ".*&" lim t) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2624 (goto-char (match-end 0)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2625 (if (idlwave-quoted) |
58981
2d3d6e1fecc2
Check for && when skipping multiple commands on a line.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
58297
diff
changeset
|
2626 (goto-char save-point) |
2d3d6e1fecc2
Check for && when skipping multiple commands on a line.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
58297
diff
changeset
|
2627 (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2628 (point))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2629 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2630 (defun idlwave-skip-label-or-case () |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2631 "Skip label or case statement element. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2632 Returns position after label. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2633 If there is no label point is not moved and nil is returned." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2634 ;; Case expressions and labels are terminated by a colon. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2635 ;; So we find the first colon in the line and make sure |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2636 ;; - no `?' is before it (might be a ? b : c) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2637 ;; - it is not in a comment |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2638 ;; - not in a string constant |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2639 ;; - not in parenthesis (like a[0:3]) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2640 ;; - not followed by another ":" in explicit class, ala a->b::c |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2641 ;; As many in this mode, this function is heuristic and not an exact |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2642 ;; parser. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2643 (let* ((start (point)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2644 (eos (save-excursion (idlwave-end-of-statement) (point))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2645 (end (idlwave-find-key ":" 1 'nomark eos))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2646 (if (and end |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2647 (= (nth 0 (parse-partial-sexp start end)) 0) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2648 (not (string-match "\\?" (buffer-substring start end))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2649 (not (string-match "^::" (buffer-substring end eos)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2650 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2651 (forward-char) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2652 (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2653 (goto-char start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2654 nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2655 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2656 (defun idlwave-start-of-substatement (&optional pre) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2657 "Move to start of next IDL substatement after point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2658 Uses the type of the current IDL statement to determine if the next |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2659 statement is on a new line or is a subpart of the current statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2660 Returns point at start of substatement modulo whitespace. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2661 If optional argument is non-nil move to beginning of current |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2662 substatement." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2663 (let ((orig (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2664 (eos (idlwave-end-of-statement)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2665 (ifnest 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2666 st nst last) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2667 (idlwave-beginning-of-statement) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2668 (idlwave-skip-label-or-case) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2669 (if (< (point) orig) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2670 (idlwave-skip-multi-commands orig)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2671 (setq last (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2672 ;; Continue looking for substatements until we are past orig |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2673 (while (and (<= (point) orig) (not (eobp))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2674 (setq last (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2675 (setq nst (nth 1 (cdr (setq st (car (idlwave-statement-type)))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2676 (if (equal (car st) 'if) (setq ifnest (1+ ifnest))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2677 (cond ((and nst |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2678 (idlwave-find-key nst 1 'nomark eos)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2679 (goto-char (match-end 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2680 ((and (> ifnest 0) (idlwave-find-key "\\<else\\>" 1 'nomark eos)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2681 (setq ifnest (1- ifnest)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2682 (goto-char (match-end 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2683 (t (setq ifnest 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2684 (idlwave-next-statement)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2685 (if pre (goto-char last)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2686 ;; If a continuation line starts here, move to next line |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2687 (if (looking-at "[ \t]*\\$\\([ \t]*\\(;\\|$\\)\\)") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2688 (beginning-of-line 2)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2689 (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2690 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2691 (defun idlwave-statement-type () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2692 "Return the type of the current IDL statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2693 Uses `idlwave-statement-match' to return a cons of (type . point) with |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2694 point the ending position where the type was determined. Type is the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2695 association from `idlwave-statement-match', i.e. the cons cell from the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2696 list not just the type symbol. Returns nil if not an identifiable |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2697 statement." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2698 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2699 ;; Skip whitespace within a statement which is spaces, tabs, continuations |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2700 ;; and possibly comments |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2701 (while (looking-at "[ \t]*\\$") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2702 (forward-line 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2703 (skip-chars-forward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2704 (let ((st idlwave-statement-match) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2705 (case-fold-search t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2706 (while (and (not (looking-at (nth 0 (cdr (car st))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2707 (setq st (cdr st)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2708 (if st |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2709 (append st (match-end 0)))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2710 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2711 (defun idlwave-expand-equal (&optional before after is-action) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2712 "Pad '=' with spaces. Two cases: Assignment statement, and keyword |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2713 assignment. Which case is determined using |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2714 `idlwave-start-of-substatement' and `idlwave-statement-type'. The |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2715 equal sign will be surrounded by BEFORE and AFTER blanks. If |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2716 `idlwave-pad-keyword' is t then keyword assignment is treated just |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2717 like assignment statements. When nil, spaces are removed for keyword |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2718 assignment. Any other value keeps the current space around the `='. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2719 Limits in for loops are treated as keyword assignment. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2720 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2721 Starting with IDL 6.0, a number of op= assignments are available. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2722 Since ambiguities of the form: |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2723 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2724 r and= b |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2725 rand= b |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2726 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2727 can occur, alphanumeric operator assignment will never be pre-padded, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2728 only post-padded. You must use a space before these to disambiguate |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2729 \(not just for padding, but for proper parsing by IDL too!). Other |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2730 operators, such as ##=, ^=, etc., will be pre-padded. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2731 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2732 IS-ACTION is ignored. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2733 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2734 See `idlwave-surround'." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2735 (if idlwave-surround-by-blank |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2736 (let |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2737 ((non-an-ops "\\(##\\|\\*\\|\\+\\|-\\|/\\|<\\|>\\|\\^\\)\\=") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2738 (an-ops |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2739 "\\s-\\(AND\\|EQ\\|GE\\|GT\\|LE\\|LT\\|MOD\\|NE\\|OR\\|XOR\\)\\=") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2740 (len 1)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2741 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2742 (save-excursion |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2743 (let ((case-fold-search t)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2744 (backward-char) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2745 (if (or |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2746 (re-search-backward non-an-ops nil t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2747 ;; Why doesn't ##? work for both? |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2748 (re-search-backward "\\(#\\)\\=" nil t)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2749 (setq len (1+ (length (match-string 1)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2750 (when (re-search-backward an-ops nil t) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
2751 ;(setq begin nil) ; won't modify begin |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2752 (setq len (1+ (length (match-string 1)))))))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2753 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2754 (if (eq t idlwave-pad-keyword) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2755 ;; Everything gets padded equally |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2756 (idlwave-surround before after len) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2757 ;; Treating keywords/for variables specially... |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2758 (let ((st (save-excursion ; To catch "for" variables |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2759 (idlwave-start-of-substatement t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2760 (idlwave-statement-type))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2761 (what (save-excursion ; To catch keywords |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2762 (skip-chars-backward "= \t") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2763 (nth 2 (idlwave-where))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2764 (cond ((or (memq what '(function-keyword procedure-keyword)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2765 (memq (caar st) '(for pdef))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2766 (cond |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2767 ((null idlwave-pad-keyword) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2768 (idlwave-surround 0 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2769 ) ; remove space |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2770 (t))) ; leave any spaces alone |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2771 (t (idlwave-surround before after len)))))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2772 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2773 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2774 (defun idlwave-indent-and-action (&optional arg) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2775 "Call `idlwave-indent-line' and do expand actions. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2776 With prefix ARG non-nil, indent the entire sub-statement." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2777 (interactive "p") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2778 (save-excursion |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2779 (if (and idlwave-expand-generic-end |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2780 (re-search-backward "\\<\\(end\\)\\s-*\\=" |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2781 (max 0 (- (point) 10)) t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2782 (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)")) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
2783 (progn (goto-char (match-end 1)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2784 ;;Expand the END abbreviation, just as RET or Space would have. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2785 (if abbrev-mode (expand-abbrev) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2786 (idlwave-show-begin))))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2787 (when (and (not arg) current-prefix-arg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2788 (setq arg current-prefix-arg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2789 (setq current-prefix-arg nil)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2790 (if arg |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2791 (idlwave-indent-statement) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2792 (idlwave-indent-line t))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2793 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2794 (defun idlwave-indent-line (&optional expand) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2795 "Indents current IDL line as code or as a comment. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2796 The actions in `idlwave-indent-action-table' are performed. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2797 If the optional argument EXPAND is non-nil then the actions in |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2798 `idlwave-indent-expand-table' are performed." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2799 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2800 ;; Move point out of left margin. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2801 (if (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2802 (skip-chars-backward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2803 (bolp)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2804 (skip-chars-forward " \t")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2805 (let ((mloc (point-marker))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2806 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2807 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2808 (if (looking-at idlwave-comment-line-start-skip) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2809 ;; Indentation for a line comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2810 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2811 (skip-chars-forward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2812 (idlwave-indent-left-margin (idlwave-comment-hook))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2813 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2814 ;; Code Line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2815 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2816 ;; Before indenting, run action routines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2817 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2818 (if (and expand idlwave-do-actions) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2819 (mapcar 'idlwave-do-action idlwave-indent-expand-table)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2820 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2821 (if idlwave-do-actions |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2822 (mapcar 'idlwave-do-action idlwave-indent-action-table)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2823 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2824 ;; No longer expand abbrevs on the line. The user can do this |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2825 ;; manually using expand-region-abbrevs. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2826 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2827 ;; Indent for code line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2828 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2829 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2830 (if (or |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2831 ;; a label line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2832 (looking-at (concat "^" idlwave-label "[ \t]*$")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2833 ;; a batch command |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2834 (looking-at "^[ \t]*@")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2835 ;; leave flush left |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2836 nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2837 ;; indent the line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2838 (idlwave-indent-left-margin (idlwave-calculate-indent))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2839 ;; Adjust parallel comment |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2840 (end-of-line) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2841 (if (idlwave-in-comment) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2842 ;; Emacs 21 is too smart with fill-column on comment indent |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2843 (let ((fill-column (if (fboundp 'comment-indent-new-line) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2844 (1- (frame-width)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2845 fill-column))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2846 (indent-for-comment))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2847 (goto-char mloc) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2848 ;; Get rid of marker |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
2849 (set-marker mloc nil))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2850 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2851 (defun idlwave-do-action (action) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2852 "Perform an action repeatedly on a line. ACTION is a list (REG |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2853 . FUNC). REG is a regular expression. FUNC is either a function name |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2854 to be called with `funcall' or a list to be evaluated with `eval'. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2855 The action performed by FUNC should leave point after the match for |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2856 REG - otherwise an infinite loop may be entered. FUNC is always |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2857 passed a final argument of 'is-action, so it can discriminate between |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2858 being run as an action, or a key binding" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2859 (let ((action-key (car action)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2860 (action-routine (cdr action))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2861 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2862 (while (idlwave-look-at action-key) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2863 (if (listp action-routine) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2864 (eval (append action-routine '('is-action))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2865 (funcall action-routine 'is-action))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2866 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2867 (defun idlwave-indent-to (col &optional min) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2868 "Indent from point with spaces until column COL. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2869 Inserts space before markers at point." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2870 (if (not min) (setq min 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2871 (insert-before-markers |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
2872 (make-string (max min (- col (current-column))) ?\ ))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2873 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2874 (defun idlwave-indent-left-margin (col) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2875 "Indent the current line to column COL. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2876 Indents such that first non-whitespace character is at column COL |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2877 Inserts spaces before markers at point." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2878 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2879 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2880 (delete-horizontal-space) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2881 (idlwave-indent-to col))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2882 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2883 (defun idlwave-indent-subprogram () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2884 "Indents program unit which contains point." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2885 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2886 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2887 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2888 (idlwave-beginning-of-subprogram) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2889 (let ((beg (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2890 (idlwave-forward-block) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2891 (message "Indenting subprogram...") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2892 (indent-region beg (point) nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2893 (message "Indenting subprogram...done."))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2894 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2895 (defun idlwave-indent-statement () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2896 "Indent current statement, including all continuation lines." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2897 (interactive) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2898 (save-excursion |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2899 (idlwave-beginning-of-statement) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2900 (let ((beg (point))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2901 (idlwave-end-of-statement) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2902 (indent-region beg (point) nil)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2903 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2904 (defun idlwave-calculate-indent () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2905 "Return appropriate indentation for current line as IDL code." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2906 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2907 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2908 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2909 ;; Check for beginning of unit - main (beginning of buffer), pro, or |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2910 ;; function |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2911 ((idlwave-look-at idlwave-begin-unit-reg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2912 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2913 ;; Check for continuation line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2914 ((save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2915 (and (= (forward-line -1) 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2916 (idlwave-is-continuation-line))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2917 (idlwave-calculate-cont-indent)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2918 ;; calculate indent based on previous and current statements |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2919 (t (let* (beg-prev-pos |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2920 (the-indent |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2921 ;; calculate indent based on previous statement |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2922 (save-excursion |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2923 (cond |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2924 ;; Beginning of file |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2925 ((prog1 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2926 (idlwave-previous-statement) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2927 (setq beg-prev-pos (point))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2928 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2929 ;; Main block |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2930 ((idlwave-look-at idlwave-begin-unit-reg t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2931 (+ (idlwave-current-statement-indent) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2932 idlwave-main-block-indent)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2933 ;; Begin block |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2934 ((idlwave-look-at idlwave-begin-block-reg t) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2935 (+ (idlwave-min-current-statement-indent) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2936 idlwave-block-indent)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2937 ;; End Block |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2938 ((idlwave-look-at idlwave-end-block-reg t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2939 (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2940 ;; Match to the *beginning* of the block opener |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2941 (goto-char beg-prev-pos) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2942 (idlwave-block-jump-out -1 'nomark) ; go to begin block |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2943 (idlwave-min-current-statement-indent))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2944 ;; idlwave-end-offset |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2945 ;; idlwave-block-indent)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2946 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2947 ;; Default to current indent |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2948 ((idlwave-current-statement-indent)))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2949 ;; adjust the indentation based on the current statement |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2950 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2951 ;; End block |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2952 ((idlwave-look-at idlwave-end-block-reg) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2953 (+ the-indent idlwave-end-offset)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2954 (the-indent))))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2955 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2956 ;; |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2957 ;; Parentheses indent |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2958 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2959 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2960 (defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2961 "Calculate the continuation indent inside a paren group. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
2962 Returns a cons-cell with (open . indent), where open is the |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2963 location of the open paren" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2964 (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2965 ;; Found an innermost open paren. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2966 (when open |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2967 (goto-char open) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2968 ;; Line up with next word unless this is a closing paren. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2969 (cons open |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2970 (cond |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2971 ;; Plain Kernighan-style nested indent |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2972 (idlwave-indent-parens-nested |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2973 (+ idlwave-continuation-indent (idlwave-current-indent))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2974 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2975 ;; This is a closed paren - line up under open paren. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2976 (close-exp |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2977 (current-column)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2978 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2979 ;; Empty (or just comment) follows -- revert to basic indent |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2980 ((progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2981 ;; Skip paren |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2982 (forward-char 1) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2983 (looking-at "[ \t$]*\\(;.*\\)?$")) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2984 nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2985 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2986 ;; Line up with first word after any blank space |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2987 ((progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2988 (skip-chars-forward " \t") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2989 (current-column)))))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
2990 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2991 (defun idlwave-calculate-cont-indent () |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2992 "Calculates the IDL continuation indent column from the previous |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2993 statement. Note that here previous statement usually means the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2994 beginning of the current statement if this statement is a continuation |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2995 of the previous line. Various special types of continuations, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2996 including assignments, routine definitions, and parenthetical |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2997 groupings, are treated separately." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
2998 (save-excursion |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
2999 (let* ((case-fold-search t) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3000 (end-reg (progn (beginning-of-line) (point))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3001 (beg-last-statement (save-excursion (idlwave-previous-statement) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3002 (point))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3003 (beg-reg (progn (idlwave-start-of-substatement 'pre) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3004 (if (eq (line-beginning-position) end-reg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3005 (goto-char beg-last-statement) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3006 (point)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3007 (basic-indent (+ (idlwave-min-current-statement-indent end-reg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3008 idlwave-continuation-indent)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3009 fancy-nonparen-indent fancy-paren-indent) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3010 (cond |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3011 ;; Align then with its matching if, etc. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3012 ((let ((matchers '(("\\<if\\>" . "[ \t]*then") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3013 ("\\<\\(if\\|end\\(if\\)?\\)\\>" . "[ \t]*else") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3014 ("\\<\\(for\\|while\\)\\>" . "[ \t]*do") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3015 ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" . |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3016 "[ \t]*until") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3017 ("\\<case\\>" . "[ \t]*of"))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3018 match cont-re) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3019 (goto-char end-reg) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3020 (and |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3021 (setq cont-re |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3022 (catch 'exit |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3023 (while (setq match (car matchers)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3024 (if (looking-at (cdr match)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3025 (throw 'exit (car match))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3026 (setq matchers (cdr matchers))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3027 (idlwave-find-key cont-re -1 'nomark beg-last-statement))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3028 (if (looking-at "end") ;; that one's special |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3029 (- (idlwave-current-indent) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3030 (+ idlwave-block-indent idlwave-end-offset)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3031 (idlwave-current-indent))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3032 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3033 ;; Indent in from the previous line for continuing statements |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3034 ((let ((matchers '("\\<then\\>" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3035 "\\<do\\>" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3036 "\\<repeat\\>" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3037 "\\<else\\>")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3038 match) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3039 (catch 'exit |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3040 (goto-char end-reg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3041 (if (/= (forward-line -1) 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3042 (throw 'exit nil)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3043 (while (setq match (car matchers)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3044 (if (looking-at (concat ".*" match "[ \t]*\\$[ \t]*" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3045 "\\(;.*\\)?$")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3046 (throw 'exit t)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3047 (setq matchers (cdr matchers))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3048 (+ idlwave-continuation-indent (idlwave-current-indent))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3049 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3050 ;; Parenthetical indent, either traditional or Kernighan style |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3051 ((setq fancy-paren-indent |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3052 (let* ((end-reg end-reg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3053 (close-exp (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3054 (goto-char end-reg) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3055 (skip-chars-forward " \t") |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3056 (looking-at "\\s)"))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3057 indent-cons) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3058 (catch 'loop |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3059 (while (setq indent-cons (idlwave-calculate-paren-indent |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3060 beg-reg end-reg close-exp)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3061 ;; First permitted containing paren |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3062 (if (or |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3063 idlwave-indent-to-open-paren |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3064 idlwave-indent-parens-nested |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3065 (null (cdr indent-cons)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3066 (< (- (cdr indent-cons) basic-indent) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3067 idlwave-max-extra-continuation-indent)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3068 (throw 'loop (cdr indent-cons))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3069 (setq end-reg (car indent-cons)))))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3070 fancy-paren-indent) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3071 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3072 ;; A continued assignment, or procedure call/definition |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3073 ((and |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3074 (> idlwave-max-extra-continuation-indent 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3075 (setq fancy-nonparen-indent |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3076 (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3077 (goto-char beg-reg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3078 (while (idlwave-look-at "&")) ; skip continued statements |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3079 (cond |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3080 ;; A continued Procedure call or definition |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3081 ((progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3082 (idlwave-look-at "^[ \t]*\\(pro\\|function\\)") ;skip over |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3083 (looking-at "[ \t]*\\([a-zA-Z0-9.$_]+[ \t]*->[ \t]*\\)?[a-zA-Z][:a-zA-Z0-9$_]*[ \t]*\\(,\\)[ \t]*")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3084 (goto-char (match-end 0)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3085 ;; Comment only, or blank line with "$"? Basic indent. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3086 (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3087 nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3088 (current-column))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3089 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3090 ;; Continued assignment (with =): |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3091 ((catch 'assign ; |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3092 (while (looking-at "[^=\n\r]*\\(=\\)[ \t]*") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3093 (goto-char (match-end 0)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3094 (if (null (idlwave-what-function beg-reg)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3095 (throw 'assign t)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3096 (unless (or |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3097 (idlwave-in-quote) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3098 (looking-at "[ \t$]*\\(;.*\\)?$") ; use basic |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3099 (save-excursion |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3100 (goto-char beg-last-statement) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3101 (eq (caar (idlwave-statement-type)) 'for))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3102 (current-column)))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3103 (< (- fancy-nonparen-indent basic-indent) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3104 idlwave-max-extra-continuation-indent)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3105 (if fancy-paren-indent ;calculated but disallowed paren indent |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3106 (+ fancy-nonparen-indent idlwave-continuation-indent) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3107 fancy-nonparen-indent)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3108 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3109 ;; Basic indent, by default |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3110 (t basic-indent))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3111 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3112 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3113 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3114 (defun idlwave-find-key (key-re &optional dir nomark limit) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3115 "Move to next match of the regular expression KEY-RE. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3116 Matches inside comments or string constants will be ignored. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3117 If DIR is negative, the search will be backwards. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3118 At a successful match, the mark is pushed unless NOMARK is non-nil. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3119 Searches are limited to LIMIT. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3120 Searches are case-insensitive and use a special syntax table which |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3121 treats `$' and `_' as word characters. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3122 Return value is the beginning of the match or (in case of failure) nil." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3123 (setq dir (or dir 0)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3124 (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:
27606
diff
changeset
|
3125 (search-func (if (> dir 0) 're-search-forward 're-search-backward)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3126 found) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3127 (idlwave-with-special-syntax |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3128 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3129 (catch 'exit |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3130 (while (funcall search-func key-re limit t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3131 (if (not (idlwave-quoted)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3132 (throw 'exit (setq found (match-beginning 0))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3133 (if (or (and (> dir 0) (eobp)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3134 (and (< dir 0) (bobp))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3135 (throw 'exit nil))))))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3136 (if found |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3137 (progn |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3138 (if (not nomark) (push-mark)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3139 (goto-char found) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3140 found) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3141 nil))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3142 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3143 (defun idlwave-block-jump-out (&optional dir nomark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3144 "When optional argument DIR is non-negative, move forward to end of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3145 current block using the `idlwave-begin-block-reg' and `idlwave-end-block-reg' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3146 regular expressions. When DIR is negative, move backwards to block beginning. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3147 Recursively calls itself to skip over nested blocks. DIR defaults to |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3148 forward. Calls `push-mark' unless the optional argument NOMARK is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3149 non-nil. Movement is limited by the start of program units because of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3150 possibility of unbalanced blocks." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3151 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3152 (or dir (setq dir 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3153 (let* ((here (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3154 (case-fold-search t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3155 (limit (if (>= dir 0) (point-max) (point-min))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3156 (block-limit (if (>= dir 0) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3157 idlwave-begin-block-reg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3158 idlwave-end-block-reg)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3159 found |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3160 (block-reg (concat idlwave-begin-block-reg "\\|" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3161 idlwave-end-block-reg)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3162 (unit-limit (or (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3163 (if (< dir 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3164 (idlwave-find-key |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3165 idlwave-begin-unit-reg dir t limit) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3166 (end-of-line) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3167 (idlwave-find-key |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3168 idlwave-end-unit-reg dir t limit))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3169 limit))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3170 (if (>= dir 0) (end-of-line)) ;Make sure we are in current block |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3171 (if (setq found (idlwave-find-key block-reg dir t unit-limit)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3172 (while (and found (looking-at block-limit)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3173 (if (>= dir 0) (forward-word 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3174 (idlwave-block-jump-out dir t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3175 (setq found (idlwave-find-key block-reg dir t unit-limit)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3176 (if (not nomark) (push-mark here)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3177 (if (not found) (goto-char unit-limit) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3178 (if (>= dir 0) (forward-word 1))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3179 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3180 (defun idlwave-min-current-statement-indent (&optional end-reg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3181 "The minimum indent in the current statement." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3182 (idlwave-beginning-of-statement) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3183 (if (not (idlwave-is-continuation-line)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3184 (idlwave-current-indent) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3185 (let ((min (idlwave-current-indent)) comm-or-empty) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3186 (while (and (= (forward-line 1) 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3187 (or (setq comm-or-empty (idlwave-is-comment-or-empty-line)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3188 (idlwave-is-continuation-line)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3189 (or (null end-reg) (< (point) end-reg))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3190 (unless comm-or-empty (setq min (min min (idlwave-current-indent))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3191 (if (or comm-or-empty (and end-reg (>= (point) end-reg))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3192 min |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3193 (min min (idlwave-current-indent)))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3194 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3195 (defun idlwave-current-statement-indent (&optional last-line) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3196 "Return indentation of the current statement. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3197 If in a statement, moves to beginning of statement before finding indent." |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3198 (if last-line |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3199 (idlwave-end-of-statement) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3200 (idlwave-beginning-of-statement)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3201 (idlwave-current-indent)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3202 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3203 (defun idlwave-current-indent () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3204 "Return the column of the indentation of the current line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3205 Skips any whitespace. Returns 0 if the end-of-line follows the whitespace." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3206 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3207 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3208 (skip-chars-forward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3209 ;; if we are at the end of blank line return 0 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3210 (cond ((eolp) 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3211 ((current-column))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3212 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3213 (defun idlwave-is-continuation-line () |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3214 "Tests if current line is continuation line. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3215 Blank or comment-only lines following regular continuation lines (with |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3216 `$') count as continuations too." |
70572
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3217 (let (p) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3218 (save-excursion |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3219 (or |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3220 (idlwave-look-at "\\<\\$") |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3221 (catch 'loop |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3222 (while (and (looking-at "^[ \t]*\\(;.*\\)?$") |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3223 (eq (forward-line -1) 0)) |
d6353257b05e
(idlwave-push-mark): Removed obsolete compatibility function (Emacs 18/19).
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69822
diff
changeset
|
3224 (if (setq p (idlwave-look-at "\\<\\$")) (throw 'loop p)))))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3225 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3226 (defun idlwave-is-comment-line () |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3227 "Tests if the current line is a comment line." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3228 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3229 (beginning-of-line 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3230 (looking-at "[ \t]*;"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3231 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3232 (defun idlwave-is-comment-or-empty-line () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3233 "Tests if the current line is a comment line." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3234 (save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3235 (beginning-of-line 1) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3236 (looking-at "[ \t]*[;\n]"))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3237 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3238 (defun idlwave-look-at (regexp &optional cont beg) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3239 "Searches current line from current point for REGEXP. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3240 If optional argument CONT is non-nil, searches to the end of |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3241 the current statement. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3242 If optional arg BEG is non-nil, search starts from the beginning of the |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3243 current statement. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3244 Ignores matches that end in a comment or inside a string expression. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3245 Returns point if successful, nil otherwise. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3246 This function produces unexpected results if REGEXP contains quotes or |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3247 a comment delimiter. The search is case insensitive. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3248 If successful leaves point after the match, otherwise, does not move point." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3249 (let ((here (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3250 (case-fold-search t) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3251 (eos (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3252 (if cont (idlwave-end-of-statement) (end-of-line)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3253 (point))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3254 found) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3255 (idlwave-with-special-syntax |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3256 (if beg (idlwave-beginning-of-statement)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3257 (while (and (setq found (re-search-forward regexp eos t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3258 (idlwave-quoted)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3259 (if (not found) (goto-char here)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3260 found)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3261 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3262 (defun idlwave-fill-paragraph (&optional nohang) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3263 "Fills paragraphs in comments. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3264 A paragraph is made up of all contiguous lines having the same comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3265 leader (the leading whitespace before the comment delimiter and the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3266 comment delimiter). In addition, paragraphs are separated by blank |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3267 line comments. The indentation is given by the hanging indent of the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3268 first line, otherwise by the minimum indentation of the lines after |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3269 the first line. The indentation of the first line does not change. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3270 Does not effect code lines. Does not fill comments on the same line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3271 with code. The hanging indent is given by the end of the first match |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3272 matching `idlwave-hang-indent-regexp' on the paragraph's first line . If the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3273 optional argument NOHANG is non-nil then the hanging indent is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3274 ignored." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3275 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3276 ;; check if this is a line comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3277 (if (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3278 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3279 (skip-chars-forward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3280 (looking-at comment-start)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3281 (let |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3282 ((indent 999) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3283 pre here diff fill-prefix-reg bcl first-indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3284 hang start end) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3285 ;; Change tabs to spaces in the surrounding paragraph. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3286 ;; The surrounding paragraph will be the largest containing block of |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3287 ;; contiguous line comments. Thus, we may be changing tabs in |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3288 ;; a much larger area than is needed, but this is the easiest |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3289 ;; brute force way to do it. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3290 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3291 ;; This has the undesirable side effect of replacing the tabs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3292 ;; permanently without the user's request or knowledge. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3293 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3294 (backward-paragraph) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3295 (setq start (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3296 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3297 (forward-paragraph) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3298 (setq end (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3299 (untabify start end) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3300 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3301 (setq here (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3302 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3303 (setq bcl (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3304 (re-search-forward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3305 (concat "^[ \t]*" comment-start "+") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3306 (save-excursion (end-of-line) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3307 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3308 ;; Get the comment leader on the line and its length |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3309 (setq pre (current-column)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3310 ;; the comment leader is the indentation plus exactly the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3311 ;; number of consecutive ";". |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3312 (setq fill-prefix-reg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3313 (concat |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3314 (setq fill-prefix |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3315 (regexp-quote |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3316 (buffer-substring (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3317 (beginning-of-line) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3318 (point)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3319 "[^;]")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3320 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3321 ;; Mark the beginning and end of the paragraph |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3322 (goto-char bcl) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3323 (while (and (looking-at fill-prefix-reg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3324 (not (looking-at paragraph-separate)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3325 (not (bobp))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3326 (forward-line -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3327 ;; Move to first line of paragraph |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3328 (if (/= (point) bcl) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3329 (forward-line 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3330 (setq start (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3331 (goto-char bcl) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3332 (while (and (looking-at fill-prefix-reg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3333 (not (looking-at paragraph-separate)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3334 (not (eobp))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3335 (forward-line 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3336 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3337 (if (or (not (looking-at fill-prefix-reg)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3338 (looking-at paragraph-separate)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3339 (forward-line -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3340 (end-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3341 ;; if at end of buffer add a newline (need this because |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3342 ;; fill-region needs END to be at the beginning of line after |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3343 ;; the paragraph or it will add a line). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3344 (if (eobp) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3345 (progn (insert ?\n) (backward-char 1))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3346 ;; Set END to the beginning of line after the paragraph |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3347 ;; END is calculated as distance from end of buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3348 (setq end (- (point-max) (point) 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3349 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3350 ;; Calculate the indentation for the paragraph. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3351 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3352 ;; In the following while statements, after one iteration |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3353 ;; point will be at the beginning of a line in which case |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3354 ;; the while will not be executed for the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3355 ;; the first paragraph line and thus will not affect the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3356 ;; indentation. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3357 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3358 ;; First check to see if indentation is based on hanging indent. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3359 (if (and (not nohang) idlwave-hanging-indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3360 (setq hang |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3361 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3362 (goto-char start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3363 (idlwave-calc-hanging-indent)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3364 ;; Adjust lines of paragraph by inserting spaces so that |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3365 ;; each line's indent is at least as great as the hanging |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3366 ;; indent. This is needed for fill-paragraph to work with |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3367 ;; a fill-prefix. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3368 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3369 (setq indent hang) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3370 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3371 (while (> (point) start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3372 (re-search-forward comment-start-skip |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3373 (save-excursion (end-of-line) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3374 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3375 (if (> (setq diff (- indent (current-column))) 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3376 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3377 (if (>= here (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3378 ;; adjust the original location for the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3379 ;; inserted text. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3380 (setq here (+ here diff))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3381 (insert (make-string diff ?\ )))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3382 (forward-line -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3383 ) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3384 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3385 ;; No hang. Instead find minimum indentation of paragraph |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3386 ;; after first line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3387 ;; For the following while statement, since START is at the |
45318 | 3388 ;; beginning of line and END is at the end of line |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3389 ;; point is greater than START at least once (which would |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3390 ;; be the case for a single line paragraph). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3391 (while (> (point) start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3392 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3393 (setq indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3394 (min indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3395 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3396 (re-search-forward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3397 comment-start-skip |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3398 (save-excursion (end-of-line) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3399 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3400 (current-column)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3401 (forward-line -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3402 ) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3403 (setq fill-prefix (concat fill-prefix |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3404 (make-string (- indent pre) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3405 ?\ ))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3406 ;; first-line indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3407 (setq first-indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3408 (max |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3409 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3410 (re-search-forward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3411 comment-start-skip |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3412 (save-excursion (end-of-line) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3413 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3414 (current-column)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3415 indent)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3416 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3417 ;; try to keep point at its original place |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3418 (goto-char here) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3419 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3420 ;; In place of the more modern fill-region-as-paragraph, a hack |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3421 ;; to keep whitespace untouched on the first line within the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3422 ;; indent length and to preserve any indent on the first line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3423 ;; (first indent). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3424 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3425 (setq diff |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3426 (buffer-substring start (+ start first-indent -1))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3427 (subst-char-in-region start (+ start first-indent -1) ?\ ?~ nil) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3428 (fill-region-as-paragraph |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3429 start |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3430 (- (point-max) end) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3431 (current-justification) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3432 nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3433 (delete-region start (+ start first-indent -1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3434 (goto-char start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3435 (insert diff)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3436 ;; When we want the point at the beginning of the comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3437 ;; body fill-region will put it at the beginning of the line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3438 (if (bolp) (skip-chars-forward (concat " \t" comment-start))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3439 (setq fill-prefix nil)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3440 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3441 (defun idlwave-calc-hanging-indent () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3442 "Calculate the position of the hanging indent for the comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3443 paragraph. The hanging indent position is given by the first match |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3444 with the `idlwave-hang-indent-regexp'. If `idlwave-use-last-hang-indent' is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3445 non-nil then use last occurrence matching `idlwave-hang-indent-regexp' on |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3446 the line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3447 If not found returns nil." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3448 (if idlwave-use-last-hang-indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3449 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3450 (end-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3451 (if (re-search-backward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3452 idlwave-hang-indent-regexp |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3453 (save-excursion (beginning-of-line) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3454 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3455 (+ (current-column) (length idlwave-hang-indent-regexp)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3456 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3457 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3458 (if (re-search-forward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3459 idlwave-hang-indent-regexp |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3460 (save-excursion (end-of-line) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3461 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3462 (current-column))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3463 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3464 (defun idlwave-auto-fill () |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3465 "Called to break lines in auto fill mode. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3466 Only fills non-comment lines if `idlwave-fill-comment-line-only' is |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3467 non-nil. Places a continuation character at the end of the line if |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3468 not in a comment. Splits strings with IDL concatenation operator `+' |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3469 if `idlwave-auto-fill-split-string' is non-nil." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3470 (if (<= (current-column) fill-column) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3471 nil ; do not to fill |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3472 (if (or (not idlwave-fill-comment-line-only) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3473 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3474 ;; Check for comment line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3475 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3476 (looking-at idlwave-comment-line-start-skip))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3477 (let (beg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3478 (idlwave-indent-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3479 ;; Prevent actions do-auto-fill which calls indent-line-function. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3480 (let (idlwave-do-actions |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3481 (paragraph-start ".") |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3482 (paragraph-separate ".") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3483 (fill-nobreak-predicate |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3484 (if (and (idlwave-in-quote) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3485 idlwave-auto-fill-split-string) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3486 (lambda () ;; We'll need 5 spaces for " ' + $" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3487 (<= (- fill-column (current-column)) 5) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3488 )))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3489 (do-auto-fill)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3490 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3491 (end-of-line 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3492 ;; Indent the split line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3493 (idlwave-indent-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3494 ) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3495 (if (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3496 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3497 (looking-at idlwave-comment-line-start-skip)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3498 ;; A continued line comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3499 ;; We treat continued line comments as part of a comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3500 ;; paragraph. So we check for a hanging indent. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3501 (if idlwave-hanging-indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3502 (let ((here (- (point-max) (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3503 (indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3504 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3505 (forward-line -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3506 (idlwave-calc-hanging-indent)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3507 (if indent |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3508 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3509 ;; Remove whitespace between comment delimiter and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3510 ;; text, insert spaces for appropriate indentation. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3511 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3512 (re-search-forward |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3513 comment-start-skip |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3514 (save-excursion (end-of-line) (point)) t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3515 (delete-horizontal-space) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3516 (idlwave-indent-to indent) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3517 (goto-char (- (point-max) here))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3518 ))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3519 ;; Split code or comment? |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3520 (if (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3521 (end-of-line 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3522 (idlwave-in-comment)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3523 ;; Splitting a non-full-line comment. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3524 ;; Insert the comment delimiter from split line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3525 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3526 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3527 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3528 (skip-chars-forward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3529 ;; Insert blank to keep off beginning of line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3530 (insert " " |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3531 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3532 (forward-line -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3533 (buffer-substring (idlwave-goto-comment) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3534 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3535 (skip-chars-forward "; ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3536 (point)))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3537 (idlwave-indent-line)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3538 ;; Split code line - add continuation character |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3539 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3540 (end-of-line 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3541 ;; Check to see if we split a string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3542 (if (and (setq beg (idlwave-in-quote)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3543 idlwave-auto-fill-split-string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3544 ;; Split the string and concatenate. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3545 ;; The first extra space is for the space |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3546 ;; the line was split. That space was removed. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3547 (insert " " (char-after beg) " +")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3548 (insert " $")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3549 (if beg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3550 (if idlwave-auto-fill-split-string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3551 ;; Make the second part of continued string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3552 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3553 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3554 (skip-chars-forward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3555 (insert (char-after beg))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3556 ;; Warning |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3557 (beep) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3558 (message "Warning: continuation inside a string."))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3559 ;; Although do-auto-fill (via indent-new-comment-line) calls |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3560 ;; idlwave-indent-line for the new line, re-indent again |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3561 ;; because of the addition of the continuation character. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3562 (idlwave-indent-line)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3563 ))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3564 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3565 (defun idlwave-auto-fill-mode (arg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3566 "Toggle auto-fill mode for IDL mode. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3567 With arg, turn auto-fill mode on if arg is positive. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3568 In auto-fill mode, inserting a space at a column beyond `fill-column' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3569 automatically breaks the line at a previous space." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3570 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3571 (prog1 (set idlwave-fill-function |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3572 (if (if (null arg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3573 (not (symbol-value idlwave-fill-function)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3574 (> (prefix-numeric-value arg) 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3575 'idlwave-auto-fill |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3576 nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3577 ;; update mode-line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3578 (set-buffer-modified-p (buffer-modified-p)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3579 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3580 ;(defun idlwave-fill-routine-call () |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3581 ; "Fill a routine definition or statement, indenting appropriately." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3582 ; (let ((where (idlwave-where))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3583 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3584 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3585 (defun idlwave-doc-header (&optional nomark ) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3586 "Insert a documentation header at the beginning of the unit. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3587 Inserts the value of the variable idlwave-file-header. Sets mark before |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3588 moving to do insertion unless the optional prefix argument NOMARK |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3589 is non-nil." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3590 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3591 (or nomark (push-mark)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3592 ;; make sure we catch the current line if it begins the unit |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3593 (if idlwave-header-to-beginning-of-file |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3594 (goto-char (point-min)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3595 (end-of-line) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3596 (idlwave-beginning-of-subprogram) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3597 (beginning-of-line) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3598 ;; skip function or procedure line |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3599 (if (idlwave-look-at "\\<\\(pro\\|function\\)\\>") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3600 (progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3601 (idlwave-end-of-statement) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3602 (if (> (forward-line 1) 0) (insert "\n"))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3603 (let ((pos (point))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3604 (if idlwave-file-header |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3605 (cond ((car idlwave-file-header) |
62575
7f40f404ef37
(idlwave-doc-header): Use insert-file-contents.
Richard M. Stallman <rms@gnu.org>
parents:
60925
diff
changeset
|
3606 (insert-file-contents (car idlwave-file-header))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3607 ((stringp (car (cdr idlwave-file-header))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3608 (insert (car (cdr idlwave-file-header)))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3609 (goto-char pos))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3610 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3611 (defun idlwave-default-insert-timestamp () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3612 "Default timestamp insertion function" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3613 (insert (current-time-string)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3614 (insert ", " (user-full-name)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3615 (if (boundp 'user-mail-address) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3616 (insert " <" user-mail-address ">") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3617 (insert " <" (user-login-name) "@" (system-name) ">")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3618 ;; Remove extra spaces from line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3619 (idlwave-fill-paragraph) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3620 ;; Insert a blank line comment to separate from the date entry - |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3621 ;; will keep the entry from flowing onto date line if re-filled. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
3622 (insert "\n;\n;\t\t")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3623 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3624 (defun idlwave-doc-modification () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3625 "Insert a brief modification log at the beginning of the current program. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3626 Looks for an occurrence of the value of user variable |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3627 `idlwave-doc-modifications-keyword' if non-nil. Inserts time and user name |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3628 and places the point for the user to add a log. Before moving, saves |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3629 location on mark ring so that the user can return to previous point." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3630 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3631 (push-mark) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3632 (let* (beg end) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3633 (if (and (or (re-search-backward idlwave-doclib-start nil t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3634 (progn |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3635 (goto-char (point-min)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3636 (re-search-forward idlwave-doclib-start nil t))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3637 (setq beg (match-beginning 0)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3638 (re-search-forward idlwave-doclib-end nil t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3639 (setq end (match-end 0))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3640 (progn |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3641 (goto-char beg) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3642 (if (re-search-forward |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3643 (concat idlwave-doc-modifications-keyword ":") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3644 end t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3645 (end-of-line) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3646 (goto-char end) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3647 (end-of-line -1) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3648 (insert "\n" comment-start "\n") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3649 (insert comment-start " " idlwave-doc-modifications-keyword ":")) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3650 (insert "\n;\n;\t") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3651 (run-hooks 'idlwave-timestamp-hook)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3652 (error "No valid DOCLIB header")))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3653 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3654 ;;; CJC 3/16/93 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3655 ;;; Interface to expand-region-abbrevs which did not work when the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3656 ;;; abbrev hook associated with an abbrev moves point backwards |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3657 ;;; after abbrev expansion, e.g., as with the abbrev '.n'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3658 ;;; The original would enter an infinite loop in attempting to expand |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3659 ;;; .n (it would continually expand and unexpand the abbrev without expanding |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3660 ;;; because the point would keep going back to the beginning of the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3661 ;;; abbrev instead of to the end of the abbrev). We now keep the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3662 ;;; abbrev hook from moving backwards. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3663 ;;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3664 (defun idlwave-expand-region-abbrevs (start end) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3665 "Expand each abbrev occurrence in the region. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3666 Calling from a program, arguments are START END." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3667 (interactive "r") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3668 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3669 (goto-char (min start end)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3670 (let ((idlwave-show-block nil) ;Do not blink |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3671 (idlwave-abbrev-move nil)) ;Do not move |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3672 (expand-region-abbrevs start end 'noquery)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3673 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3674 (defun idlwave-quoted () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3675 "Returns t if point is in a comment or quoted string. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3676 nil otherwise." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3677 (or (idlwave-in-comment) (idlwave-in-quote))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3678 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3679 (defun idlwave-in-quote () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3680 "Returns location of the opening quote |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3681 if point is in a IDL string constant, nil otherwise. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3682 Ignores comment delimiters on the current line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3683 Properly handles nested quotation marks and octal |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3684 constants - a double quote followed by an octal digit." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3685 ;;; Treat an octal inside an apostrophe to be a normal string. Treat a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3686 ;;; double quote followed by an octal digit to be an octal constant |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3687 ;;; rather than a string. Therefore, there is no terminating double |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3688 ;;; quote. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3689 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3690 ;; Because single and double quotes can quote each other we must |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3691 ;; search for the string start from the beginning of line. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3692 (let* ((start (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3693 (eol (progn (end-of-line) (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3694 (bq (progn (beginning-of-line) (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3695 (endq (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3696 (data (match-data)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3697 delim |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3698 found) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3699 (while (< endq start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3700 ;; Find string start |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3701 ;; Don't find an octal constant beginning with a double quote |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3702 (if (re-search-forward "[\"']" eol 'lim) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3703 ;; Find the string end. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3704 ;; In IDL, two consecutive delimiters after the start of a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3705 ;; string act as an |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3706 ;; escape for the delimiter in the string. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3707 ;; Two consecutive delimiters alone (i.e., not after the |
45318 | 3708 ;; start of a string) is the null string. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3709 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3710 ;; Move to position after quote |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3711 (goto-char (1+ (match-beginning 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3712 (setq bq (1- (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3713 ;; Get the string delimiter |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3714 (setq delim (char-to-string (preceding-char))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3715 ;; Check for null string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3716 (if (looking-at delim) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3717 (progn (setq endq (point)) (forward-char 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3718 ;; Look for next unpaired delimiter |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3719 (setq found (search-forward delim eol 'lim)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3720 (while (looking-at delim) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3721 (forward-char 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3722 (setq found (search-forward delim eol 'lim))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3723 (if found |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3724 (setq endq (- (point) 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3725 (setq endq (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3726 )) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3727 (progn (setq bq (point)) (setq endq (point))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3728 (store-match-data data) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3729 ;; return string beginning position or nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3730 (if (> start bq) bq)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3731 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3732 (defun idlwave-is-pointer-dereference (&optional limit) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3733 "Determines if the character after point is a pointer dereference *." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3734 (let ((pos (point))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3735 (and |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3736 (eq (char-after) ?\*) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3737 (not (idlwave-in-quote)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3738 (save-excursion |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3739 (forward-char) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3740 (re-search-backward (concat "\\(" idlwave-idl-keywords |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3741 "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3742 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
3743 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3744 ;; Statement templates |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3745 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3746 ;; Replace these with a general template function, something like |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3747 ;; expand.el (I think there was also something with a name similar to |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3748 ;; dmacro.el) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3749 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3750 (defun idlwave-template (s1 s2 &optional prompt noindent) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3751 "Build a template with optional prompt expression. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3752 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3753 Opens a line if point is not followed by a newline modulo intervening |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3754 whitespace. S1 and S2 are strings. S1 is inserted at point followed |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3755 by S2. Point is inserted between S1 and S2. The case of S1 and S2 is |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3756 adjusted according to `idlwave-abbrev-change-case'. If optional argument |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3757 PROMPT is a string then it is displayed as a message in the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3758 minibuffer. The PROMPT serves as a reminder to the user of an |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3759 expression to enter. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3760 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3761 The lines containing S1 and S2 are reindented using `indent-region' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3762 unless the optional second argument NOINDENT is non-nil." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3763 (if (eq major-mode 'idlwave-shell-mode) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3764 ;; This is a gross hack to avoit template abbrev expansion |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3765 ;; in the shell. FIXME: This is a dirty hack. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3766 (if (and (eq this-command 'self-insert-command) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3767 (equal last-abbrev-location (point))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3768 (insert last-abbrev-text) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3769 (error "No templates in idlwave-shell")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3770 (cond ((eq idlwave-abbrev-change-case 'down) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3771 (setq s1 (downcase s1) s2 (downcase s2))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3772 (idlwave-abbrev-change-case |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3773 (setq s1 (upcase s1) s2 (upcase s2)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3774 (let ((beg (save-excursion (beginning-of-line) (point))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3775 end) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3776 (if (not (looking-at "\\s-*\n")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3777 (open-line 1)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3778 (insert s1) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3779 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3780 (insert s2) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3781 (setq end (point))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3782 (if (not noindent) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3783 (indent-region beg end nil)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3784 (if (stringp prompt) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3785 (message prompt))))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3786 |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3787 (defun idlwave-rw-case (string) |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3788 "Make STRING have the case required by `idlwave-reserved-word-upcase'." |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3789 (if idlwave-reserved-word-upcase |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3790 (upcase string) |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3791 string)) |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3792 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3793 (defun idlwave-elif () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3794 "Build skeleton IDL if-else block." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3795 (interactive) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3796 (idlwave-template |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3797 (idlwave-rw-case "if") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3798 (idlwave-rw-case " then begin\n\nendif else begin\n\nendelse") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3799 "Condition expression")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3800 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3801 (defun idlwave-case () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3802 "Build skeleton IDL case statement." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3803 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3804 (idlwave-template |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3805 (idlwave-rw-case "case") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3806 (idlwave-rw-case " of\n\nendcase") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3807 "Selector expression")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3808 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3809 (defun idlwave-switch () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3810 "Build skeleton IDL switch statement." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3811 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3812 (idlwave-template |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3813 (idlwave-rw-case "switch") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3814 (idlwave-rw-case " of\n\nendswitch") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3815 "Selector expression")) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
3816 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3817 (defun idlwave-for () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3818 "Build skeleton for loop statment." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3819 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3820 (idlwave-template |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3821 (idlwave-rw-case "for") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3822 (idlwave-rw-case " do begin\n\nendfor") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3823 "Loop expression")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3824 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3825 (defun idlwave-if () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3826 "Build skeleton for loop statment." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3827 (interactive) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3828 (idlwave-template |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3829 (idlwave-rw-case "if") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3830 (idlwave-rw-case " then begin\n\nendif") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3831 "Scalar logical expression")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3832 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3833 (defun idlwave-procedure () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3834 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3835 (idlwave-template |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3836 (idlwave-rw-case "pro") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3837 (idlwave-rw-case "\n\nreturn\nend") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3838 "Procedure name")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3839 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3840 (defun idlwave-function () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3841 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3842 (idlwave-template |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3843 (idlwave-rw-case "function") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3844 (idlwave-rw-case "\n\nreturn\nend") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3845 "Function name")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3846 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3847 (defun idlwave-repeat () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3848 (interactive) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3849 (idlwave-template |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3850 (idlwave-rw-case "repeat begin\n\nendrep until") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3851 (idlwave-rw-case "") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3852 "Exit condition")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3853 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3854 (defun idlwave-while () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3855 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3856 (idlwave-template |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3857 (idlwave-rw-case "while") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3858 (idlwave-rw-case " do begin\n\nendwhile") |
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
3859 "Entry condition")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3860 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3861 (defun idlwave-split-string (string &optional pattern) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3862 "Return a list of substrings of STRING which are separated by PATTERN. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3863 If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3864 (or pattern |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3865 (setq pattern "[ \f\t\n\r\v]+")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3866 (let (parts (start 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3867 (while (string-match pattern string start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3868 (setq parts (cons (substring string start (match-beginning 0)) parts) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3869 start (match-end 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3870 (nreverse (cons (substring string start) parts)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3871 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3872 (defun idlwave-replace-string (string replace_string replace_with) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3873 (let* ((start 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3874 (last (length string)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3875 (ret_string "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3876 end) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3877 (while (setq end (string-match replace_string string start)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3878 (setq ret_string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3879 (concat ret_string (substring string start end) replace_with)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3880 (setq start (match-end 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3881 (setq ret_string (concat ret_string (substring string start last))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3882 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3883 (defun idlwave-get-buffer-visiting (file) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3884 ;; Return the buffer currently visiting FILE |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3885 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3886 ((boundp 'find-file-compare-truenames) ; XEmacs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3887 (let ((find-file-compare-truenames t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3888 (get-file-buffer file))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3889 ((fboundp 'find-buffer-visiting) ; Emacs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3890 (find-buffer-visiting file)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3891 (t (error "This should not happen (idlwave-get-buffer-visiting)")))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3892 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3893 (defvar idlwave-outlawed-buffers nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3894 "List of buffer pulled up by idlwave for special reasons. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3895 Buffers in this list may be killed by `idlwave-kill-autoloaded-buffers'.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3896 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3897 (defun idlwave-find-file-noselect (file &optional why) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3898 ;; Return a buffer visiting file. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3899 (or (idlwave-get-buffer-visiting file) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3900 (let ((buf (find-file-noselect file))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3901 (if why (add-to-list 'idlwave-outlawed-buffers (cons buf why))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3902 buf))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3903 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3904 (defun idlwave-kill-autoloaded-buffers () |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3905 "Kill buffers created automatically by IDLWAVE. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3906 Function prompts for a letter to identify the buffers to kill. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3907 Possible letters are: |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3908 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3909 f Buffers created by the command \\[idlwave-find-module] or mouse |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3910 clicks in the routine info window. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3911 s Buffers created by the IDLWAVE Shell to display where execution |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3912 stopped or an error was found. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3913 a Both of the above. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3914 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3915 Buffer containing unsaved changes require confirmation before they are killed." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3916 (interactive) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3917 (if (null idlwave-outlawed-buffers) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3918 (error "No IDLWAVE-created buffers available") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3919 (princ (format "Kill IDLWAVE-created buffers: [f]ind source(%d), [s]hell display(%d), [a]ll ? " |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3920 (idlwave-count-outlawed-buffers 'find) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3921 (idlwave-count-outlawed-buffers 'shell))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3922 (let ((c (read-char))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3923 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3924 ((member c '(?f ?\C-f)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3925 (idlwave-do-kill-autoloaded-buffers 'find)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3926 ((member c '(?s ?\C-s)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3927 (idlwave-do-kill-autoloaded-buffers 'shell)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3928 ((member c '(?a ?\C-a)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3929 (idlwave-do-kill-autoloaded-buffers t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3930 (t (error "Abort")))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3931 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3932 (defun idlwave-count-outlawed-buffers (tag) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3933 "How many outlawed buffers have tag TAG?" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3934 (length (delq nil |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3935 (mapcar |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3936 (lambda (x) (eq (cdr x) tag)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3937 idlwave-outlawed-buffers)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3938 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3939 (defun idlwave-do-kill-autoloaded-buffers (&rest reasons) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3940 "Kill all buffers pulled up by IDLWAVE matching REASONS." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3941 (let* ((list (copy-sequence idlwave-outlawed-buffers)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3942 (cnt 0) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3943 entry) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3944 (while (setq entry (pop list)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3945 (if (buffer-live-p (car entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3946 (and (or (memq t reasons) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3947 (memq (cdr entry) reasons)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3948 (kill-buffer (car entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3949 (incf cnt) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3950 (setq idlwave-outlawed-buffers |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3951 (delq entry idlwave-outlawed-buffers))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3952 (setq idlwave-outlawed-buffers |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3953 (delq entry idlwave-outlawed-buffers)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3954 (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s")))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3955 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3956 (defun idlwave-revoke-license-to-kill () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3957 "Remove BUFFER from the buffers which may be killed. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3958 Killing would be done by `idlwave-do-kill-autoloaded-buffers'. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3959 Intended for `after-save-hook'." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3960 (let* ((buf (current-buffer)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3961 (entry (assq buf idlwave-outlawed-buffers))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3962 ;; Revoke license |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3963 (if entry |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3964 (setq idlwave-outlawed-buffers |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3965 (delq entry idlwave-outlawed-buffers))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3966 ;; Remove this function from the hook. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3967 (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3968 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3969 (defvar idlwave-path-alist) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3970 (defun idlwave-locate-lib-file (file) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3971 ;; Find FILE on the scanned lib path and return a buffer visiting it |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3972 (let* ((dirs idlwave-path-alist) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3973 dir efile) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3974 (catch 'exit |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3975 (while (setq dir (car (pop dirs))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3976 (if (file-regular-p |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3977 (setq efile (expand-file-name file dir))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3978 (throw 'exit efile)))))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3979 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3980 (defun idlwave-expand-lib-file-name (file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3981 ;; Find FILE on the scanned lib path and return a buffer visiting it |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
3982 ;; This is for, e.g., finding source with no user catalog |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3983 (cond |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3984 ((null file) nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3985 ((file-name-absolute-p file) file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
3986 (t (idlwave-locate-lib-file file)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3987 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3988 (defun idlwave-make-tags () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3989 "Creates the IDL tags file IDLTAGS in the current directory from |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3990 the list of directories specified in the minibuffer. Directories may be |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3991 for example: . /usr/local/rsi/idl/lib. All the subdirectories of the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3992 specified top directories are searched if the directory name is prefixed |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3993 by @. Specify @ directories with care, it may take a long, long time if |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3994 you specify /." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3995 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3996 (let (directory directories cmd append status numdirs dir getsubdirs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3997 buffer save_buffer files numfiles item errbuf) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
3998 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
3999 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4000 ;; Read list of directories |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4001 (setq directory (read-string "Tag Directories: " ".")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4002 (setq directories (idlwave-split-string directory "[ \t]+")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4003 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4004 ;; Set etags command, vars |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4005 (setq cmd "etags --output=IDLTAGS --language=none --regex='/[ |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4006 \\t]*[pP][Rr][Oo][ \\t]+\\([^ \\t,]+\\)/' --regex='/[ |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4007 \\t]*[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn][ \\t]+\\([^ \\t,]+\\)/' ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4008 (setq append " ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4009 (setq status 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4010 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4011 ;; For each directory |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4012 (setq numdirs 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4013 (setq dir (nth numdirs directories)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4014 (while (and dir) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4015 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4016 ;; Find the subdirectories |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4017 (if (string-match "^[@]\\(.+\\)$" dir) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4018 (setq getsubdirs t) (setq getsubdirs nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4019 (if (and getsubdirs) (setq dir (substring dir 1 (length dir)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4020 (setq dir (expand-file-name dir)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4021 (if (file-directory-p dir) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4022 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4023 (if (and getsubdirs) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4024 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4025 (setq buffer (get-buffer-create "*idltags*")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4026 (call-process "sh" nil buffer nil "-c" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4027 (concat "find " dir " -type d -print")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4028 (setq save_buffer (current-buffer)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4029 (set-buffer buffer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4030 (setq files (idlwave-split-string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4031 (idlwave-replace-string |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4032 (buffer-substring 1 (point-max)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4033 "\n" "/*.pro ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4034 "[ \t]+")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4035 (set-buffer save_buffer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4036 (kill-buffer buffer)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4037 (setq files (list (concat dir "/*.pro")))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4038 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4039 ;; For each subdirectory |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4040 (setq numfiles 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4041 (setq item (nth numfiles files)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4042 (while (and item) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4043 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4044 ;; Call etags |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4045 (if (not (string-match "^[ \\t]*$" item)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4046 (progn |
65584
6dbba0bd58df
Message format fixes, commit no. 3
Deepak Goel <deego@gnufans.org>
parents:
64085
diff
changeset
|
4047 (message "%s" (concat "Tagging " item "...")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4048 (setq errbuf (get-buffer-create "*idltags-error*")) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4049 (setq status (+ status |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4050 (if (eq 0 (call-process |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4051 "sh" nil errbuf nil "-c" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4052 (concat cmd append item))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4053 0 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4054 1))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4055 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4056 ;; Append additional tags |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4057 (setq append " --append ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4058 (setq numfiles (1+ numfiles)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4059 (setq item (nth numfiles files))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4060 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4061 (setq numfiles (1+ numfiles)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4062 (setq item (nth numfiles files)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4063 ))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4064 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4065 (setq numdirs (1+ numdirs)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4066 (setq dir (nth numdirs directories))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4067 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4068 (setq numdirs (1+ numdirs)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4069 (setq dir (nth numdirs directories))))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4070 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4071 (setq errbuf (get-buffer-create "*idltags-error*")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4072 (if (= status 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4073 (kill-buffer errbuf)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4074 (message "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4075 )) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4076 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4077 (defun idlwave-toggle-comment-region (beg end &optional n) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4078 "Comment the lines in the region if the first non-blank line is |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4079 commented, and conversely, uncomment region. If optional prefix arg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4080 N is non-nil, then for N positive, add N comment delimiters or for N |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4081 negative, remove N comment delimiters. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4082 Uses `comment-region' which does not place comment delimiters on |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4083 blank lines." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4084 (interactive "r\nP") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4085 (if n |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4086 (comment-region beg end (prefix-numeric-value n)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4087 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4088 (goto-char beg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4089 (beginning-of-line) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4090 ;; skip blank lines |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4091 (skip-chars-forward " \t\n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4092 (if (looking-at (concat "[ \t]*\\(" comment-start "+\\)")) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4093 (if (fboundp 'uncomment-region) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4094 (uncomment-region beg end) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4095 (comment-region beg end |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4096 (- (length (buffer-substring |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4097 (match-beginning 1) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4098 (match-end 1)))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4099 (comment-region beg end))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4100 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4101 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4102 ;; ---------------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4103 ;; ---------------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4104 ;; ---------------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4105 ;; ---------------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4106 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4107 ;; Completion and Routine Info |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4108 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4109 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4110 ;; String "intern" functions |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4111 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4112 ;; For the completion and routine info function, we want to normalize |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4113 ;; the case of procedure names etc. We do this by "interning" these |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4114 ;; string is a hand-crafted way. Hashes are used to map the downcase |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4115 ;; version of the strings to the cased versions. Most *-sint-* |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4116 ;; variables consist of *two* hashes, a buffer+shell, followed by a |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4117 ;; system hash. The former is re-scanned, and the latter takes case |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4118 ;; precedence. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4119 ;; |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4120 ;; Since these cased versions are really lisp objects, we can use `eq' |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4121 ;; to search, which is a large performance boost. All new strings |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4122 ;; need to be "sinterned". We do this as early as possible after |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4123 ;; getting these strings from completion or buffer substrings. So |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4124 ;; most of the code can simply assume to deal with "sinterned" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4125 ;; strings. The only exception is that the functions which scan whole |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4126 ;; buffers for routine information do not intern the grabbed strings. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4127 ;; This is only done afterwards. Therefore in these functions it is |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4128 ;; *not* safe to assume the strings can be compared with `eq' and be |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4129 ;; fed into the routine assq functions. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4130 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4131 ;; Here we define the hashing functions. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4132 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4133 ;; The variables which hold the hashes. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4134 (defvar idlwave-sint-routines '(nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4135 (defvar idlwave-sint-keywords '(nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4136 (defvar idlwave-sint-methods '(nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4137 (defvar idlwave-sint-classes '(nil)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4138 (defvar idlwave-sint-dirs '(nil)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4139 (defvar idlwave-sint-libnames '(nil)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4140 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4141 (defun idlwave-reset-sintern (&optional what) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4142 "Reset all sintern hashes." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4143 ;; Make sure the hash functions are accessible. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4144 (if (or (not (fboundp 'gethash)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4145 (not (fboundp 'puthash))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4146 (progn |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4147 (require 'cl) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4148 (or (fboundp 'puthash) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4149 (defalias 'puthash 'cl-puthash)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4150 (let ((entries '((idlwave-sint-routines 1000 10) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4151 (idlwave-sint-keywords 1000 10) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4152 (idlwave-sint-methods 100 10) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4153 (idlwave-sint-classes 10 10)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4154 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4155 ;; Make sure these are lists |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4156 (loop for entry in entries |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4157 for var = (car entry) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4158 do (if (not (consp (symbol-value var))) (set var (list nil)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4159 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4160 ;; Reset the system & library hash |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4161 (when (or (eq what t) (eq what 'syslib) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4162 (null (cdr idlwave-sint-routines))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4163 (loop for entry in entries |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4164 for var = (car entry) for size = (nth 1 entry) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4165 do (setcdr (symbol-value var) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4166 (make-hash-table ':size size ':test 'equal))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4167 (setq idlwave-sint-dirs nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4168 idlwave-sint-libnames nil)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4169 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4170 ;; Reset the buffer & shell hash |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4171 (when (or (eq what t) (eq what 'bufsh) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4172 (null (car idlwave-sint-routines))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4173 (loop for entry in entries |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4174 for var = (car entry) for size = (nth 1 entry) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4175 do (setcar (symbol-value var) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4176 (make-hash-table ':size size ':test 'equal)))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4177 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4178 (defun idlwave-sintern-routine-or-method (name &optional class set) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4179 (if class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4180 (idlwave-sintern-method name set) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4181 (idlwave-sintern-routine name set))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4182 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4183 (defun idlwave-sintern (stype &rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4184 (apply (intern (concat "idlwave-sintern-" (symbol-name stype))) args)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4185 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4186 ;;(defmacro idlwave-sintern (type var) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4187 ;; `(cond ((not (stringp name)) name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4188 ;; ((gethash (downcase name) (cdr ,var))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4189 ;; ((gethash (downcase name) (car ,var))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4190 ;; (set (idlwave-sintern-set name ,type ,var set)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4191 ;; (name))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4192 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4193 (defun idlwave-sintern-routine (name &optional set) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4194 (cond ((not (stringp name)) name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4195 ((gethash (downcase name) (cdr idlwave-sint-routines))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4196 ((gethash (downcase name) (car idlwave-sint-routines))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4197 (set (idlwave-sintern-set name 'routine idlwave-sint-routines set)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4198 (name))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4199 (defun idlwave-sintern-keyword (name &optional set) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4200 (cond ((not (stringp name)) name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4201 ((gethash (downcase name) (cdr idlwave-sint-keywords))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4202 ((gethash (downcase name) (car idlwave-sint-keywords))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4203 (set (idlwave-sintern-set name 'keyword idlwave-sint-keywords set)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4204 (name))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4205 (defun idlwave-sintern-method (name &optional set) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4206 (cond ((not (stringp name)) name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4207 ((gethash (downcase name) (cdr idlwave-sint-methods))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4208 ((gethash (downcase name) (car idlwave-sint-methods))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4209 (set (idlwave-sintern-set name 'method idlwave-sint-methods set)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4210 (name))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4211 (defun idlwave-sintern-class (name &optional set) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4212 (cond ((not (stringp name)) name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4213 ((gethash (downcase name) (cdr idlwave-sint-classes))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4214 ((gethash (downcase name) (car idlwave-sint-classes))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4215 (set (idlwave-sintern-set name 'class idlwave-sint-classes set)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4216 (name))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4217 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4218 (defun idlwave-sintern-dir (dir &optional set) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4219 (car (or (member dir idlwave-sint-dirs) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4220 (setq idlwave-sint-dirs (cons dir idlwave-sint-dirs))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4221 (defun idlwave-sintern-libname (name &optional set) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4222 (car (or (member name idlwave-sint-libnames) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4223 (setq idlwave-sint-libnames (cons name idlwave-sint-libnames))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4224 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4225 (defun idlwave-sintern-set (name type tables set) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4226 (let* ((func (or (cdr (assq type idlwave-completion-case)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4227 'identity)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4228 (iname (funcall (if (eq func 'preserve) 'identity func) name)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4229 (table (if (eq set 'sys) (cdr tables) (car tables)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4230 (puthash (downcase name) iname table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4231 iname)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4232 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4233 (defun idlwave-sintern-keyword-list (kwd-list &optional set) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4234 "Sintern a set of keywords (file (key . link) (key2 . link2) ...)" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4235 (mapcar (lambda(x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4236 (setcar x (idlwave-sintern-keyword (car x) set))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4237 (cdr kwd-list)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4238 kwd-list) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4239 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4240 (defun idlwave-sintern-rinfo-list (list &optional set default-dir) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4241 "Sintern all strings in the rinfo LIST. With optional parameter |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4242 SET: also set new patterns. Probably this will always have to be t. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4243 If DEFAULT-DIR is passed, it is used as the base of the directory" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4244 (let (entry name type class kwds res source call new) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4245 (while list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4246 (setq entry (car list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4247 list (cdr list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4248 name (car entry) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4249 type (nth 1 entry) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4250 class (nth 2 entry) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4251 source (nth 3 entry) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4252 call (nth 4 entry) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4253 kwds (nthcdr 5 entry)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4254 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4255 ;; The class and name |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4256 (if class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4257 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4258 (if (symbolp class) (setq class (symbol-name class))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4259 (setq class (idlwave-sintern-class class set)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4260 (setq name (idlwave-sintern-method name set))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4261 (setq name (idlwave-sintern-routine name set))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4262 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4263 ;; The source |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4264 (let ((source-type (car source)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4265 (source-file (nth 1 source)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4266 (source-dir (if default-dir |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4267 (file-name-as-directory default-dir) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4268 (nth 2 source))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4269 (source-lib (nth 3 source))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4270 (if (stringp source-dir) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4271 (setq source-dir (idlwave-sintern-dir source-dir set))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4272 (if (stringp source-lib) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4273 (setq source-lib (idlwave-sintern-libname source-lib set))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4274 (setq source (list source-type source-file source-dir source-lib))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4275 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4276 ;; The keywords |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4277 (setq kwds (mapcar (lambda (x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4278 (idlwave-sintern-keyword-list x set)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4279 kwds)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4280 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4281 ;; Build a canonicalized list |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4282 (setq new (nconc (list name type class source call) kwds) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4283 res (cons new res))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4284 (nreverse res))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4285 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4286 ;; Creating new sintern tables |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4287 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4288 (defun idlwave-new-sintern-type (tag) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4289 "Define a variable and a function to sintern the new type TAG. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4290 This defines the function `idlwave-sintern-TAG' and the variable |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4291 `idlwave-sint-TAGs'." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4292 (let* ((name (symbol-name tag)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4293 (names (concat name "s")) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4294 (var (intern (concat "idlwave-sint-" names))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4295 (func (intern (concat "idlwave-sintern-" name)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4296 (set var nil) ; initial value of the association list |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4297 (fset func ; set the function |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4298 `(lambda (name &optional set) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4299 (cond ((not (stringp name)) name) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4300 ((cdr (assoc (downcase name) ,var))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4301 (set |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4302 (setq ,var (cons (cons (downcase name) name) ,var)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4303 name) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4304 (name)))))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4305 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4306 (defun idlwave-reset-sintern-type (tag) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4307 "Reset the sintern variable associated with TAG." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4308 (set (intern (concat "idlwave-sint-" (symbol-name tag) "s")) nil)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4309 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4310 ;;--------------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4311 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4312 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4313 ;; The variables which hold the information |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4314 (defvar idlwave-system-routines nil |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4315 "Holds the routine-info obtained by scanning buffers.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4316 (defvar idlwave-buffer-routines nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4317 "Holds the routine-info obtained by scanning buffers.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4318 (defvar idlwave-compiled-routines nil |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4319 "Holds the routine-info obtained by asking the shell.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4320 (defvar idlwave-unresolved-routines nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4321 "Holds the unresolved routine-info obtained by asking the shell.") |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4322 (defvar idlwave-user-catalog-routines nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4323 "Holds the procedure routine-info from the user scan.") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4324 (defvar idlwave-library-catalog-routines nil |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
4325 "Holds the procedure routine-info from the .idlwave_catalog library files.") |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
4326 (defvar idlwave-library-catalog-libname nil |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
4327 "Name of library catalog loaded from .idlwave_catalog files.") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4328 (defvar idlwave-path-alist nil |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4329 "Alist with !PATH directories and zero or more flags if the dir has |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4330 been scanned in a user catalog ('user) or discovered in a library |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4331 catalog \('lib).") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4332 (defvar idlwave-true-path-alist nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4333 "Like `idlwave-path-alist', but with true filenames.") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4334 (defvar idlwave-routines nil |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4335 "Holds the combinded procedure/function/method routine-info.") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4336 (defvar idlwave-class-alist nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4337 "Holds the class names known to IDLWAVE.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4338 (defvar idlwave-class-history nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4339 "The history of classes selected with the minibuffer.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4340 (defvar idlwave-force-class-query nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4341 (defvar idlwave-before-completion-wconf nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4342 "The window configuration just before the completion buffer was displayed.") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4343 (defvar idlwave-last-system-routine-info-cons-cell nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4344 "The last cons cell in the system routine info.") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4345 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4346 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4347 ;; The code to get routine info from different sources. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4348 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4349 (defvar idlwave-system-routines) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4350 (defvar idlwave-catalog-process nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4351 "The background process currently updating the catalog.") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4352 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4353 (defun idlwave-routines () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4354 "Provide a list of IDL routines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4355 This routine loads the builtin routines on the first call. Later it |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4356 only returns the value of the variable." |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4357 (if (and idlwave-catalog-process |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4358 (processp idlwave-catalog-process)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4359 (progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4360 (cond |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4361 ((equal (process-status idlwave-catalog-process) 'exit) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4362 (message "updating........") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4363 (setq idlwave-catalog-process nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4364 (idlwave-update-routine-info '(4))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4365 ((equal (process-status idlwave-catalog-process) 'run) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4366 ;; Keep it running... |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4367 ) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4368 (t |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4369 ;; Something is wrong, get rid of the process |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4370 (message "Problem with catalog process") (beep) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4371 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4372 (kill-process idlwave-catalog-process) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4373 (error nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4374 (setq idlwave-catalog-process nil))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4375 (or idlwave-routines |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4376 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4377 (idlwave-update-routine-info) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4378 ;; return the current value |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4379 idlwave-routines))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4380 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4381 (defvar idlwave-update-rinfo-hook nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4382 "List of functions which should run after a global rinfo update. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4383 Does not run after automatic updates of buffer or the shell.") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
4384 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4385 (defun idlwave-rescan-catalog-directories () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4386 "Rescan the previously selected directories. For batch processing." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4387 (idlwave-update-routine-info '(16))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4388 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4389 (defun idlwave-rescan-asynchronously () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4390 "Dispatch another emacs instance to update the idlwave catalog. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4391 After the process finishes normally, the first access to routine info |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4392 will re-read the catalog." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4393 (interactive) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4394 (if (processp idlwave-catalog-process) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4395 (if (eq (process-status idlwave-catalog-process) 'run) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4396 (if (yes-or-no-p "A catalog-updating process is running. Kill it? ") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4397 (progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4398 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4399 (kill-process idlwave-catalog-process) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4400 (error nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4401 (error "Process killed, no new process started")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4402 (error "Quit")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4403 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4404 (kill-process idlwave-catalog-process) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4405 (error nil)))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4406 (if (or (not idlwave-user-catalog-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4407 (not (stringp idlwave-user-catalog-file)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4408 (not (file-regular-p idlwave-user-catalog-file))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4409 (error "No catalog has been produced yet")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4410 (let* ((emacs (expand-file-name (invocation-name) (invocation-directory))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4411 (args (list "-batch" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4412 "-l" (expand-file-name "~/.emacs") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4413 "-l" "idlwave" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4414 "-f" "idlwave-rescan-catalog-directories")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4415 (process (apply 'start-process "idlcat" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4416 nil emacs args))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4417 (setq idlwave-catalog-process process) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4418 (set-process-sentinel |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4419 process |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4420 (lambda (pro why) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4421 (when (string-match "finished" why) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4422 (setq idlwave-routines nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4423 idlwave-system-routines nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4424 idlwave-catalog-process nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4425 (or (idlwave-start-load-rinfo-timer) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4426 (idlwave-update-routine-info '(4)))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4427 (message "Background job started to update catalog file"))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4428 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4429 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4430 ;; Format for all routine info user catalog, library catalogs, etc.: |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4431 ;; |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4432 ;; ("ROUTINE" type class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4433 ;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") | |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4434 ;; (buffer pro_file dir) | (compiled pro_file dir) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4435 ;; "calling_string" ("HELPFILE" (("KWD1" . link1) ...)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4436 ;; ("HELPFILE2" (("KWD2" . link) ...)) ...) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4437 ;; |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4438 ;; DIR will be supplied dynamically while loading library catalogs, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4439 ;; and is sinterned to save space, as is LIBNAME. PRO_FILE can be a |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4440 ;; complete filepath, in which case DIR is unnecessary. HELPFILE can |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4441 ;; be nil, as can LINK1, etc., if no HTML help is available. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4442 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4443 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4444 (defvar idlwave-load-rinfo-idle-timer) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
4445 (defvar idlwave-shell-path-query) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
4446 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4447 (defun idlwave-update-routine-info (&optional arg no-concatenate) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4448 "Update the internal routine-info lists. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4449 These lists are used by `idlwave-routine-info' (\\[idlwave-routine-info]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4450 and by `idlwave-complete' (\\[idlwave-complete]) to provide information |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4451 about individual routines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4452 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4453 The information can come from 4 sources: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4454 1. IDL programs in the current editing session |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4455 2. Compiled modules in an IDL shell running as Emacs subprocess |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4456 3. A list which covers the IDL system routines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4457 4. A list which covers the prescanned library files. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4458 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4459 Scans all IDLWAVE-mode buffers of the current editing session (see |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4460 `idlwave-scan-all-buffers-for-routine-info'). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4461 When an IDL shell is running, this command also queries the IDL program |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4462 for currently compiled routines. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4463 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4464 With prefix ARG, also reload the system and library lists. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4465 With two prefix ARG's, also rescans the chosen user catalog tree. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4466 With three prefix args, dispatch asynchronous process to do the update. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4467 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4468 If NO-CONCATENATE is non-nil, don't pre-concatenate the routine info |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4469 lists, but instead wait for the shell query to complete and |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4470 asynchronously finish updating routine info. This is set |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4471 automatically when called interactively. When you need routine |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4472 information updated immediately, leave NO-CONCATENATE nil." |
57821
de4da107405e
(idlwave-update-routine-info): Don't use interactive-p.
Richard M. Stallman <rms@gnu.org>
parents:
54770
diff
changeset
|
4473 (interactive "P\np") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4474 ;; Stop any idle processing |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4475 (if (or (and (fboundp 'itimerp) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4476 (itimerp idlwave-load-rinfo-idle-timer)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4477 (and (fboundp 'timerp) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4478 (timerp idlwave-load-rinfo-idle-timer))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4479 (cancel-timer idlwave-load-rinfo-idle-timer)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4480 (cond |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4481 ((equal arg '(64)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4482 ;; Start a background process which updates the catalog. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4483 (idlwave-rescan-asynchronously)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4484 ((equal arg '(16)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4485 ;; Update the user catalog now, and wait for them. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4486 (idlwave-create-user-catalog-file t)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4487 (t |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4488 (let* ((load (or arg |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4489 idlwave-buffer-case-takes-precedence |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4490 (null idlwave-routines))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4491 ;; The override-idle means, even if the idle timer has done some |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4492 ;; preparing work, load and renormalize everything anyway. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4493 (override-idle (or arg idlwave-buffer-case-takes-precedence))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4494 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4495 (setq idlwave-buffer-routines nil |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4496 idlwave-compiled-routines nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
4497 idlwave-unresolved-routines nil) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4498 ;; Reset the appropriate hashes |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4499 (if (get 'idlwave-reset-sintern 'done-by-idle) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4500 ;; reset was already done in idle time, so skip this step now once |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4501 (put 'idlwave-reset-sintern 'done-by-idle nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4502 (idlwave-reset-sintern (cond (load t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4503 ((null idlwave-system-routines) t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4504 (t 'bufsh)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4505 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4506 (if idlwave-buffer-case-takes-precedence |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4507 ;; We can safely scan the buffer stuff first |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4508 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4509 (idlwave-update-buffer-routine-info) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4510 (and load (idlwave-load-all-rinfo override-idle))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4511 ;; We first do the system info, and then the buffers |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4512 (and load (idlwave-load-all-rinfo override-idle)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4513 (idlwave-update-buffer-routine-info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4514 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4515 ;; Let's see if there is a shell |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4516 (let* ((shell-is-running (and (fboundp 'idlwave-shell-is-running) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4517 (idlwave-shell-is-running))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4518 (ask-shell (and shell-is-running |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4519 idlwave-query-shell-for-routine-info))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4520 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4521 ;; Load the library catalogs again, first re-scanning the path |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4522 (when arg |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4523 (if shell-is-running |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4524 (idlwave-shell-send-command idlwave-shell-path-query |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4525 '(progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4526 (idlwave-shell-get-path-info) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4527 (idlwave-scan-library-catalogs)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4528 'hide) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4529 (idlwave-scan-library-catalogs))) |
47930
43574ede3ab1
(idlwave-region-active-p): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47479
diff
changeset
|
4530 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4531 (if (or (not ask-shell) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4532 (not no-concatenate)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4533 ;; 1. If we are not going to ask the shell, we need to do the |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4534 ;; concatenation now. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4535 ;; 2. When this function is called non-interactively, it |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4536 ;; means that someone needs routine info *now*. The |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4537 ;; shell update causes the concatenation to be |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4538 ;; *delayed*, so not in time for the current command. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4539 ;; Therefore, we do a concatenation now, even though |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4540 ;; the shell might do it again. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4541 (idlwave-concatenate-rinfo-lists nil 'run-hooks)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4542 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4543 (when ask-shell |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4544 ;; Ask the shell about the routines it knows of. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
4545 (message "Querying the shell") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4546 (idlwave-shell-update-routine-info nil t))))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4547 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4548 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4549 (defvar idlwave-load-rinfo-steps-done (make-vector 6 nil)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4550 (defvar idlwave-load-rinfo-idle-timer nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4551 (defun idlwave-start-load-rinfo-timer () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4552 (if (or (and (fboundp 'itimerp) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4553 (itimerp idlwave-load-rinfo-idle-timer)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4554 (and (fboundp 'timerp) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4555 (timerp idlwave-load-rinfo-idle-timer))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4556 (cancel-timer idlwave-load-rinfo-idle-timer)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
4557 (setq idlwave-load-rinfo-steps-done (make-vector 6 nil)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4558 (setq idlwave-load-rinfo-idle-timer nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4559 (if (and idlwave-init-rinfo-when-idle-after |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4560 (numberp idlwave-init-rinfo-when-idle-after) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4561 (not (equal 0 idlwave-init-rinfo-when-idle-after)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4562 (not idlwave-routines)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4563 (condition-case nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4564 (progn |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4565 (setq idlwave-load-rinfo-idle-timer |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4566 (run-with-idle-timer |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4567 idlwave-init-rinfo-when-idle-after |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4568 nil 'idlwave-load-rinfo-next-step))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4569 (error nil)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4570 |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
4571 (defvar idlwave-library-routines nil "Obsolete variable.") |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
4572 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4573 ;;------ XML Help routine info system |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4574 (defun idlwave-load-system-routine-info () |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4575 ;; Load the system routine info from the cached routine info file, |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4576 ;; which, if necessary, will be re-created from the XML file on |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4577 ;; disk. As a last fallback, load the (likely outdated) idlw-rinfo |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4578 ;; file distributed with older IDLWAVE versions (<6.0) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4579 (unless (and (load idlwave-xml-system-rinfo-converted-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4580 'noerror 'nomessage) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4581 (idlwave-xml-system-routine-info-up-to-date)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4582 ;; See if we can create it from XML source |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4583 (condition-case nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4584 (idlwave-convert-xml-system-routine-info) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4585 (error |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4586 (unless (load idlwave-xml-system-rinfo-converted-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4587 'noerror 'nomessage) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4588 (if idlwave-system-routines |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4589 (message |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4590 "Failed to load converted routine info, using old conversion.") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4591 (message |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4592 "Failed to convert XML routine info, falling back on idlw-rinfo.") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4593 (if (not (load "idlw-rinfo" 'noerror 'nomessage)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4594 (message |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4595 "Could not locate any system routine information.")))))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4596 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4597 (defun idlwave-xml-system-routine-info-up-to-date() |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4598 (let* ((dir (file-name-as-directory |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4599 (expand-file-name "help/online_help" (idlwave-sys-dir)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4600 (catalog-file (expand-file-name "idl_catalog.xml" dir))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4601 (file-newer-than-file-p ;converted file is newer than catalog |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4602 idlwave-xml-system-rinfo-converted-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4603 catalog-file))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4604 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4605 (defvar idlwave-system-class-info nil) ; Gathered from idlw-rinfo |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4606 (defvar idlwave-system-variables-alist nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4607 "Alist of system variables and the associated structure tags. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4608 Gets set in cached XML rinfo, or `idlw-rinfo.el'.") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4609 (defvar idlwave-executive-commands-alist nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4610 "Alist of system variables and their help files.") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4611 (defvar idlwave-help-special-topic-words nil) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4612 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4613 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4614 (defun idlwave-shorten-syntax (syntax name &optional class) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4615 ;; From a list of syntax statments, shorten with %s and group with "or" |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4616 (let ((case-fold-search t)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4617 (mapconcat |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4618 (lambda (x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4619 (while (string-match name x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4620 (setq x (replace-match "%s" t t x))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4621 (if class |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4622 (while (string-match class x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4623 (setq x (replace-match "%s" t t x)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4624 x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4625 (nreverse syntax) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4626 " or "))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4627 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4628 (defun idlwave-xml-create-class-method-lists (xml-entry) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4629 ;; Create a class list entry from the xml parsed list., returning a |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4630 ;; cons of form (class-entry method-entries). |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4631 (let* ((nameblock (nth 1 xml-entry)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4632 (class (cdr (assq 'name nameblock))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4633 (link (cdr (assq 'link nameblock))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4634 (params (cddr xml-entry)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4635 (case-fold-search t) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4636 class-entry |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4637 method methods-entry extra-kwds |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4638 props get-props set-props init-props inherits |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4639 pelem ptype) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4640 (while params |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4641 (setq pelem (car params)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4642 (when (listp pelem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4643 (setq ptype (car pelem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4644 props (car (cdr pelem))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4645 (cond |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4646 ((eq ptype 'SUPERCLASS) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4647 (push (cdr (assq 'name props)) inherits)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4648 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4649 ((eq ptype 'PROPERTY) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4650 (let ((pname (cdr (assq 'name props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4651 (plink (cdr (assq 'link props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4652 (get (string= (cdr (assq 'get props)) "Yes")) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4653 (set (string= (cdr (assq 'set props)) "Yes")) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4654 (init (string= (cdr (assq 'init props)) "Yes"))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4655 (if get (push (list pname plink) get-props)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4656 (if set (push (list pname plink) set-props)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4657 (if init (push (list pname plink) init-props)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4658 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4659 ((eq ptype 'METHOD) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4660 (setq method (cdr (assq 'name props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4661 (setq extra-kwds ;;Assume all property keywords are gathered already |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4662 (cond |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4663 ((string-match (concat class "::Init") method) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4664 (put 'init-props 'matched t) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4665 init-props) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4666 ((string-match (concat class "::GetProperty") method) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4667 (put 'get-props 'matched t) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4668 get-props) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4669 ((string-match (concat class "::SetProperty") method) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4670 (put 'set-props 'matched t) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4671 set-props) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4672 (t nil))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4673 (setq methods-entry |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4674 (nconc (idlwave-xml-create-rinfo-list pelem class extra-kwds) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4675 methods-entry))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4676 (t))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4677 (setq params (cdr params))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4678 ;(unless (get 'init-props 'matched) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4679 ; (message "Failed to match Init in class %s" class)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4680 ;(unless (get 'get-props 'matched) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4681 ; (message "Failed to match GetProperty in class %s" class)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4682 ;(unless (get 'set-props 'matched) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4683 ; (message "Failed to match SetProperty in class %s" class)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4684 (setq class-entry |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4685 (if inherits |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4686 (list class (append '(inherits) inherits) (list 'link link)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4687 (list class (list 'link link)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4688 (cons class-entry methods-entry))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4689 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4690 (defun idlwave-xml-create-rinfo-list (xml-entry &optional class extra-kws) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4691 ;; Create correctly structured list elements from ROUTINE or METHOD |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4692 ;; XML list structures. Return a list of list elements, with more |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4693 ;; than one sub-list possible if a routine can serve as both |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4694 ;; procedure and function (e.g. call_method). |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4695 (let* ((nameblock (nth 1 xml-entry)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4696 (name (cdr (assq 'name nameblock))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4697 (link (cdr (assq 'link nameblock))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4698 (params (cddr xml-entry)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4699 (syntax-vec (make-vector 3 nil)) ; procedure, function, exec command |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4700 (case-fold-search t) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4701 syntax kwd klink pref-list kwds pelem ptype entry props result type) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4702 (if class ;; strip out class name from class method name string |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4703 (if (string-match (concat class "::") name) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4704 (setq name (substring name (match-end 0))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4705 (while params |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4706 (setq pelem (car params)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4707 (when (listp pelem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4708 (setq ptype (car pelem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4709 props (car (cdr pelem))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4710 (cond |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4711 ((eq ptype 'SYNTAX) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4712 (setq syntax (cdr (assq 'name props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4713 (if (string-match "->" syntax) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4714 (setq syntax (replace-match "->" t nil syntax))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4715 (setq type (cdr (assq 'type props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4716 (push syntax |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4717 (aref syntax-vec (cond |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4718 ((string-match "^pro" type) 0) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4719 ((string-match "^fun" type) 1) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4720 ((string-match "^exec" type) 2))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4721 ((eq ptype 'KEYWORD) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4722 (setq kwd (cdr (assq 'name props)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4723 klink (cdr (assq 'link props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4724 (if (string-match "^\\[XY\\(Z?\\)\\]" kwd) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4725 (progn |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4726 (setq pref-list |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4727 (if (match-string 1 kwd) '("X" "Y" "Z") '("X" "Y")) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4728 kwd (substring kwd (match-end 0))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4729 (loop for x in pref-list do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4730 (push (list (concat x kwd) klink) kwds))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4731 (push (list kwd klink) kwds))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4732 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4733 (t))); Do nothing for the others |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4734 (setq params (cdr params))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4735 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4736 ;; Debug |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4737 ; (if (and (null (aref syntax-vec 0)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4738 ; (null (aref syntax-vec 1)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4739 ; (null (aref syntax-vec 2))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4740 ; (with-current-buffer (get-buffer-create "IDL_XML_catalog_complaints") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4741 ; (if class |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4742 ; (insert (format "Missing SYNTAX entry for %s::%s\n" class name)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4743 ; (insert (message "Missing SYNTAX entry for %s\n" name))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4744 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4745 ;; Executive commands are treated specially |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4746 (if (aref syntax-vec 2) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4747 (cons (substring name 1) link) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4748 (if extra-kws (setq kwds (nconc kwds extra-kws))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4749 (setq kwds (idlwave-rinfo-group-keywords kwds link)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4750 (loop for idx from 0 to 1 do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4751 (if (aref syntax-vec idx) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4752 (push (append (list name (if (eq idx 0) 'pro 'fun) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4753 class '(system) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4754 (idlwave-shorten-syntax |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4755 (aref syntax-vec idx) name class)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4756 kwds) result))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4757 result))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4758 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4759 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4760 (defun idlwave-rinfo-group-keywords (kwds master-link) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4761 ;; Group keywords by link file, as a list with elements |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4762 ;; (linkfile ( ("KWD1" . link1) ("KWD2" . link2)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4763 (let (kwd link anchor linkfiles block master-elt) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4764 (while kwds |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4765 (setq kwd (car kwds) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4766 link (idlwave-split-link-target (nth 1 kwd)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4767 anchor (cdr link) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4768 link (car link) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4769 kwd (car kwd)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4770 (if (setq block (assoc link linkfiles)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4771 (push (cons kwd anchor) (cdr block)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4772 (push (list link (cons kwd anchor)) linkfiles)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4773 (setq kwds (cdr kwds))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4774 ;; Ensure the master link is there |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4775 (if (setq master-elt (assoc master-link linkfiles)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4776 (if (eq (car linkfiles) master-elt) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4777 linkfiles |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4778 (cons master-elt (delq master-elt linkfiles))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4779 (push (list master-link) linkfiles)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4780 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4781 (defun idlwave-convert-xml-clean-statement-aliases (aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4782 ;; Clean up the syntax of routines which are actually aliases by |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4783 ;; removing the "OR" from the statements |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4784 (let (syntax entry) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4785 (loop for x in aliases do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4786 (setq entry (assoc x idlwave-system-routines)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4787 (when entry |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4788 (while (string-match " +or +" (setq syntax (nth 4 entry))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4789 (setf (nth 4 entry) (replace-match ", " t t syntax))))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4790 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4791 (defun idlwave-convert-xml-clean-routine-aliases (aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4792 ;; Duplicate and trim original routine aliases from rinfo list |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4793 ;; This if for, e.g. OPENR/OPENW/OPENU |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4794 (let (alias remove-list new parts all-parts) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4795 (loop for x in aliases do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4796 (when (setq parts (split-string (cdr x) "/")) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4797 (setq new (assoc (cdr x) all-parts)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4798 (unless new |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4799 (setq new (cons (cdr x) parts)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4800 (push new all-parts)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4801 (setcdr new (delete (car x) (cdr new))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4802 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4803 ;; Add any missing aliases (separate by slashes) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4804 (loop for x in all-parts do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4805 (if (cdr x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4806 (push (cons (nth 1 x) (car x)) aliases))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4807 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4808 (loop for x in aliases do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4809 (when (setq alias (assoc (cdr x) idlwave-system-routines)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4810 (unless (memq alias remove-list) (push alias remove-list)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4811 (setq alias (copy-sequence alias)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4812 (setcar alias (car x)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4813 (push alias idlwave-system-routines))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4814 (loop for x in remove-list do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4815 (delq x idlwave-system-routines)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4816 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4817 (defun idlwave-convert-xml-clean-sysvar-aliases (aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4818 ;; Duplicate and trim original routine aliases from rinfo list |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4819 ;; This if for, e.g. !X, !Y, !Z. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4820 (let (alias remove-list new parts all-parts) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4821 (loop for x in aliases do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4822 (when (setq alias (assoc (cdr x) idlwave-system-variables-alist)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4823 (unless (memq alias remove-list) (push alias remove-list)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4824 (setq alias (copy-sequence alias)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4825 (setcar alias (car x)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4826 (push alias idlwave-system-variables-alist))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4827 (loop for x in remove-list do |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4828 (delq x idlwave-system-variables-alist)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4829 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4830 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4831 (defun idlwave-xml-create-sysvar-alist (xml-entry) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4832 ;; Create a sysvar list entry from the xml parsed list. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4833 (let* ((nameblock (nth 1 xml-entry)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4834 (sysvar (substring (cdr (assq 'name nameblock)) 1)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4835 (link (cdr (assq 'link nameblock))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4836 (params (cddr xml-entry)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4837 (case-fold-search t) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4838 pelem ptype props fields tags) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4839 (while params |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4840 (setq pelem (car params)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4841 (when (listp pelem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4842 (setq ptype (car pelem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4843 props (car (cdr pelem))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4844 (cond |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4845 ((eq ptype 'FIELD) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4846 (push (cons (cdr (assq 'name props)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4847 (cdr |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4848 (idlwave-split-link-target (cdr (assq 'link props))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4849 tags)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4850 (setq params (cdr params))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4851 (delq nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4852 (list sysvar (if tags (cons 'tags tags)) (list 'link link))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4853 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4854 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4855 (defvar idlwave-xml-routine-info-file nil) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4856 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4857 (defun idlwave-save-routine-info () |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4858 (if idlwave-xml-routine-info-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4859 (with-temp-file idlwave-xml-system-rinfo-converted-file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4860 (insert |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4861 (concat ";; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4862 ;; IDLWAVE Routine Information File (IDLWAVE version " idlwave-mode-version ") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4863 ;; Automatically generated from source file: |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4864 ;; " idlwave-xml-routine-info-file " |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4865 ;; on " (current-time-string) " |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4866 ;; Do not edit.")) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4867 (insert (format "\n(setq idlwave-xml-routine-info-file \n \"%s\")" |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4868 idlwave-xml-routine-info-file)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4869 (insert "\n(setq idlwave-system-routines\n '") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4870 (prin1 idlwave-system-routines (current-buffer)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4871 (insert ")") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4872 (insert "\n(setq idlwave-system-variables-alist\n '") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4873 (prin1 idlwave-system-variables-alist (current-buffer)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4874 (insert ")") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4875 (insert "\n(setq idlwave-system-class-info\n '") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4876 (prin1 idlwave-system-class-info (current-buffer)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4877 (insert ")") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4878 (insert "\n(setq idlwave-executive-commands-alist\n '") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4879 (prin1 idlwave-executive-commands-alist (current-buffer)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4880 (insert ")") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4881 (insert "\n(setq idlwave-help-special-topic-words\n '") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4882 (prin1 idlwave-help-special-topic-words (current-buffer)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4883 (insert ")")))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4884 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4885 (defun idlwave-convert-xml-system-routine-info () |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4886 "Convert XML supplied IDL routine info into internal form. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4887 Cache to disk for quick recovery." |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4888 (interactive) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4889 (let* ((dir (file-name-as-directory |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4890 (expand-file-name "help/online_help" (idlwave-sys-dir)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4891 (catalog-file (expand-file-name "idl_catalog.xml" dir)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4892 (elem-cnt 0) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4893 props rinfo msg-cnt elem type nelem class-result alias |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4894 routines routine-aliases statement-aliases sysvar-aliases |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4895 buf version-string) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4896 (if (not (file-exists-p catalog-file)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4897 (error "No such XML routine info file: %s" catalog-file) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4898 (if (not (file-readable-p catalog-file)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4899 (error "Cannot read XML routine info file: %s" catalog-file))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4900 (require 'xml) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4901 (message "Reading XML routine info...") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4902 (unwind-protect |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4903 (progn |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4904 ;; avoid warnings about read-only files |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4905 (setq buf (find-file-noselect catalog-file 'nowarn)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4906 (setq rinfo (xml-parse-file catalog-file))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4907 (if (bufferp buf) (kill-buffer buf))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4908 (message "Reading XML routine info...done") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4909 (setq rinfo (assq 'CATALOG rinfo)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4910 (unless rinfo (error "Failed to parse XML routine info")) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4911 ;;(setq rinfo (car rinfo)) ; Skip the catalog stuff. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4912 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4913 (setq version-string (cdr (assq 'version (nth 1 rinfo))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4914 rinfo (cddr rinfo)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4915 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4916 (setq nelem (length rinfo) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4917 msg-cnt (/ nelem 20)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4918 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4919 (setq idlwave-xml-routine-info-file nil) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4920 (message "Converting XML routine info...") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4921 (setq idlwave-system-routines nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4922 idlwave-system-variables-alist nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4923 idlwave-system-class-info nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4924 idlwave-executive-commands-alist nil |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4925 idlwave-help-special-topic-words nil) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4926 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4927 (while rinfo |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4928 (setq elem (car rinfo) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4929 rinfo (cdr rinfo)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4930 (incf elem-cnt) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4931 (when (listp elem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4932 (setq type (car elem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4933 props (car (cdr elem))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4934 (if (= (mod elem-cnt msg-cnt) 0) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4935 (message "Converting XML routine info...%2d%%" |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4936 (/ (* elem-cnt 100) nelem))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4937 (cond |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4938 ((eq type 'ROUTINE) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4939 (if (setq alias (assq 'alias_to props)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4940 (push (cons (cdr (assq 'name props)) (cdr alias)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4941 routine-aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4942 (setq routines (idlwave-xml-create-rinfo-list elem)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4943 (if (listp (cdr routines)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4944 (setq idlwave-system-routines |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4945 (nconc idlwave-system-routines routines)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4946 ;; a cons cell is an executive commands |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4947 (push routines idlwave-executive-commands-alist)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4948 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4949 ((eq type 'CLASS) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4950 (setq class-result (idlwave-xml-create-class-method-lists elem)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4951 (push (car class-result) idlwave-system-class-info) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4952 (setq idlwave-system-routines |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4953 (nconc idlwave-system-routines (cdr class-result)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4954 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4955 ((eq type 'STATEMENT) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4956 (push (cons (cdr (assq 'name props)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4957 (cdr (assq 'link props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4958 idlwave-help-special-topic-words) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4959 ;; Save the links to those which are statement aliases (not routines) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4960 (if (setq alias (assq 'alias_to props)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4961 (unless (member (cdr alias) statement-aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4962 (push (cdr alias) statement-aliases)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4963 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4964 ((eq type 'SYSVAR) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4965 (if (setq alias (cdr (assq 'alias_to props))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4966 (push (cons (substring (cdr (assq 'name props)) 1) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4967 (substring alias 1)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4968 sysvar-aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4969 (push (idlwave-xml-create-sysvar-alist elem) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4970 idlwave-system-variables-alist))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4971 (t)))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4972 (idlwave-convert-xml-clean-routine-aliases routine-aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4973 (idlwave-convert-xml-clean-statement-aliases statement-aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4974 (idlwave-convert-xml-clean-sysvar-aliases sysvar-aliases) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4975 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4976 (setq idlwave-xml-routine-info-file catalog-file) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4977 (idlwave-save-routine-info) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4978 (message "Converting XML routine info...done"))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4979 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4980 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4981 ;; ("ROUTINE" type class |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4982 ;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") | |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4983 ;; (buffer pro_file dir) | (compiled pro_file dir) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4984 ;; "calling_string" ("HELPFILE" (("KWD1" . link1) ...)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4985 ;; ("HELPFILE2" (("KWD2" . link) ...)) ...) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4986 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4987 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4988 (defun idlwave-load-rinfo-next-step () |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4989 (let ((inhibit-quit t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4990 (arr idlwave-load-rinfo-steps-done)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4991 (if (catch 'exit |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4992 (when (not (aref arr 0)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4993 (message "Loading system routine info in idle time...") |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4994 (idlwave-load-system-routine-info) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4995 ;;(load "idlw-rinfo" 'noerror 'nomessage) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4996 (message "Loading system routine info in idle time...done") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4997 (aset arr 0 t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
4998 (throw 'exit t)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
4999 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5000 (when (not (aref arr 1)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5001 (message "Normalizing idlwave-system-routines in idle time...") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5002 (idlwave-reset-sintern t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5003 (put 'idlwave-reset-sintern 'done-by-idle t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5004 (setq idlwave-system-routines |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5005 (idlwave-sintern-rinfo-list idlwave-system-routines 'sys)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5006 (message "Normalizing idlwave-system-routines in idle time...done") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5007 (aset arr 1 t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5008 (throw 'exit t)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5009 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5010 (when (not (aref arr 2)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5011 (when (and (stringp idlwave-user-catalog-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5012 (file-regular-p idlwave-user-catalog-file)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5013 (message "Loading user catalog in idle time...") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5014 (condition-case nil |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5015 (load-file idlwave-user-catalog-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5016 (error (throw 'exit nil))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5017 ;; Check for the old style catalog and warn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5018 (if (and |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5019 (boundp 'idlwave-library-routines) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5020 idlwave-library-routines) |
47930
43574ede3ab1
(idlwave-region-active-p): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47479
diff
changeset
|
5021 (progn |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5022 (setq idlwave-library-routines nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5023 (ding) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5024 (message "Outdated user catalog: %s... recreate" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5025 idlwave-user-catalog-file)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5026 (message "Loading user catalog in idle time...done"))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5027 (aset arr 2 t) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5028 (throw 'exit t)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5029 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5030 (when (not (aref arr 3)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5031 (when idlwave-user-catalog-routines |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5032 (message "Normalizing user catalog routines in idle time...") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5033 (setq idlwave-user-catalog-routines |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5034 (idlwave-sintern-rinfo-list |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5035 idlwave-user-catalog-routines 'sys)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5036 (message |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5037 "Normalizing user catalog routines in idle time...done")) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5038 (aset arr 3 t) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5039 (throw 'exit t)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5040 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5041 (when (not (aref arr 4)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5042 (idlwave-scan-library-catalogs |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5043 "Loading and normalizing library catalogs in idle time...") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5044 (aset arr 4 t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5045 (throw 'exit t)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5046 (when (not (aref arr 5)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5047 (message "Finishing initialization in idle time...") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5048 (idlwave-routines) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5049 (message "Finishing initialization in idle time...done") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5050 (aset arr 5 t) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5051 (throw 'exit nil))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5052 ;; restart the timer |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5053 (if (sit-for 1) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5054 (idlwave-load-rinfo-next-step) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5055 (setq idlwave-load-rinfo-idle-timer |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5056 (run-with-idle-timer |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5057 idlwave-init-rinfo-when-idle-after |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5058 nil 'idlwave-load-rinfo-next-step)))))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5059 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5060 (defun idlwave-load-all-rinfo (&optional force) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5061 ;; Load and case-treat the system, user catalog, and library routine |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5062 ;; info files. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5063 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5064 ;; System |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5065 (when (or force (not (aref idlwave-load-rinfo-steps-done 0))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5066 ;;(load "idlw-rinfo" 'noerror 'nomessage)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5067 (idlwave-load-system-routine-info)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5068 (when (or force (not (aref idlwave-load-rinfo-steps-done 1))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5069 (message "Normalizing idlwave-system-routines...") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5070 (setq idlwave-system-routines |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5071 (idlwave-sintern-rinfo-list idlwave-system-routines 'sys)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5072 (message "Normalizing idlwave-system-routines...done")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5073 (when idlwave-system-routines |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5074 (setq idlwave-routines (copy-sequence idlwave-system-routines)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5075 (setq idlwave-last-system-routine-info-cons-cell |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5076 (nthcdr (1- (length idlwave-routines)) idlwave-routines))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5077 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5078 ;; User catalog |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5079 (when (and (stringp idlwave-user-catalog-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5080 (file-regular-p idlwave-user-catalog-file)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5081 (condition-case nil |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5082 (when (or force (not (aref idlwave-load-rinfo-steps-done 2))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5083 (load-file idlwave-user-catalog-file)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5084 (error nil)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5085 (when (and |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5086 (boundp 'idlwave-library-routines) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5087 idlwave-library-routines) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5088 (setq idlwave-library-routines nil) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5089 (error "Outdated user catalog: %s... recreate" |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5090 idlwave-user-catalog-file)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5091 (setq idlwave-true-path-alist nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5092 (when (or force (not (aref idlwave-load-rinfo-steps-done 3))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5093 (message "Normalizing user catalog routines...") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5094 (setq idlwave-user-catalog-routines |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5095 (idlwave-sintern-rinfo-list |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5096 idlwave-user-catalog-routines 'sys)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5097 (message "Normalizing user catalog routines...done"))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5098 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5099 ;; Library catalog |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5100 (when (or force (not (aref idlwave-load-rinfo-steps-done 4))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5101 (idlwave-scan-library-catalogs |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5102 "Loading and normalizing library catalogs...")) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5103 (run-hooks 'idlwave-after-load-rinfo-hook)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5104 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5105 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5106 (defun idlwave-update-buffer-routine-info () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5107 (let (res) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5108 (cond |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5109 ((eq idlwave-scan-all-buffers-for-routine-info t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5110 ;; Scan all buffers, current buffer last |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5111 (message "Scanning all buffers...") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5112 (setq res (idlwave-get-routine-info-from-buffers |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5113 (reverse (buffer-list))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5114 ((null idlwave-scan-all-buffers-for-routine-info) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5115 ;; Don't scan any buffers |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5116 (setq res nil)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5117 (t |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5118 ;; Just scan this buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5119 (if (eq major-mode 'idlwave-mode) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5120 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5121 (message "Scanning current buffer...") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5122 (setq res (idlwave-get-routine-info-from-buffers |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5123 (list (current-buffer)))))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5124 ;; Put the result into the correct variable |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5125 (setq idlwave-buffer-routines |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5126 (idlwave-sintern-rinfo-list res 'set)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5127 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5128 (defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5129 "Put the different sources for routine information together." |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5130 ;; The sequence here is important because earlier definitions shadow |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5131 ;; later ones. We assume that if things in the buffers are newer |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5132 ;; then in the shell of the system, they are meant to be different. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5133 (setcdr idlwave-last-system-routine-info-cons-cell |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5134 (append idlwave-buffer-routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5135 idlwave-compiled-routines |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5136 idlwave-library-catalog-routines |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5137 idlwave-user-catalog-routines)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5138 (setq idlwave-class-alist nil) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5139 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5140 ;; Give a message with information about the number of routines we have. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5141 (unless quiet |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5142 (message |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5143 "Routines Found: buffer(%d) compiled(%d) library(%d) user(%d) system(%d)" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5144 (length idlwave-buffer-routines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5145 (length idlwave-compiled-routines) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5146 (length idlwave-library-catalog-routines) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5147 (length idlwave-user-catalog-routines) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5148 (length idlwave-system-routines))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5149 (if run-hook |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5150 (run-hooks 'idlwave-update-rinfo-hook))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5151 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5152 (defun idlwave-class-alist () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5153 "Return the class alist - make it if necessary." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5154 (or idlwave-class-alist |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5155 (let (class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5156 (loop for x in idlwave-routines do |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5157 (when (and (setq class (nth 2 x)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5158 (not (assq class idlwave-class-alist))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5159 (push (list class) idlwave-class-alist))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5160 idlwave-class-alist))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5161 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5162 ;; Three functions for the hooks |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5163 (defun idlwave-save-buffer-update () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5164 (idlwave-update-current-buffer-info 'save-buffer)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5165 (defun idlwave-kill-buffer-update () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5166 (idlwave-update-current-buffer-info 'kill-buffer)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5167 (defun idlwave-new-buffer-update () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5168 (idlwave-update-current-buffer-info 'find-file)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5169 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5170 (defun idlwave-update-current-buffer-info (why) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5171 "Update idlwave-routines for current buffer. Can run from after-save-hook." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5172 (when (and (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:
27606
diff
changeset
|
5173 (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:
27606
diff
changeset
|
5174 (memq why 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:
27606
diff
changeset
|
5175 idlwave-scan-all-buffers-for-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5176 idlwave-routines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5177 (condition-case nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5178 (let (routines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5179 (idlwave-replace-buffer-routine-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5180 (buffer-file-name) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5181 (if (eq why 'kill-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5182 nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5183 (setq routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5184 (idlwave-sintern-rinfo-list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5185 (idlwave-get-routine-info-from-buffers |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5186 (list (current-buffer))) 'set)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5187 (idlwave-concatenate-rinfo-lists 'quiet) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5188 routines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5189 (error nil)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5190 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5191 (defun idlwave-replace-buffer-routine-info (file new) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5192 "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW." |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5193 (let ((list idlwave-buffer-routines) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5194 found) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5195 (while list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5196 ;; The following test uses eq to make sure it works correctly |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5197 ;; when two buffers visit the same file. Then the file names |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5198 ;; will be equal, but not eq. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5199 (if (eq (idlwave-routine-source-file (nth 3 (car list))) file) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5200 (progn |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5201 (setcar list nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5202 (setq found t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5203 (if found |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5204 ;; End of that section reached. Jump. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5205 (setq list nil))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5206 (setq list (cdr list))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5207 (setq idlwave-buffer-routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5208 (append new (delq nil idlwave-buffer-routines))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5209 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5210 ;;----- Scanning buffers ------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5211 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5212 (defun idlwave-get-routine-info-from-buffers (buffers) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5213 "Call `idlwave-get-buffer-routine-info' on idlwave-mode buffers in BUFFERS." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5214 (let (buf routine-lists res) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5215 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5216 (while (setq buf (pop buffers)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5217 (set-buffer buf) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5218 (if (and (eq major-mode 'idlwave-mode) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5219 buffer-file-name) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5220 ;; yes, this buffer has the right mode. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5221 (progn (setq res (condition-case nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5222 (idlwave-get-buffer-routine-info) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5223 (error nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5224 (push res routine-lists))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5225 ;; Concatenate the individual lists and return the result |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5226 (apply 'nconc routine-lists))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5227 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5228 (defun idlwave-get-buffer-routine-info () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5229 "Scan the current buffer for routine info. Return (PRO-LIST FUNC-LIST)." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5230 (let* ((case-fold-search t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5231 routine-list string entry) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5232 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5233 (save-restriction |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5234 (widen) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5235 (goto-char (point-min)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5236 (while (re-search-forward |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5237 "^[ \t]*\\(pro\\|function\\)[ \t]" nil t) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
5238 (setq string (buffer-substring-no-properties |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5239 (match-beginning 0) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5240 (progn |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5241 (idlwave-end-of-statement) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5242 (point)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5243 (setq entry (idlwave-parse-definition string)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5244 (push entry routine-list)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5245 routine-list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5246 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5247 (defvar idlwave-scanning-lib-dir) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5248 (defun idlwave-parse-definition (string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5249 "Parse a module definition." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5250 (let ((case-fold-search t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5251 start name args type keywords class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5252 ;; Remove comments |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5253 (while (string-match ";.*" string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5254 (setq string (replace-match "" t t string))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5255 ;; Remove the continuation line stuff |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5256 (while (string-match "\\([^a-zA-Z0-9$_]\\)\\$[ \t]*\n" string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5257 (setq string (replace-match "\\1 " t nil string))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5258 (while (string-match "\n" string) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5259 (setq string (replace-match " " t nil string))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5260 ;; Match the name and type. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5261 (when (string-match |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5262 "\\<\\(pro\\|function\\)\\>\\s-+\\(\\([a-zA-Z0-9$_]+\\)::\\)?\\([a-zA-Z0-9$_]+\\)" string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5263 (setq start (match-end 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5264 (setq type (downcase (match-string 1 string))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5265 (if (match-beginning 3) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5266 (setq class (match-string 3 string))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5267 (setq name (match-string 4 string))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5268 ;; Match normal args and keyword args |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5269 (while (string-match |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5270 ",\\s-*\\([a-zA-Z][a-zA-Z0-9$_]*\\|\\(_ref\\)?_extra\\)\\s-*\\(=\\)?" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5271 string start) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5272 (setq start (match-end 0)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5273 (if (match-beginning 3) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5274 (push (match-string 1 string) keywords) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5275 (push (match-string 1 string) args))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5276 ;; Normalize and sort. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5277 (setq args (nreverse args)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5278 (setq keywords (sort keywords (lambda (a b) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5279 (string< (downcase a) (downcase b))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5280 ;; Make and return the entry |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5281 ;; We don't know which argument are optional, so this information |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5282 ;; will not be contained in the calling sequence. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5283 (list name |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5284 (if (equal type "pro") 'pro 'fun) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5285 class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5286 (cond ((not (boundp 'idlwave-scanning-lib)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5287 (list 'buffer (buffer-file-name))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5288 ; ((string= (downcase |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5289 ; (file-name-sans-extension |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5290 ; (file-name-nondirectory (buffer-file-name)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5291 ; (downcase name)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5292 ; (list 'lib)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5293 ; (t (cons 'lib (file-name-nondirectory (buffer-file-name)))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5294 (t (list 'user (file-name-nondirectory (buffer-file-name)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5295 idlwave-scanning-lib-dir "UserLib"))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5296 (concat |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5297 (if (string= type "function") "Result = " "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5298 (if class "Obj ->[%s::]" "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5299 "%s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5300 (if args |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5301 (concat |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5302 (if (string= type "function") "(" ", ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5303 (mapconcat 'identity args ", ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5304 (if (string= type "function") ")" "")))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5305 (if keywords |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5306 (cons nil (mapcar 'list keywords)) ;No help file |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5307 nil)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5308 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5309 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5310 ;;----- Scanning the user catalog ------------------- |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5311 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5312 (defun idlwave-sys-dir () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5313 "Return the syslib directory, or a dummy that never matches." |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5314 (cond |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5315 ((and idlwave-system-directory |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5316 (not (string= idlwave-system-directory ""))) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5317 idlwave-system-directory) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5318 ((getenv "IDL_DIR")) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5319 (t "@@@@@@@@"))) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5320 |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5321 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5322 (defun idlwave-create-user-catalog-file (&optional arg) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5323 "Scan all files on selected dirs of IDL search path for routine information. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5324 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5325 A widget checklist will allow you to choose the directories. Write |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5326 the result as a file `idlwave-user-catalog-file'. When this file |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5327 exists, will be automatically loaded to give routine information about |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5328 library routines. With ARG, just rescan the same directories as last |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5329 time - so no widget will pop up." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5330 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5331 ;; Make sure the file is loaded if it exists. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5332 (if (and (stringp idlwave-user-catalog-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5333 (file-regular-p idlwave-user-catalog-file)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5334 (condition-case nil |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5335 (load-file idlwave-user-catalog-file) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5336 (error nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5337 ;; Make sure the file name makes sense |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5338 (unless (and (stringp idlwave-user-catalog-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5339 (> (length idlwave-user-catalog-file) 0) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5340 (file-accessible-directory-p |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5341 (file-name-directory idlwave-user-catalog-file)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5342 (not (string= "" (file-name-nondirectory |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5343 idlwave-user-catalog-file)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5344 (error "`idlwave-user-catalog-file' does not point to a file in an accessible directory")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5345 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5346 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5347 ;; Rescan the known directories |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5348 ((and arg idlwave-path-alist |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5349 (consp (car idlwave-path-alist))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5350 (idlwave-scan-user-lib-files idlwave-path-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5351 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5352 ;; Expand the directories from library-path and run the widget |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5353 (idlwave-library-path |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5354 (idlwave-display-user-catalog-widget |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5355 (if idlwave-true-path-alist |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5356 ;; Propagate any flags on the existing path-alist |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5357 (mapcar (lambda (x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5358 (let ((path-entry (assoc (file-truename x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5359 idlwave-true-path-alist))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5360 (if path-entry |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5361 (cons x (cdr path-entry)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5362 (list x)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5363 (idlwave-expand-path idlwave-library-path)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5364 (mapcar 'list (idlwave-expand-path idlwave-library-path))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5365 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5366 ;; Ask the shell for the path and then run the widget |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5367 (t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5368 (message "Asking the shell for IDL path...") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5369 (require 'idlw-shell) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5370 (idlwave-shell-send-command idlwave-shell-path-query |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5371 '(idlwave-user-catalog-command-hook nil) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5372 'hide)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5373 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5374 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5375 ;; Parse shell path information and select among it. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5376 (defun idlwave-user-catalog-command-hook (&optional arg) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5377 ;; Command hook used by `idlwave-create-user-catalog-file'. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5378 (if arg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5379 ;; Scan immediately |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5380 (idlwave-scan-user-lib-files idlwave-path-alist) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5381 ;; Set the path and display the widget |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5382 (idlwave-shell-get-path-info 'no-write) ; set to something path-alist |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5383 (idlwave-scan-library-catalogs "Locating library catalogs..." 'no-load) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5384 (idlwave-display-user-catalog-widget idlwave-path-alist))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5385 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5386 (defconst idlwave-user-catalog-widget-help-string |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5387 "This is the front-end to the creation of the IDLWAVE user catalog. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5388 Please select the directories on IDL's search path from which you |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5389 would like to extract routine information, to be stored in the file: |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5390 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5391 %s |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5392 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5393 If this is not the correct file, first set variable |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5394 `idlwave-user-catalog-file', and call this command again. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5395 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5396 N.B. Many libraries include pre-scanned catalog files |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5397 \(\".idlwave_catalog\"). These are marked with \"[LIB]\", and need |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5398 not be scanned. You can scan your own libraries off-line using the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5399 perl script `idlwave_catalog'. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5400 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5401 After selecting the directories, choose [Scan & Save] to scan the library |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5402 directories and save the routine info. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5403 \n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5404 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5405 (defvar idlwave-widget) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5406 (defvar widget-keymap) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5407 (defun idlwave-display-user-catalog-widget (dirs-list) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5408 "Create the widget to select IDL search path directories for scanning." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5409 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5410 (require 'widget) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5411 (require 'wid-edit) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5412 (unless dirs-list |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5413 (error "Don't know IDL's search path")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5414 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5415 (kill-buffer (get-buffer-create "*IDLWAVE Widget*")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5416 (switch-to-buffer (get-buffer-create "*IDLWAVE Widget*")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5417 (kill-all-local-variables) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5418 (make-local-variable 'idlwave-widget) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5419 (widget-insert (format idlwave-user-catalog-widget-help-string |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5420 idlwave-user-catalog-file)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5421 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5422 (widget-create 'push-button |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5423 :notify 'idlwave-widget-scan-user-lib-files |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5424 "Scan & Save") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5425 (widget-insert " ") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5426 (widget-create 'push-button |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5427 :notify 'idlwave-delete-user-catalog-file |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5428 "Delete File") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5429 (widget-insert " ") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5430 (widget-create 'push-button |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5431 :notify |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5432 '(lambda (&rest ignore) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5433 (let ((path-list (widget-get idlwave-widget :path-dirs))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5434 (mapcar (lambda (x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5435 (unless (memq 'lib (cdr x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5436 (idlwave-path-alist-add-flag x 'user))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5437 path-list) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5438 (idlwave-display-user-catalog-widget path-list))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5439 "Select All Non-Lib") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5440 (widget-insert " ") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5441 (widget-create 'push-button |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5442 :notify |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5443 '(lambda (&rest ignore) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5444 (let ((path-list (widget-get idlwave-widget :path-dirs))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5445 (mapcar (lambda (x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5446 (idlwave-path-alist-remove-flag x 'user)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5447 path-list) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5448 (idlwave-display-user-catalog-widget path-list))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5449 "Deselect All") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5450 (widget-insert " ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5451 (widget-create 'push-button |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5452 :notify (lambda (&rest ignore) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5453 (kill-buffer (current-buffer))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5454 "Quit") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5455 (widget-insert "\n\n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5456 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5457 (widget-insert "Select Directories: \n") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5458 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5459 (setq idlwave-widget |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5460 (apply 'widget-create |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5461 'checklist |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5462 :value (delq nil (mapcar (lambda (x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5463 (if (memq 'user (cdr x)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5464 (car x))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5465 dirs-list)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5466 :greedy t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5467 :tag "List of directories" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5468 (mapcar (lambda (x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5469 (list 'item |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5470 (if (memq 'lib (cdr x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5471 (concat "[LIB] " (car x) ) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5472 (car x)))) dirs-list))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5473 (widget-put idlwave-widget :path-dirs dirs-list) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5474 (widget-insert "\n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5475 (use-local-map widget-keymap) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5476 (widget-setup) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5477 (goto-char (point-min)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5478 (delete-other-windows)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5479 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5480 (defun idlwave-delete-user-catalog-file (&rest ignore) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5481 (if (yes-or-no-p |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5482 (format "Delete file %s " idlwave-user-catalog-file)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5483 (progn |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5484 (delete-file idlwave-user-catalog-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5485 (message "%s has been deleted" idlwave-user-catalog-file)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5486 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5487 (defun idlwave-widget-scan-user-lib-files (&rest ignore) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5488 ;; Call `idlwave-scan-user-lib-files' with data taken from the widget. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5489 (let* ((widget idlwave-widget) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5490 (selected-dirs (widget-value widget)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5491 (path-alist (widget-get widget :path-dirs)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5492 (this-path-alist path-alist) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5493 dir-entry) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5494 (while (setq dir-entry (pop this-path-alist)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5495 (if (member |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5496 (if (memq 'lib (cdr dir-entry)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5497 (concat "[LIB] " (car dir-entry)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5498 (car dir-entry)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5499 selected-dirs) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5500 (idlwave-path-alist-add-flag dir-entry 'user) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5501 (idlwave-path-alist-remove-flag dir-entry 'user))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5502 (idlwave-scan-user-lib-files path-alist))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5503 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5504 (defvar font-lock-mode) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5505 (defun idlwave-scan-user-lib-files (path-alist) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5506 ;; Scan the PRO files in PATH-ALIST and store the info in the user catalog |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5507 (let* ((idlwave-scanning-lib t) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5508 (idlwave-scanning-lib-dir "") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5509 (idlwave-completion-case nil) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5510 dirs-alist dir files file) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5511 (setq idlwave-user-catalog-routines nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5512 idlwave-path-alist path-alist ; for library-path instead |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5513 idlwave-true-path-alist nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5514 (if idlwave-auto-write-paths (idlwave-write-paths)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5515 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5516 (set-buffer (get-buffer-create "*idlwave-scan.pro*")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5517 (idlwave-mode) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5518 (setq dirs-alist (reverse path-alist)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5519 (while (setq dir (pop dirs-alist)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5520 (when (memq 'user (cdr dir)) ; Has it marked for scan? |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5521 (setq dir (car dir)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5522 (setq idlwave-scanning-lib-dir dir) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5523 (when (file-directory-p dir) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5524 (setq files (directory-files dir 'full "\\.[pP][rR][oO]\\'")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5525 (while (setq file (pop files)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5526 (when (file-regular-p file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5527 (if (not (file-readable-p file)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5528 (message "Skipping %s (no read permission)" file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5529 (message "Scanning %s..." file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5530 (erase-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5531 (insert-file-contents file 'visit) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5532 (setq idlwave-user-catalog-routines |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5533 (append (idlwave-get-routine-info-from-buffers |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5534 (list (current-buffer))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5535 idlwave-user-catalog-routines))))))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5536 (message "Creating user catalog file...") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5537 (kill-buffer "*idlwave-scan.pro*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5538 (kill-buffer (get-buffer-create "*IDLWAVE Widget*")) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5539 (let ((font-lock-maximum-size 0) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5540 (auto-mode-alist nil)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5541 (find-file idlwave-user-catalog-file)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5542 (if (and (boundp 'font-lock-mode) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5543 font-lock-mode) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5544 (font-lock-mode 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5545 (erase-buffer) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5546 (insert ";; IDLWAVE user catalog file\n") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5547 (insert (format ";; Created %s\n\n" (current-time-string))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5548 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5549 ;; Define the routine info list |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5550 (insert "\n(setq idlwave-user-catalog-routines\n '(") |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5551 (let ((standard-output (current-buffer))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5552 (mapcar (lambda (x) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5553 (insert "\n ") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5554 (prin1 x) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5555 (goto-char (point-max))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5556 idlwave-user-catalog-routines)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5557 (insert (format "))\n\n;;; %s ends here\n" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5558 (file-name-nondirectory idlwave-user-catalog-file))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5559 (goto-char (point-min)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5560 ;; Save the buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5561 (save-buffer 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5562 (kill-buffer (current-buffer))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5563 (message "Creating user catalog file...done") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5564 (message "Info for %d routines saved in %s" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5565 (length idlwave-user-catalog-routines) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5566 idlwave-user-catalog-file) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5567 (sit-for 2) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5568 (idlwave-update-routine-info t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5569 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5570 (defun idlwave-read-paths () |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5571 (if (and (stringp idlwave-path-file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5572 (file-regular-p idlwave-path-file)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5573 (condition-case nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5574 (load idlwave-path-file t t t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5575 (error nil)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5576 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5577 (defun idlwave-write-paths () |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5578 (interactive) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5579 (when (and idlwave-path-alist idlwave-system-directory) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5580 (let ((font-lock-maximum-size 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5581 (auto-mode-alist nil)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5582 (find-file idlwave-path-file)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5583 (if (and (boundp 'font-lock-mode) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5584 font-lock-mode) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5585 (font-lock-mode 0)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5586 (erase-buffer) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5587 (insert ";; IDLWAVE paths\n") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5588 (insert (format ";; Created %s\n\n" (current-time-string))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5589 ;; Define the variable which knows the value of "!DIR" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5590 (insert (format "\n(setq idlwave-system-directory \"%s\")\n" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5591 idlwave-system-directory)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5592 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5593 ;; Define the variable which contains a list of all scanned directories |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5594 (insert "\n(setq idlwave-path-alist\n '(") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5595 (let ((standard-output (current-buffer))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5596 (mapcar (lambda (x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5597 (insert "\n ") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5598 (prin1 x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5599 (goto-char (point-max))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5600 idlwave-path-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5601 (insert "))\n") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5602 (save-buffer 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5603 (kill-buffer (current-buffer)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5604 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5605 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5606 (defun idlwave-expand-path (path &optional default-dir) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5607 ;; Expand parts of path starting with '+' recursively into directory list. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5608 ;; Relative recursive path elements are expanded relative to DEFAULT-DIR. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5609 (message "Expanding path...") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5610 (let (path1 dir recursive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5611 (while (setq dir (pop path)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5612 (if (setq recursive (string= (substring dir 0 1) "+")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5613 (setq dir (substring dir 1))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5614 (if (and recursive |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5615 (not (file-name-absolute-p dir))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5616 (setq dir (expand-file-name dir default-dir))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5617 (if recursive |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5618 ;; Expand recursively |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5619 (setq path1 (append (idlwave-recursive-directory-list dir) path1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5620 ;; Keep unchanged |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5621 (push dir path1))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5622 (message "Expanding path...done") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5623 (nreverse path1))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5624 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5625 (defun idlwave-recursive-directory-list (dir) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5626 ;; Return a list of all directories below DIR, including DIR itself |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5627 (let ((path (list dir)) path1 file files) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5628 (while (setq dir (pop path)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5629 (when (file-directory-p dir) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5630 (setq files (nreverse (directory-files dir t "[^.]"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5631 (while (setq file (pop files)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5632 (if (file-directory-p file) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5633 (push (file-name-as-directory file) path))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5634 (push dir path1))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5635 path1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5636 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5637 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5638 ;;----- Scanning the library catalogs ------------------ |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5639 |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5640 |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5641 |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
5642 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5643 (defun idlwave-scan-library-catalogs (&optional message-base no-load) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5644 "Scan for library catalog files (.idlwave_catalog) and ingest. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5645 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5646 All directories on `idlwave-path-alist' (or `idlwave-library-path' |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5647 instead, if present) are searched. Print MESSAGE-BASE along with the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5648 libraries being loaded, if passed, and skip loading/normalizing if |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5649 NO-LOAD is non-nil. The variable `idlwave-use-library-catalogs' can |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5650 be set to nil to disable library catalog scanning." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5651 (when idlwave-use-library-catalogs |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5652 (let ((dirs |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5653 (if idlwave-library-path |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5654 (idlwave-expand-path idlwave-library-path) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5655 (mapcar 'car idlwave-path-alist))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5656 (old-libname "") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5657 dir-entry dir flags catalog all-routines) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5658 (if message-base (message message-base)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5659 (while (setq dir (pop dirs)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5660 (catch 'continue |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5661 (when (file-readable-p |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5662 (setq catalog (expand-file-name ".idlwave_catalog" dir))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5663 (unless no-load |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5664 (setq idlwave-library-catalog-routines nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5665 ;; Load the catalog file |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5666 (condition-case nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5667 (load catalog t t t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5668 (error (throw 'continue t))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5669 (when (and |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5670 message-base |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5671 (not (string= idlwave-library-catalog-libname |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5672 old-libname))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5673 (message "%s" (concat message-base |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5674 idlwave-library-catalog-libname)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5675 (setq old-libname idlwave-library-catalog-libname)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5676 (when idlwave-library-catalog-routines |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5677 (setq all-routines |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5678 (append |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5679 (idlwave-sintern-rinfo-list |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5680 idlwave-library-catalog-routines 'sys dir) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5681 all-routines)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5682 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5683 ;; Add a 'lib flag if on path-alist |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5684 (when (and idlwave-path-alist |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5685 (setq dir-entry (assoc dir idlwave-path-alist))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5686 (idlwave-path-alist-add-flag dir-entry 'lib))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5687 (unless no-load (setq idlwave-library-catalog-routines all-routines)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5688 (if message-base (message (concat message-base "done")))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5689 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5690 ;;----- Communicating with the Shell ------------------- |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5691 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5692 ;; First, here is the idl program which can be used to query IDL for |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5693 ;; defined routines. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5694 (defconst idlwave-routine-info.pro |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5695 " |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5696 ;; START OF IDLWAVE SUPPORT ROUTINES |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5697 pro idlwave_print_safe,item,limit |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5698 catch,err |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5699 if err ne 0 then begin |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5700 print,'Could not print item.' |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5701 return |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5702 endif |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5703 if n_elements(item) gt limit then $ |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5704 print,item[0:limit-1],'<... truncated at ',strtrim(limit,2),' elements>' $ |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5705 else print,item |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5706 end |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5707 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5708 pro idlwave_print_info_entry,name,func=func,separator=sep |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5709 ;; See if it's an object method |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5710 if name eq '' then return |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5711 func = keyword_set(func) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5712 methsep = strpos(name,'::') |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5713 meth = methsep ne -1 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5714 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5715 ;; Get routine info |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5716 pars = routine_info(name,/parameters,functions=func) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5717 source = routine_info(name,/source,functions=func) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5718 nargs = pars.num_args |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5719 nkw = pars.num_kw_args |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5720 if nargs gt 0 then args = pars.args |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5721 if nkw gt 0 then kwargs = pars.kw_args |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5722 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5723 ;; Trim the class, and make the name |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5724 if meth then begin |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5725 class = strmid(name,0,methsep) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5726 name = strmid(name,methsep+2,strlen(name)-1) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5727 if nargs gt 0 then begin |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5728 ;; remove the self argument |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5729 wh = where(args ne 'SELF',nargs) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5730 if nargs gt 0 then args = args[wh] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5731 endif |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5732 endif else begin |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5733 ;; No class, just a normal routine. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5734 class = \"\" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5735 endelse |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5736 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5737 ;; Calling sequence |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5738 cs = \"\" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5739 if func then cs = 'Result = ' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5740 if meth then cs = cs + 'Obj -> [' + '%s' + '::]' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5741 cs = cs + '%s' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5742 if func then cs = cs + '(' else if nargs gt 0 then cs = cs + ', ' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5743 if nargs gt 0 then begin |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5744 for j=0,nargs-1 do begin |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5745 cs = cs + args[j] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5746 if j lt nargs-1 then cs = cs + ', ' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5747 endfor |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5748 end |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5749 if func then cs = cs + ')' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5750 ;; Keyword arguments |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5751 kwstring = '' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5752 if nkw gt 0 then begin |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5753 for j=0,nkw-1 do begin |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5754 kwstring = kwstring + ' ' + kwargs[j] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5755 endfor |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5756 endif |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5757 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5758 ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])[func] |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5759 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5760 print,ret + ': ' + name + sep + class + sep + source[0].path $ |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5761 + sep + cs + sep + kwstring |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5762 end |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5763 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5764 pro idlwave_routine_info,file |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5765 on_error,1 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5766 sep = '<@>' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5767 print,'>>>BEGIN OF IDLWAVE ROUTINE INFO (\"' + sep + '\" IS THE SEPARATOR)' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5768 all = routine_info() |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5769 fileQ=n_elements(file) ne 0 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5770 if fileQ then file=strtrim(file,2) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5771 for i=0L,n_elements(all)-1L do begin |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5772 if fileQ then begin |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5773 if (routine_info(all[i],/SOURCE)).path eq file then $ |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5774 idlwave_print_info_entry,all[i],separator=sep |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5775 endif else idlwave_print_info_entry,all[i],separator=sep |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5776 endfor |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5777 all = routine_info(/functions) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5778 for i=0L,n_elements(all)-1L do begin |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5779 if fileQ then begin |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5780 if (routine_info(all[i],/FUNCTIONS,/SOURCE)).path eq file then $ |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5781 idlwave_print_info_entry,all[i],separator=sep,/FUNC |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5782 endif else idlwave_print_info_entry,all[i],separator=sep,/FUNC |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5783 endfor |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5784 print,'>>>END OF IDLWAVE ROUTINE INFO' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5785 end |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5786 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5787 pro idlwave_get_sysvars |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5788 on_error,1 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5789 catch,error_status |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5790 if error_status ne 0 then begin |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5791 print, 'Cannot get info about system variables' |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5792 endif else begin |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5793 help,/brief,output=s,/system_variables ; ? unsafe use of OUTPUT= |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5794 s = strtrim(strjoin(s,' ',/single),2) ; make one line |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5795 v = strsplit(s,' +',/regex,/extract) ; get variables |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5796 for i=0L,n_elements(v)-1 do begin |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5797 t = [''] ; get tag list |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5798 a=execute('if n_tags('+v[i]+') gt 0 then t=tag_names('+v[i]+')') |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5799 print, 'IDLWAVE-SYSVAR: '+v[i]+' '+strjoin(t,' ',/single) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5800 endfor |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5801 endelse |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5802 end |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5803 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5804 pro idlwave_get_class_tags, class |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5805 res = execute('tags=tag_names({'+class+'})') |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5806 if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5807 end |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5808 ;; END OF IDLWAVE SUPPORT ROUTINES |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5809 " |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5810 "The idl programs to get info from the shell.") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5811 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5812 (defvar 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:
27606
diff
changeset
|
5813 "Remembers if the routine info procedure is already compiled.") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5814 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5815 (defvar idlwave-shell-temp-pro-file) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5816 (defvar idlwave-shell-temp-rinfo-save-file) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5817 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5818 (defun idlwave-shell-compile-helper-routines (&optional wait) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5819 (unless (and idlwave-idlwave_routine_info-compiled |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5820 (file-readable-p (idlwave-shell-temp-file 'rinfo))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5821 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5822 (set-buffer (idlwave-find-file-noselect |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5823 (idlwave-shell-temp-file 'pro))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5824 (erase-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5825 (insert idlwave-routine-info.pro) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5826 (save-buffer 0)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5827 (idlwave-shell-send-command |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5828 (concat ".run \"" idlwave-shell-temp-pro-file "\"") |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5829 nil 'hide wait) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5830 (idlwave-shell-send-command |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5831 (format "save,'idlwave_print_safe','idlwave_routine_info','idlwave_print_info_entry','idlwave_get_class_tags','idlwave_get_sysvars',FILE='%s',/ROUTINES" |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5832 (idlwave-shell-temp-file 'rinfo)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5833 nil 'hide) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5834 (setq idlwave-idlwave_routine_info-compiled t)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5835 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5836 ;; Restore if necessary. Must use execute to hide lame routine_info |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5837 ;; errors on undefinded routine |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5838 (idlwave-shell-send-command |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5839 (format "if execute(\"_v=routine_info('idlwave_routine_info',/SOURCE)\") eq 0 then restore,'%s' else if _v.path eq '' then restore,'%s'" |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5840 idlwave-shell-temp-rinfo-save-file |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5841 idlwave-shell-temp-rinfo-save-file) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5842 nil 'hide)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5843 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5844 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5845 (defun idlwave-shell-update-routine-info (&optional quiet run-hooks wait file) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5846 "Query the shell for routine_info of compiled modules and update the lists." |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5847 ;; Save and compile the procedure. The compiled procedure is then |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5848 ;; saved into an IDL SAVE file, to allow for fast RESTORE. We may |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5849 ;; need to test for and possibly RESTORE the procedure each time we |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5850 ;; use it, since the user may have killed or redefined it. In |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5851 ;; particular, .RESET_SESSION will kill all user procedures. If |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5852 ;; FILE is set, only update routine info for routines in that file. |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5853 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5854 (idlwave-shell-compile-helper-routines wait) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5855 ; execute the routine_info procedure, and analyze the output |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5856 (idlwave-shell-send-command |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5857 (format "idlwave_routine_info%s" (if file (concat ",'" file "'") "")) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5858 `(progn |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5859 (idlwave-shell-routine-info-filter) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5860 (idlwave-concatenate-rinfo-lists ,quiet ,run-hooks)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5861 'hide wait)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5862 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5863 ;; --------------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5864 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5865 ;; Completion and displaying routine calling sequences |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5866 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5867 (defvar idlwave-completion-help-info nil) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5868 (defvar idlwave-completion-help-links nil) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5869 (defvar idlwave-current-obj_new-class nil) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5870 (defvar idlwave-complete-special nil) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5871 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5872 (defun idlwave-complete (&optional arg module class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5873 "Complete a function, procedure or keyword name at point. |
60925
a9c571ede913
* progmodes/cperl-mode.el, progmodes/idlw-shell.el,
Werner LEMBERG <wl@gnu.org>
parents:
60917
diff
changeset
|
5874 This function is smart and figures out what can be completed |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5875 at this point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5876 - At the beginning of a statement it completes procedure names. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5877 - In the middle of a statement it completes function names. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5878 - after a `(' or `,' in the argument list of a function or procedure, |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5879 it completes a keyword of the relevant function or procedure. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5880 - In the first arg of `OBJ_NEW', it completes a class name. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5881 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5882 When several completions are possible, a list will be displayed in the |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5883 *Completions* buffer. If this list is too long to fit into the |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5884 window, scrolling can be achieved by repeatedly pressing |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5885 \\[idlwave-complete]. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5886 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5887 The function also knows about object methods. When it needs a class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5888 name, the action depends upon `idlwave-query-class', which see. You |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5889 can force IDLWAVE to ask you for a class name with a |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5890 \\[universal-argument] prefix argument to this command. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5891 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5892 See also the variables `idlwave-keyword-completion-adds-equal' and |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5893 `idlwave-function-completion-adds-paren'. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5894 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5895 The optional ARG can be used to specify the completion type in order |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5896 to override IDLWAVE's idea of what should be completed at point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5897 Possible values are: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5898 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5899 0 <=> query for the completion type |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5900 1 <=> 'procedure |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5901 2 <=> 'procedure-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5902 3 <=> 'function |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5903 4 <=> 'function-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5904 5 <=> 'procedure-method |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5905 6 <=> 'procedure-method-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5906 7 <=> 'function-method |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5907 8 <=> 'function-method-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5908 9 <=> 'class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5909 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5910 As a special case, the universal argument C-u forces completion of |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5911 function names in places where the default would be a keyword. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5912 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5913 Two prefix argument, C-u C-u, prompts for a regexp by which to limit |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5914 completion. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5915 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5916 For Lisp programmers only: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5917 When we force a keyword, optional argument MODULE can contain the module name. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5918 When we force a method or a method keyword, CLASS can specify the class." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5919 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5920 (idlwave-routines) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5921 (let* ((where-list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5922 (if (and arg |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5923 (or (and (integerp arg) (not (equal arg '(16)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5924 (symbolp arg))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5925 (idlwave-make-force-complete-where-list arg module class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5926 (idlwave-where))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5927 (what (nth 2 where-list)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5928 (idlwave-force-class-query (equal arg '(4))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5929 (completion-regexp-list |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5930 (if (equal arg '(16)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5931 (list (read-string (concat "Completion Regexp: ")))))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5932 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5933 (if (and module (string-match "::" module)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5934 (setq class (substring module 0 (match-beginning 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5935 module (substring module (match-end 0)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5936 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5937 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5938 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5939 ((and (null arg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5940 (eq (car-safe last-command) 'idlwave-display-completion-list) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
5941 (get-buffer-window "*Completions*")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5942 (setq this-command last-command) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5943 (idlwave-scroll-completions)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5944 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5945 ;; Complete a filename in quotes |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5946 ((and (idlwave-in-quote) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5947 (not (eq what 'class))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5948 (idlwave-complete-filename)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5949 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5950 ;; Check for any special completion functions |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5951 ((and idlwave-complete-special |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
5952 (idlwave-call-special idlwave-complete-special))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5953 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5954 ((null what) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5955 (error "Nothing to complete here")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5956 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5957 ;; Complete a class |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5958 ((eq what 'class) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
5959 (setq idlwave-completion-help-info '(class)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5960 (idlwave-complete-class)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5961 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5962 ((eq what 'procedure) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5963 ;; Complete a procedure name |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5964 (let* ((cw-list (nth 3 where-list)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5965 (class-selector (idlwave-determine-class cw-list 'pro)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5966 (super-classes (unless (idlwave-explicit-class-listed cw-list) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5967 (idlwave-all-class-inherits class-selector))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5968 (isa (concat "procedure" (if class-selector "-method" ""))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5969 (type-selector 'pro)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5970 (setq idlwave-completion-help-info |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5971 (list 'routine nil type-selector class-selector nil super-classes)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5972 (idlwave-complete-in-buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5973 'procedure (if class-selector 'method 'routine) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5974 (idlwave-routines) 'idlwave-selector |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5975 (format "Select a %s name%s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5976 isa |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5977 (if class-selector |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5978 (format " (class is %s)" |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5979 (if (eq class-selector t) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
5980 "unknown" class-selector)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5981 "")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5982 isa |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
5983 'idlwave-attach-method-classes 'idlwave-add-file-link-selector))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5984 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5985 ((eq what 'function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5986 ;; Complete a function name |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5987 (let* ((cw-list (nth 3 where-list)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5988 (class-selector (idlwave-determine-class cw-list 'fun)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5989 (super-classes (unless (idlwave-explicit-class-listed cw-list) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
5990 (idlwave-all-class-inherits class-selector))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5991 (isa (concat "function" (if class-selector "-method" ""))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5992 (type-selector 'fun)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
5993 (setq idlwave-completion-help-info |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
5994 (list 'routine nil type-selector class-selector nil super-classes)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5995 (idlwave-complete-in-buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5996 'function (if class-selector 'method 'routine) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5997 (idlwave-routines) 'idlwave-selector |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5998 (format "Select a %s name%s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
5999 isa |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6000 (if class-selector |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6001 (format " (class is %s)" |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6002 (if (eq class-selector t) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6003 "unknown" class-selector)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6004 "")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6005 isa |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6006 'idlwave-attach-method-classes 'idlwave-add-file-link-selector))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6007 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6008 ((and (memq what '(procedure-keyword function-keyword)) ; Special Case |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6009 (equal arg '(4))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6010 (idlwave-complete 3)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6011 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6012 ((eq what 'procedure-keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6013 ;; Complete a procedure keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6014 (let* ((where (nth 3 where-list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6015 (name (car where)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6016 (method-selector name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6017 (type-selector 'pro) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6018 (class (idlwave-determine-class where 'pro)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6019 (class-selector class) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6020 (super-classes (idlwave-all-class-inherits class-selector)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6021 (isa (format "procedure%s-keyword" (if class "-method" ""))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6022 (entry (idlwave-best-rinfo-assq |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6023 name 'pro class (idlwave-routines))) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
6024 (system (if entry (eq (car (nth 3 entry)) 'system))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6025 (list (idlwave-entry-keywords entry 'do-link))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6026 (unless (or entry (eq class t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6027 (error "Nothing known about procedure %s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6028 (idlwave-make-full-name class name))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6029 (setq list (idlwave-fix-keywords name 'pro class list |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
6030 super-classes system)) |
63494
c6c9f46490d0
(idlwave-complete): Don't use `format' on `error' arguments.
Juanma Barranquero <lekktu@gmail.com>
parents:
63427
diff
changeset
|
6031 (unless list (error "No keywords available for procedure %s" |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
6032 (idlwave-make-full-name class name))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6033 (setq idlwave-completion-help-info |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6034 (list 'keyword name type-selector class-selector entry super-classes)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6035 (idlwave-complete-in-buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6036 'keyword 'keyword list nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6037 (format "Select keyword for procedure %s%s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6038 (idlwave-make-full-name class name) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6039 (if (or (member '("_EXTRA") list) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6040 (member '("_REF_EXTRA") list)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6041 " (note _EXTRA)" "")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6042 isa |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6043 'idlwave-attach-keyword-classes))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6044 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6045 ((eq what 'function-keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6046 ;; Complete a function keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6047 (let* ((where (nth 3 where-list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6048 (name (car where)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6049 (method-selector name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6050 (type-selector 'fun) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6051 (class (idlwave-determine-class where 'fun)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6052 (class-selector class) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6053 (super-classes (idlwave-all-class-inherits class-selector)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6054 (isa (format "function%s-keyword" (if class "-method" ""))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6055 (entry (idlwave-best-rinfo-assq |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6056 name 'fun class (idlwave-routines))) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
6057 (system (if entry (eq (car (nth 3 entry)) 'system))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6058 (list (idlwave-entry-keywords entry 'do-link)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6059 msg-name) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6060 (unless (or entry (eq class t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6061 (error "Nothing known about function %s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6062 (idlwave-make-full-name class name))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6063 (setq list (idlwave-fix-keywords name 'fun class list |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
6064 super-classes system)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6065 ;; OBJ_NEW: Messages mention the proper Init method |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6066 (setq msg-name (if (and (null class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6067 (string= (upcase name) "OBJ_NEW")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6068 (concat idlwave-current-obj_new-class |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6069 "::Init (via OBJ_NEW)") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6070 (idlwave-make-full-name class name))) |
63494
c6c9f46490d0
(idlwave-complete): Don't use `format' on `error' arguments.
Juanma Barranquero <lekktu@gmail.com>
parents:
63427
diff
changeset
|
6071 (unless list (error "No keywords available for function %s" |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
6072 msg-name)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6073 (setq idlwave-completion-help-info |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6074 (list 'keyword name type-selector class-selector nil super-classes)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6075 (idlwave-complete-in-buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6076 'keyword 'keyword list nil |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6077 (format "Select keyword for function %s%s" msg-name |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6078 (if (or (member '("_EXTRA") list) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6079 (member '("_REF_EXTRA") list)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6080 " (note _EXTRA)" "")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6081 isa |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6082 'idlwave-attach-keyword-classes))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6083 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6084 (t (error "This should not happen (idlwave-complete)"))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6085 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6086 (defvar idlwave-complete-special nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6087 "List of special completion functions. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6088 These functions are called for each completion. Each function must |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6089 check if its own special completion context is present. If yes, it |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6090 should use `idlwave-complete-in-buffer' to do some completion and |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6091 return t. If such a function returns t, *no further* attempts to |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6092 complete other contexts will be done. If the function returns nil, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6093 other completions will be tried.") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6094 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6095 (defun idlwave-call-special (functions &rest args) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6096 (let ((funcs functions) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6097 fun ret) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6098 (catch 'exit |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6099 (while (setq fun (pop funcs)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6100 (if (setq ret (apply fun args)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6101 (throw 'exit ret))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6102 nil))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6103 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6104 (defun idlwave-make-force-complete-where-list (what &optional module class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6105 ;; Return an artificial WHERE specification to force the completion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6106 ;; routine to complete a specific item independent of context. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6107 ;; WHAT is the prefix arg of `idlwave-complete', see there for details. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6108 ;; MODULE and CLASS can be used to specify the routine name and class. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6109 ;; The class name will also be found in MODULE if that is like "class::mod". |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6110 (let* ((what-list '(("procedure") ("procedure-keyword") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6111 ("function") ("function-keyword") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6112 ("procedure-method") ("procedure-method-keyword") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6113 ("function-method") ("function-method-keyword") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6114 ("class"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6115 (module (idlwave-sintern-routine-or-method module class)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6116 (class (idlwave-sintern-class class)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6117 (what (cond |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6118 ((equal what 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6119 (setq what |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6120 (intern (completing-read |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6121 "Complete what? " what-list nil t)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6122 ((integerp what) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6123 (setq what (intern (car (nth (1- what) what-list))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6124 ((and what |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6125 (symbolp what) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6126 (assoc (symbol-name what) what-list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6127 what) |
60917
87f9bb9d3718
* progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el,
Werner LEMBERG <wl@gnu.org>
parents:
60766
diff
changeset
|
6128 (t (error "Invalid WHAT")))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6129 (nil-list '(nil nil nil nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6130 (class-list (list nil nil (or class t) nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6131 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6132 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6133 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6134 ((eq what 'procedure) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6135 (list nil-list nil-list 'procedure nil-list nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6136 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6137 ((eq what 'procedure-keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6138 (let* ((class-selector nil) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6139 (super-classes nil) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6140 (type-selector 'pro) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6141 (pro (or module |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6142 (idlwave-completing-read |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6143 "Procedure: " (idlwave-routines) 'idlwave-selector)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6144 (setq pro (idlwave-sintern-routine pro)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6145 (list nil-list nil-list 'procedure-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6146 (list pro nil nil nil) nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6147 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6148 ((eq what 'function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6149 (list nil-list nil-list 'function nil-list nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6150 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6151 ((eq what 'function-keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6152 (let* ((class-selector nil) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6153 (super-classes nil) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6154 (type-selector 'fun) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6155 (func (or module |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6156 (idlwave-completing-read |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6157 "Function: " (idlwave-routines) 'idlwave-selector)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6158 (setq func (idlwave-sintern-routine func)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6159 (list nil-list nil-list 'function-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6160 (list func nil nil nil) nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6161 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6162 ((eq what 'procedure-method) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6163 (list nil-list nil-list 'procedure class-list nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6164 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6165 ((eq what 'procedure-method-keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6166 (let* ((class (idlwave-determine-class class-list 'pro)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6167 (class-selector class) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6168 (super-classes (idlwave-all-class-inherits class-selector)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6169 (type-selector 'pro) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6170 (pro (or module |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6171 (idlwave-completing-read |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6172 (format "Procedure in %s class: " class-selector) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6173 (idlwave-routines) 'idlwave-selector)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6174 (setq pro (idlwave-sintern-method pro)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6175 (list nil-list nil-list 'procedure-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6176 (list pro nil class nil) nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6177 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6178 ((eq what 'function-method) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6179 (list nil-list nil-list 'function class-list nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6180 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6181 ((eq what 'function-method-keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6182 (let* ((class (idlwave-determine-class class-list 'fun)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6183 (class-selector class) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6184 (super-classes (idlwave-all-class-inherits class-selector)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6185 (type-selector 'fun) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6186 (func (or module |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6187 (idlwave-completing-read |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6188 (format "Function in %s class: " class-selector) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6189 (idlwave-routines) 'idlwave-selector)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6190 (setq func (idlwave-sintern-method func)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6191 (list nil-list nil-list 'function-keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6192 (list func nil class nil) nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6193 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6194 ((eq what 'class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6195 (list nil-list nil-list 'class nil-list nil)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6196 |
60917
87f9bb9d3718
* progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el,
Werner LEMBERG <wl@gnu.org>
parents:
60766
diff
changeset
|
6197 (t (error "Invalid value for WHAT"))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6198 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6199 (defun idlwave-completing-read (&rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6200 ;; Completing read, case insensitive |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6201 (let ((old-value (default-value 'completion-ignore-case))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6202 (unwind-protect |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6203 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6204 (setq-default completion-ignore-case t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6205 (apply 'completing-read args)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6206 (setq-default completion-ignore-case old-value)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6207 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6208 (defvar idlwave-shell-default-directory) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6209 (defun idlwave-complete-filename () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6210 "Use the comint stuff to complete a file name." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6211 (require 'comint) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6212 (let* ((comint-file-name-chars "~/A-Za-z0-9+@:_.$#%={}\\-") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6213 (comint-completion-addsuffix nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6214 (default-directory |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6215 (if (and (boundp 'idlwave-shell-default-directory) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6216 (stringp idlwave-shell-default-directory) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6217 (file-directory-p idlwave-shell-default-directory)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6218 idlwave-shell-default-directory |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6219 default-directory))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6220 (comint-dynamic-complete-filename))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6221 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6222 (defun idlwave-make-full-name (class name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6223 ;; Make a fully qualified module name including the class name |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6224 (concat (if class (format "%s::" class) "") name)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6225 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6226 (defun idlwave-rinfo-assoc (name type class list) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6227 "Like `idlwave-rinfo-assq', but sintern strings first." |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6228 (idlwave-rinfo-assq |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6229 (idlwave-sintern-routine-or-method name class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6230 type (idlwave-sintern-class class) list)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6231 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6232 (defun idlwave-rinfo-assq (name type class list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6233 ;; Works like assq, but also checks type and class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6234 (catch 'exit |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6235 (let (match) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6236 (while (setq match (assq name list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6237 (and (or (eq type t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6238 (eq (nth 1 match) type)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6239 (eq (nth 2 match) class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6240 (throw 'exit match)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6241 (setq list (cdr (memq match list))))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6242 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6243 (defun idlwave-rinfo-assq-any-class (name type class list) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6244 ;; Return the first matching method on the inheritance list |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6245 (let* ((classes (cons class (idlwave-all-class-inherits class))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6246 class rtn) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6247 (while classes |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6248 (if (setq rtn (idlwave-rinfo-assq name type (pop classes) list)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6249 (setq classes nil))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6250 rtn)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6251 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6252 (defun idlwave-best-rinfo-assq (name type class list &optional with-file |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6253 keep-system) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6254 "Like `idlwave-rinfo-assq', but get all twins and sort, then return first. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6255 If WITH-FILE is passed, find the best rinfo entry with a file |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6256 included. If KEEP-SYSTEM is set, don't prune system for compiled |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6257 syslib files." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6258 (let ((twins (idlwave-routine-twins |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6259 (idlwave-rinfo-assq-any-class name type class list) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6260 list)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6261 syslibp) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6262 (when (> (length twins) 1) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6263 (setq twins (sort twins 'idlwave-routine-entry-compare-twins)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6264 (if (and (null keep-system) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6265 (eq 'system (car (nth 3 (car twins)))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6266 (setq syslibp (idlwave-any-syslib (cdr twins))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6267 (not (equal 1 syslibp))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6268 ;; Its a compiled syslib, so we need to remove the system entry |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6269 (setq twins (cdr twins))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6270 (if with-file |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6271 (setq twins (delq nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6272 (mapcar (lambda (x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6273 (if (nth 1 (nth 3 x)) x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6274 twins))))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6275 (car twins))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6276 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6277 (defun idlwave-best-rinfo-assoc (name type class list &optional with-file |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6278 keep-system) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6279 "Like `idlwave-best-rinfo-assq', but sintern strings first." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6280 (idlwave-best-rinfo-assq |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6281 (idlwave-sintern-routine-or-method name class) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6282 type (idlwave-sintern-class class) list with-file keep-system)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6283 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6284 (defun idlwave-any-syslib (entries) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6285 "Does the entry list ENTRIES contain a syslib entry? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6286 If yes, return the index (>=1)." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6287 (let (file (cnt 0)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6288 (catch 'exit |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6289 (while entries |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6290 (incf cnt) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6291 (setq file (idlwave-routine-source-file (nth 3 (car entries)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6292 (if (and file (idlwave-syslib-p file)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6293 (throw 'exit cnt) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6294 (setq entries (cdr entries)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6295 nil))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6296 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6297 (defun idlwave-all-assq (key list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6298 "Return a list of all associations of Key in LIST." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6299 (let (rtn elt) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6300 (while (setq elt (assq key list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6301 (push elt rtn) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6302 (setq list (cdr (memq elt list)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6303 (nreverse rtn))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6304 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6305 (defun idlwave-all-method-classes (method &optional type) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6306 "Return all classes which have a method METHOD. TYPE is 'fun or 'pro. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6307 When TYPE is not specified, both procedures and functions will be considered." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6308 (if (null method) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6309 (mapcar 'car (idlwave-class-alist)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6310 (let (rtn) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6311 (mapcar (lambda (x) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6312 (and (nth 2 x) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6313 (or (not type) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6314 (eq type (nth 1 x))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6315 (push (nth 2 x) rtn))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6316 (idlwave-all-assq method (idlwave-routines))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6317 (idlwave-uniquify rtn)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6318 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6319 (defun idlwave-all-method-keyword-classes (method keyword &optional type) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6320 "Return all classes which have a method METHOD with keyword KEYWORD. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6321 TYPE is 'fun or 'pro. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6322 When TYPE is not specified, both procedures and functions will be considered." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6323 (if (or (null method) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6324 (null keyword)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6325 nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6326 (let (rtn) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6327 (mapcar (lambda (x) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6328 (and (nth 2 x) ; non-nil class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6329 (or (not type) ; correct or unspecified type |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6330 (eq type (nth 1 x))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6331 (assoc keyword (idlwave-entry-keywords x)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6332 (push (nth 2 x) rtn))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6333 (idlwave-all-assq method (idlwave-routines))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6334 (idlwave-uniquify rtn)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6335 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6336 (defun idlwave-members-only (list club) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6337 "Return list of all elements in LIST which are also in CLUB." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6338 (let (rtn) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6339 (while list |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6340 (if (member (car list) club) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6341 (setq rtn (cons (car list) rtn))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6342 (setq list (cdr list))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6343 (nreverse rtn))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6344 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6345 (defun idlwave-nonmembers-only (list club) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6346 "Return list of all elements in LIST which are not in CLUB." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6347 (let (rtn) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6348 (while list |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6349 (if (member (car list) club) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6350 nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6351 (setq rtn (cons (car list) rtn))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6352 (setq list (cdr list))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6353 (nreverse rtn))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6354 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6355 (defun idlwave-explicit-class-listed (info) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6356 "Return whether or not the class is listed explicitly, ala a->b::c. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6357 INFO is as returned by idlwave-what-function or -procedure." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6358 (let ((apos (nth 3 info))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6359 (if apos |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6360 (save-excursion (goto-char apos) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6361 (looking-at "->[a-zA-Z][a-zA-Z0-9$_]*::"))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6362 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6363 (defvar idlwave-determine-class-special nil |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6364 "List of special functions for determining class. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6365 Must accept two arguments: `apos' and `info'") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6366 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6367 (defun idlwave-determine-class (info type) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6368 ;; Determine the class of a routine call. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6369 ;; INFO is the `cw-list' structure as returned by idlwave-where. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6370 ;; The second element in this structure is the class. When nil, we |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6371 ;; return nil. When t, try to get the class from text properties at |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6372 ;; the arrow. When the object is "self", we use the class of the |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6373 ;; current routine. otherwise prompt the user for a class name. |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6374 ;; Also stores the selected class as a text property at the arrow. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6375 ;; TYPE is 'fun or 'pro. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6376 (let* ((class (nth 2 info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6377 (apos (nth 3 info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6378 (nassoc (assoc (if (stringp (car info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6379 (upcase (car info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6380 (car info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6381 idlwave-query-class)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6382 (dassoc (assq (if (car info) 'keyword-default 'method-default) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6383 idlwave-query-class)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6384 (query (cond (nassoc (cdr nassoc)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6385 (dassoc (cdr dassoc)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6386 (t t))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6387 (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->"))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6388 (is-self |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6389 (and arrow |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6390 (save-excursion (goto-char apos) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6391 (forward-word -1) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6392 (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:
27606
diff
changeset
|
6393 (looking-at "self\\>"))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6394 (force-query idlwave-force-class-query) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6395 store special-class class-alist) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6396 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6397 ((null class) nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6398 ((eq t class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6399 ;; There is an object which would like to know its class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6400 (if (and arrow (get-text-property apos 'idlwave-class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6401 idlwave-store-inquired-class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6402 (not force-query)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6403 (setq class (get-text-property apos 'idlwave-class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6404 class (idlwave-sintern-class class))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6405 (if (and (eq t class) is-self) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6406 (setq class (or (nth 2 (idlwave-current-routine)) class))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6407 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6408 ;; Before prompting, try any special class determination routines |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6409 (when (and (eq t class) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6410 idlwave-determine-class-special |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6411 (not force-query)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6412 (setq special-class |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6413 (idlwave-call-special idlwave-determine-class-special apos)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6414 (if special-class |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6415 (setq class (idlwave-sintern-class special-class) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6416 store idlwave-store-inquired-class))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6417 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6418 ;; Prompt for a class, if we need to |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6419 (when (and (eq class t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6420 (or force-query query)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6421 (setq class-alist |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6422 (mapcar 'list (idlwave-all-method-classes (car info) type))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6423 (setq class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6424 (idlwave-sintern-class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6425 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6426 ((and (= (length class-alist) 0) (not force-query)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6427 (error "No classes available with method %s" (car info))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6428 ((and (= (length class-alist) 1) (not force-query)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6429 (car (car class-alist))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6430 (t |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6431 (setq store idlwave-store-inquired-class) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6432 (idlwave-completing-read |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6433 (format "Class%s: " (if (stringp (car info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6434 (format " for %s method %s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6435 type (car info)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6436 "")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6437 class-alist nil nil nil 'idlwave-class-history)))))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6438 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6439 ;; Store it, if requested |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6440 (when (and class (not (eq t class))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6441 ;; We have a real class here |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6442 (when (and store arrow) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6443 (condition-case () |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6444 (add-text-properties |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6445 apos (+ apos 2) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6446 `(idlwave-class ,class face ,idlwave-class-arrow-face |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6447 rear-nonsticky t)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6448 (error nil))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6449 (setf (nth 2 info) class)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6450 ;; Return the class |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6451 class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6452 ;; Default as fallback |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6453 (t class)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6454 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6455 (defvar type-selector) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6456 (defvar class-selector) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6457 (defvar method-selector) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6458 (defvar super-classes) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6459 (defun idlwave-selector (a) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6460 (and (eq (nth 1 a) type-selector) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6461 (or (and (nth 2 a) (eq class-selector t)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6462 (eq (nth 2 a) class-selector) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6463 (memq (nth 2 a) super-classes)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6464 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6465 (defun idlwave-add-file-link-selector (a) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6466 ;; Record a file link, if any, for the tested names during selection. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6467 (let ((sel (idlwave-selector a)) file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6468 (if (and sel (setq file (idlwave-entry-has-help a))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6469 (push (cons (car a) file) idlwave-completion-help-links)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6470 sel)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6471 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6472 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6473 (defun idlwave-where () |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6474 "Find out where we are. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6475 The return value is a list with the following stuff: |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6476 \(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6477 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6478 PRO-LIST (PRO POINT CLASS ARROW) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6479 FUNC-LIST (FUNC POINT CLASS ARROW) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6480 COMPLETE-WHAT a symbol indicating what kind of completion makes sense here |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6481 CW-LIST (PRO-OR-FUNC POINT CLASS ARROW) Like PRO-LIST, for what can |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6482 be completed here. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6483 LAST-CHAR last relevant character before point (non-white non-comment, |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6484 not part of current identifier or leading slash). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6485 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6486 In the lists, we have these meanings: |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6487 PRO: Procedure name |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6488 FUNC: Function name |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6489 POINT: Where is this |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6490 CLASS: What class has the routine (nil=no, t=is method, but class unknown) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6491 ARROW: Location of the arrow" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6492 (idlwave-routines) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6493 (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6494 (bos (save-excursion (idlwave-start-of-substatement 'pre) (point))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6495 (func-entry (idlwave-what-function bos)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6496 (func (car func-entry)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6497 (func-class (nth 1 func-entry)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6498 (func-arrow (nth 2 func-entry)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6499 (func-point (or (nth 3 func-entry) 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6500 (func-level (or (nth 4 func-entry) 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6501 (pro-entry (idlwave-what-procedure bos)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6502 (pro (car pro-entry)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6503 (pro-class (nth 1 pro-entry)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6504 (pro-arrow (nth 2 pro-entry)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6505 (pro-point (or (nth 3 pro-entry) 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6506 (last-char (idlwave-last-valid-char)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6507 (case-fold-search t) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6508 (match-string (buffer-substring bos (point))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6509 cw cw-mod cw-arrow cw-class cw-point) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6510 (if (< func-point pro-point) (setq func nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6511 (cond |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6512 ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6513 match-string) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6514 (setq cw 'class)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6515 ((string-match |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6516 "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6517 (if (> pro-point 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6518 (buffer-substring pro-point (point)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6519 match-string)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6520 (setq cw 'procedure cw-class pro-class cw-point pro-point |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6521 cw-arrow pro-arrow)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6522 ((string-match "\\`[ \t]*\\(pro\\|function\\)\\>" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6523 match-string) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6524 nil) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6525 ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6526 match-string) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6527 (setq cw 'class)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6528 ((string-match "\\<inherits\\s-+\\([a-zA-Z0-9$_]*\\)?\\'" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6529 match-string) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6530 (setq cw 'class)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6531 ((and func |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6532 (> func-point pro-point) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6533 (= func-level 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6534 (memq last-char '(?\( ?,))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6535 (setq cw 'function-keyword cw-mod func cw-point func-point |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6536 cw-class func-class cw-arrow func-arrow)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6537 ((and pro (eq last-char ?,)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6538 (setq cw 'procedure-keyword cw-mod pro cw-point pro-point |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6539 cw-class pro-class cw-arrow pro-arrow)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6540 ; ((member last-char '(?\' ?\) ?\] ?!)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6541 ; ;; after these chars, a function makes no sense |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6542 ; ;; FIXME: I am sure there can be more in this list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6543 ; ;; FIXME: Do we want to do this at all? |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6544 ; nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6545 ;; Everywhere else we try a function. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6546 (t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6547 (setq cw 'function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6548 (save-excursion |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6549 (if (re-search-backward "->[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\s-*\\)?\\(\\([$a-zA-Z0-9_]+\\)::\\)?[$a-zA-Z0-9_]*\\=" bos t) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6550 (setq cw-arrow (copy-marker (match-beginning 0)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6551 cw-class (if (match-end 4) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6552 (idlwave-sintern-class (match-string 4)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6553 t)))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6554 (list (list pro pro-point pro-class pro-arrow) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6555 (list func func-point func-class func-arrow) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6556 cw |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6557 (list cw-mod cw-point cw-class cw-arrow) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6558 last-char))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6559 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6560 (defun idlwave-this-word (&optional class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6561 ;; Grab the word around point. CLASS is for the `skip-chars=...' functions |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6562 (setq class (or class "a-zA-Z0-9$_.")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6563 (save-excursion |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6564 (buffer-substring |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6565 (progn (skip-chars-backward class) (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6566 (progn (skip-chars-forward class) (point))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6567 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6568 (defun idlwave-what-function (&optional bound) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6569 ;; Find out if point is within the argument list of a function. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6570 ;; The return value is ("function-name" class arrow-start (point) level). |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6571 ;; Level is 1 on the top level parentheses, higher further down. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6572 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6573 ;; If the optional BOUND is an integer, bound backwards directed |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6574 ;; searches to this point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6575 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6576 (catch 'exit |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6577 (let (pos |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6578 func-point |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6579 (cnt 0) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6580 func arrow-start class) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6581 (idlwave-with-special-syntax |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6582 (save-restriction |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6583 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6584 (narrow-to-region (max 1 (or bound 0)) (point-max)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6585 ;; move back out of the current parenthesis |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6586 (while (condition-case nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6587 (progn (up-list -1) t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6588 (error nil)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6589 (setq pos (point)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6590 (incf cnt) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6591 (when (and (= (following-char) ?\() |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6592 (re-search-backward |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6593 "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\=" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6594 bound t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6595 (setq func (match-string 2) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6596 func-point (goto-char (match-beginning 2)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6597 pos func-point) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6598 (if (re-search-backward |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6599 "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6600 (setq arrow-start (copy-marker (match-beginning 0)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6601 class (or (match-string 2) t))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6602 (throw |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6603 'exit |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6604 (list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6605 (idlwave-sintern-routine-or-method func class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6606 (idlwave-sintern-class class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6607 arrow-start func-point cnt))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6608 (goto-char pos)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6609 (throw 'exit nil))))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6610 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6611 (defun idlwave-what-procedure (&optional bound) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6612 ;; Find out if point is within the argument list of a procedure. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6613 ;; The return value is ("procedure-name" class arrow-pos (point)). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6614 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6615 ;; If the optional BOUND is an integer, bound backwards directed |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6616 ;; searches to this point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6617 (let ((pos (point)) pro-point |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6618 pro class arrow-start string) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6619 (save-excursion |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6620 ;;(idlwave-beginning-of-statement) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6621 (idlwave-start-of-substatement 'pre) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6622 (setq string (buffer-substring (point) pos)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6623 (if (string-match |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6624 "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6625 (setq pro (match-string 1 string) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6626 pro-point (+ (point) (match-beginning 1))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6627 (if (and (idlwave-skip-object) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6628 (setq string (buffer-substring (point) pos)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6629 (string-match |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6630 "\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6631 string)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6632 (setq pro (if (match-beginning 4) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6633 (match-string 4 string)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6634 pro-point (if (match-beginning 4) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6635 (+ (point) (match-beginning 4)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6636 pos) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6637 arrow-start (copy-marker (+ (point) (match-beginning 1))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6638 class (or (match-string 3 string) t))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6639 (list (idlwave-sintern-routine-or-method pro class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6640 (idlwave-sintern-class class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6641 arrow-start |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6642 pro-point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6643 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6644 (defun idlwave-skip-object () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6645 ;; If there is an object at point, move over it and return t. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6646 (let ((pos (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6647 (if (catch 'exit |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6648 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6649 (skip-chars-forward " ") ; white space |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6650 (skip-chars-forward "*") ; de-reference |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6651 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6652 ((looking-at idlwave-identifier) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6653 (goto-char (match-end 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6654 ((eq (following-char) ?\() |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6655 nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6656 (t (throw 'exit nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6657 (catch 'endwhile |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6658 (while t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6659 (cond ((eq (following-char) ?.) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6660 (forward-char 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6661 (if (not (looking-at idlwave-identifier)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6662 (throw 'exit nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6663 (goto-char (match-end 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6664 ((memq (following-char) '(?\( ?\[)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6665 (condition-case nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6666 (forward-list 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6667 (error (throw 'exit nil)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6668 (t (throw 'endwhile t))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6669 (if (looking-at "[ \t]*->") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6670 (throw 'exit (setq pos (match-beginning 0))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6671 (throw 'exit nil)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6672 (goto-char pos) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6673 nil))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6674 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6675 (defun idlwave-last-valid-char () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6676 "Return the last character before point which is not white or a comment |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6677 and also not part of the current identifier. Since we do this in |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6678 order to identify places where keywords are, we consider the initial |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6679 `/' of a keyword as part of the identifier. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6680 This function is not general, can only be used for completion stuff." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6681 (catch 'exit |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6682 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6683 ;; skip the current identifier |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6684 (skip-chars-backward "a-zA-Z0-9_$") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6685 ;; also skip a leading slash which might be belong to the keyword |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6686 (if (eq (preceding-char) ?/) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6687 (backward-char 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6688 ;; FIXME: does not check if this is a valid identifier |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6689 (while t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6690 (skip-chars-backward " \t") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6691 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6692 ((memq (preceding-char) '(?\; ?\$)) (throw 'exit nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6693 ((eq (preceding-char) ?\n) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6694 (beginning-of-line 0) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
6695 (if (looking-at "\\([^\n]*\\)\\$[ \t]*\\(;[^\n]*\\)?\n") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6696 ;; continuation line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6697 (goto-char (match-end 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6698 (throw 'exit nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6699 (t (throw 'exit (preceding-char)))))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6700 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6701 (defvar idlwave-complete-after-success-form nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6702 "A form to evaluate after successful completion.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6703 (defvar idlwave-complete-after-success-form-force nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6704 "A form to evaluate after completion selection in *Completions* buffer.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6705 (defconst idlwave-completion-mark (make-marker) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6706 "A mark pointing to the beginning of the completion string.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6707 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6708 (defun idlwave-complete-in-buffer (type stype list selector prompt isa |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6709 &optional prepare-display-function |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6710 special-selector) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6711 "Perform TYPE completion of word before point against LIST. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6712 SELECTOR is the PREDICATE argument for the completion function. Show |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6713 PROMPT in echo area. TYPE is one of the intern types, e.g. 'function, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6714 'procedure, 'class-tag, 'keyword, 'sysvar, etc.. SPECIAL-SELECTOR is |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6715 used only once, for `all-completions', and can be used to, e.g., |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6716 accumulate information on matching completions." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6717 (let* ((completion-ignore-case t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6718 beg (end (point)) slash part spart completion all-completions |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6719 dpart dcompletion) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6720 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6721 (unless list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6722 (error (concat prompt ": No completions available"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6723 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6724 ;; What is already in the buffer? |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6725 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6726 (skip-chars-backward "a-zA-Z0-9_$") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6727 (setq slash (eq (preceding-char) ?/) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6728 beg (point) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6729 idlwave-complete-after-success-form |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6730 (list 'idlwave-after-successful-completion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6731 (list 'quote type) slash beg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6732 idlwave-complete-after-success-form-force |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6733 (list 'idlwave-after-successful-completion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6734 (list 'quote type) slash (list 'quote 'force)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6735 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6736 ;; Try a completion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6737 (setq part (buffer-substring beg end) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6738 dpart (downcase part) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6739 spart (idlwave-sintern stype part) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6740 completion (try-completion part list selector) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6741 dcompletion (if (stringp completion) (downcase completion)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6742 idlwave-completion-help-links nil) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6743 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6744 ((null completion) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6745 ;; nothing available. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6746 (error (concat prompt ": no completion for \"%s\"") part)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6747 ((and (not (equal dpart dcompletion)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6748 (not (eq t completion))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6749 ;; We can add something |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6750 (delete-region beg end) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6751 (if (and (string= part dpart) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6752 (or (not (string= part "")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6753 idlwave-complete-empty-string-as-lower-case) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6754 (not idlwave-completion-force-default-case)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6755 (insert dcompletion) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6756 (insert completion)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6757 (if (eq t (try-completion completion list selector)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6758 ;; Now this is a unique match |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6759 (idlwave-after-successful-completion type slash beg)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6760 t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6761 ((or (eq completion t) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6762 (and (= 1 (length (setq all-completions |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6763 (idlwave-uniquify |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6764 (all-completions part list |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6765 (or special-selector |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6766 selector)))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6767 (equal dpart dcompletion))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6768 ;; This is already complete |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6769 (idlwave-after-successful-completion type slash beg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6770 (message "%s is already the complete %s" part isa) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6771 nil) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6772 (t |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6773 ;; We cannot add something - offer a list. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6774 (message "Making completion list...") |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6775 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6776 (unless idlwave-completion-help-links ; already set somewhere? |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6777 (mapcar (lambda (x) ; Pass link prop through to highlight-linked |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6778 (let ((link (get-text-property 0 'link (car x)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6779 (if link |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6780 (push (cons (car x) link) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6781 idlwave-completion-help-links)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6782 list)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6783 (let* ((list all-completions) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6784 ;; "complete" means, this is already a valid completion |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6785 (complete (memq spart all-completions)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6786 (completion-highlight-first-word-only t)) ; XEmacs |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6787 ; (completion-fixup-function ; Emacs |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6788 ; (lambda () (and (eq (preceding-char) ?>) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6789 ; (re-search-backward " <" beg t))))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6790 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6791 (setq list (sort list (lambda (a b) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6792 (string< (downcase a) (downcase b))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6793 (if prepare-display-function |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6794 (setq list (funcall prepare-display-function list))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6795 (if (and (string= part dpart) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6796 (or (not (string= part "")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6797 idlwave-complete-empty-string-as-lower-case) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6798 (not idlwave-completion-force-default-case)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6799 (setq list (mapcar (lambda (x) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6800 (if (listp x) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6801 (setcar x (downcase (car x))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6802 (setq x (downcase x))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6803 x) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6804 list))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6805 (idlwave-display-completion-list list prompt beg complete)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6806 t)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6807 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6808 (defun idlwave-complete-class () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6809 "Complete a class at point." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6810 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6811 ;; Call `idlwave-routines' to make sure the class list will be available |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6812 (idlwave-routines) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6813 ;; Check for the special case of completing empty string after pro/function |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6814 (if (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:
27606
diff
changeset
|
6815 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6816 (and |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6817 (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\=" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6818 (- (point) 15) t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6819 (goto-char (point-min)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6820 (re-search-forward |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6821 "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6822 ;; Yank the full class specification |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
6823 (insert (match-string 2)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6824 ;; Do the completion, using list gathered from `idlwave-routines' |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6825 (idlwave-complete-in-buffer |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6826 'class 'class (idlwave-class-alist) nil |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6827 "Select a class" "class" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6828 '(lambda (list) ;; Push it to help-links if system help available |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6829 (mapcar (lambda (x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6830 (let* ((entry (idlwave-class-info x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6831 (link (nth 1 (assq 'link entry)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6832 (if link (push (cons x link) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6833 idlwave-completion-help-links)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6834 x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6835 list))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6836 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6837 (defun idlwave-attach-classes (list type show-classes) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6838 ;; Attach the proper class list to a LIST of completion items. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6839 ;; TYPE, when 'kwd, shows classes for method keywords, when |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6840 ;; 'class-tag, for class tags, and otherwise for methods. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6841 ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6842 (if (or (null show-classes) ; don't want to see classes |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6843 (null class-selector) ; not a method call |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6844 (and |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6845 (stringp class-selector) ; the class is already known |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6846 (not super-classes))) ; no possibilities for inheritance |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6847 ;; In these cases, we do not have to do anything |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6848 list |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6849 (let* ((do-prop (and (>= show-classes 0) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6850 (>= emacs-major-version 21))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6851 (do-buf (not (= show-classes 0))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6852 ;; (do-dots (featurep 'xemacs)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6853 (do-dots t) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6854 (inherit (if (and (not (eq type 'class-tag)) super-classes) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
6855 (cons class-selector super-classes))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6856 (max (abs show-classes)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6857 (lmax (if do-dots (apply 'max (mapcar 'length list)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6858 classes nclasses class-info space) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6859 (mapcar |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6860 (lambda (x) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6861 ;; get the classes |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6862 (if (eq type 'class-tag) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6863 ;; Just one class for tags |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6864 (setq classes |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6865 (list |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6866 (idlwave-class-or-superclass-with-tag class-selector x))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6867 ;; Multiple classes for method or method-keyword |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6868 (setq classes |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6869 (if (eq type 'kwd) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6870 (idlwave-all-method-keyword-classes |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6871 method-selector x type-selector) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6872 (idlwave-all-method-classes x type-selector))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6873 (if inherit |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6874 (setq classes |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6875 (delq nil |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6876 (mapcar (lambda (x) (if (memq x inherit) x nil)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6877 classes))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6878 (setq nclasses (length classes)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6879 ;; Make the separator between item and class-info |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6880 (if do-dots |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6881 (setq space (concat " " (make-string (- lmax (length x)) ?.))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6882 (setq space " ")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6883 (if do-buf |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6884 ;; We do want info in the buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6885 (if (<= nclasses max) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6886 (setq class-info (concat |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6887 space |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6888 "<" (mapconcat 'identity classes ",") ">")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6889 (setq class-info (format "%s<%d classes>" space nclasses))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6890 (setq class-info nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6891 (when do-prop |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6892 ;; We do want properties |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6893 (setq x (copy-sequence x)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6894 (put-text-property 0 (length x) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6895 'help-echo (mapconcat 'identity classes " ") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
6896 x)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6897 (if class-info |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6898 (list x class-info) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6899 x)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6900 list)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6901 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6902 (defun idlwave-attach-method-classes (list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6903 ;; Call idlwave-attach-classes with method parameters |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6904 (idlwave-attach-classes list 'method idlwave-completion-show-classes)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6905 (defun idlwave-attach-keyword-classes (list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6906 ;; Call idlwave-attach-classes with keyword parameters |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6907 (idlwave-attach-classes list 'kwd idlwave-completion-show-classes)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6908 (defun idlwave-attach-class-tag-classes (list) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6909 ;; Call idlwave-attach-classes with class structure tags |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
6910 (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6911 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6912 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6913 ;;---------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6914 ;;---------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6915 ;;---------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6916 ;;---------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
6917 ;;---------------------------------------------------------------------- |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6918 (defvar rtn) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6919 (defun idlwave-pset (item) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6920 (set 'rtn item)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6921 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6922 (defun idlwave-popup-select (ev list title &optional sort) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6923 "Select an item in LIST with a popup menu. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6924 TITLE is the title to put atop the popup. If SORT is non-nil, |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6925 sort the list before displaying" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6926 (let ((maxpopup idlwave-max-popup-menu-items) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6927 rtn menu resp) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6928 (cond ((null list)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6929 ((= 1 (length list)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6930 (setq rtn (car list))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6931 ((featurep 'xemacs) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6932 (if sort (setq list (sort list (lambda (a b) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6933 (string< (upcase a) (upcase b)))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6934 (setq menu |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6935 (append (list title) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6936 (mapcar (lambda (x) (vector x (list 'idlwave-pset |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6937 x))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6938 list))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6939 (setq menu (idlwave-split-menu-xemacs menu maxpopup)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6940 (setq resp (get-popup-menu-response menu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6941 (funcall (event-function resp) (event-object resp))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6942 (t |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
6943 (if sort (setq list (sort list (lambda (a b) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6944 (string< (upcase a) (upcase b)))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6945 (setq menu (cons title |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6946 (list |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6947 (append (list "") |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6948 (mapcar (lambda(x) (cons x x)) list))))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6949 (setq menu (idlwave-split-menu-emacs menu maxpopup)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6950 (setq rtn (x-popup-menu ev menu)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6951 rtn)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6952 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6953 (defun idlwave-split-menu-xemacs (menu N) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6954 "Split the MENU into submenus of maximum length N." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6955 (if (<= (length menu) (1+ N)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6956 ;; No splitting needed |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6957 menu |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6958 (let* ((title (car menu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6959 (entries (cdr menu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6960 (menu (list title)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6961 (cnt 0) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6962 (nextmenu nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6963 (while entries |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6964 (while (and entries (< cnt N)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6965 (setq cnt (1+ cnt) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6966 nextmenu (cons (car entries) nextmenu) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6967 entries (cdr entries))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6968 (setq nextmenu (nreverse nextmenu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6969 (setq nextmenu (cons (format "%s...%s" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6970 (aref (car nextmenu) 0) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6971 (aref (nth (1- cnt) nextmenu) 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6972 nextmenu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6973 (setq menu (cons nextmenu menu) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6974 nextmenu nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6975 cnt 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6976 (nreverse menu)))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6977 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6978 (defun idlwave-split-menu-emacs (menu N) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6979 "Split the MENU into submenus of maximum length N." |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6980 (if (<= (length (nth 1 menu)) (1+ N)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6981 ;; No splitting needed |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6982 menu |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6983 (let* ((title (car menu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6984 (entries (cdr (nth 1 menu))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6985 (menu nil) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6986 (cnt 0) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6987 (nextmenu nil)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6988 (while entries |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6989 (while (and entries (< cnt N)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6990 (setq cnt (1+ cnt) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6991 nextmenu (cons (car entries) nextmenu) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6992 entries (cdr entries))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6993 (setq nextmenu (nreverse nextmenu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6994 (prin1 nextmenu) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6995 (setq nextmenu (cons (format "%s...%s" |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6996 (car (car nextmenu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6997 (car (nth (1- cnt) nextmenu))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6998 nextmenu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
6999 (setq menu (cons nextmenu menu) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7000 nextmenu nil |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7001 cnt 0)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7002 (setq menu (nreverse menu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7003 (setq menu (cons title menu)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7004 menu))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7005 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7006 (defvar idlwave-completion-setup-hook nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7007 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7008 (defun idlwave-scroll-completions (&optional message) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7009 "Scroll the completion window on this frame." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7010 (let ((cwin (get-buffer-window "*Completions*" 'visible)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7011 (win (selected-window))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7012 (unwind-protect |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7013 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7014 (select-window cwin) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7015 (condition-case nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7016 (scroll-up) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7017 (error (if (and (listp last-command) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7018 (nth 2 last-command)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7019 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7020 (select-window win) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7021 (eval idlwave-complete-after-success-form)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7022 (set-window-start cwin (point-min))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7023 (and message (message message))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7024 (select-window win)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7025 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7026 (defun idlwave-display-completion-list (list &optional message beg complete) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7027 "Display the completions in LIST in the completions buffer and echo MESSAGE." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7028 (unless (and (get-buffer-window "*Completions*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7029 (idlwave-local-value 'idlwave-completion-p "*Completions*")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7030 (move-marker idlwave-completion-mark beg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7031 (setq idlwave-before-completion-wconf (current-window-configuration))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7032 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7033 (if (featurep 'xemacs) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7034 (idlwave-display-completion-list-xemacs |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7035 list) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7036 (idlwave-display-completion-list-emacs list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7037 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7038 ;; Store a special value in `this-command'. When `idlwave-complete' |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7039 ;; finds this in `last-command', it will scroll the *Completions* buffer. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7040 (setq this-command (list 'idlwave-display-completion-list message complete)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7041 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7042 ;; Mark the completions buffer as created by cib |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7043 (idlwave-set-local 'idlwave-completion-p t "*Completions*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7044 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7045 ;; Fontify the classes |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7046 (if (and idlwave-completion-fontify-classes |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7047 (consp (car list))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7048 (idlwave-completion-fontify-classes)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7049 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7050 ;; Run the hook |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7051 (run-hooks 'idlwave-completion-setup-hook) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7052 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7053 ;; Display the message |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7054 (message (or message "Making completion list...done"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7055 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7056 (defun idlwave-choose (function &rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7057 "Call FUNCTION as a completion chooser and pass ARGS to it." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7058 (let ((completion-ignore-case t)) ; install correct value |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7059 (apply function args)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7060 (if (and (eq major-mode 'idlwave-shell-mode) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7061 (boundp 'font-lock-mode) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7062 (not font-lock-mode)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7063 ;; For the shell, remove the fontification of the word before point |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7064 (let ((beg (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7065 (skip-chars-backward "a-zA-Z0-9_") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7066 (point)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7067 (remove-text-properties beg (point) '(face nil)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7068 (eval idlwave-complete-after-success-form-force)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7069 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7070 (defun idlwave-keyboard-quit () |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7071 (interactive) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7072 (unwind-protect |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7073 (if (eq (car-safe last-command) 'idlwave-display-completion-list) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7074 (idlwave-restore-wconf-after-completion)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7075 (keyboard-quit))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7076 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7077 (defun idlwave-restore-wconf-after-completion () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7078 "Restore the old (before completion) window configuration." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7079 (and idlwave-completion-restore-window-configuration |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7080 idlwave-before-completion-wconf |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7081 (set-window-configuration idlwave-before-completion-wconf))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7082 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7083 (defun idlwave-one-key-select (sym prompt delay) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7084 "Make the user select an element from the alist in the variable SYM. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7085 The keys of the alist are expected to be strings. The function returns the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7086 car of the selected association. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7087 To do this, PROMPT is displayed and and the user must hit a letter key to |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7088 select an entry. If the user does not reply within DELAY seconds, a help |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7089 window with the options is displayed automatically. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7090 The key which is associated with each option is generated automatically. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7091 First, the strings are checked for preselected keys, like in \"[P]rint\". |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7092 If these don't exist, a letter in the string is automatically selected." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7093 (let* ((alist (symbol-value sym)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7094 (temp-buffer-show-hook (if (fboundp 'fit-window-to-buffer) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7095 '(fit-window-to-buffer))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7096 keys-alist char) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7097 ;; First check the cache |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7098 (if (and (eq (symbol-value sym) (get sym :one-key-alist-last))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7099 (setq keys-alist (get sym :one-key-alist-cache)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7100 ;; Need to make new list |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7101 (setq keys-alist (idlwave-make-one-key-alist alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7102 (put sym :one-key-alist-cache keys-alist) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7103 (put sym :one-key-alist-last alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7104 ;; Display prompt and wait for quick reply |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7105 (message "%s[%s]" prompt |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7106 (mapconcat (lambda(x) (char-to-string (car x))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7107 keys-alist "")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7108 (if (sit-for delay) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7109 ;; No quick reply: Show help |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7110 (save-window-excursion |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7111 (with-output-to-temp-buffer "*Completions*" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7112 (mapcar (lambda(x) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7113 (princ (nth 1 x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7114 (princ "\n")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7115 keys-alist)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7116 (setq char (read-char))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7117 (setq char (read-char))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7118 (message nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7119 ;; Return the selected result |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7120 (nth 2 (assoc char keys-alist)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7121 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7122 ;; Used for, e.g., electric debug super-examine. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7123 (defun idlwave-make-one-key-alist (alist) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7124 "Make an alist for single key selection." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7125 (let ((l alist) keys-alist name start char help |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7126 (cnt 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7127 (case-fold-search nil)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7128 (while l |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7129 (setq name (car (car l)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7130 l (cdr l)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7131 (catch 'exit |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7132 ;; First check if the configuration predetermined a key |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7133 (if (string-match "\\[\\(.\\)\\]" name) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7134 (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7135 (setq char (string-to-char (downcase (match-string 1 name))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7136 help (format "%c: %s" char name) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7137 keys-alist (cons (list char help name) keys-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7138 (throw 'exit t))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7139 ;; Then check for capital letters |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7140 (setq start 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7141 (while (string-match "[A-Z]" name start) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7142 (setq start (match-end 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7143 char (string-to-char (downcase (match-string 0 name)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7144 (if (not (assoc char keys-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7145 (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7146 (setq help (format "%c: %s" char |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7147 (replace-match |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7148 (concat "[" (match-string 0 name) "]") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7149 t t name)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7150 keys-alist (cons (list char help name) keys-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7151 (throw 'exit t)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7152 ;; Now check for lowercase letters |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7153 (setq start 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7154 (while (string-match "[a-z]" name start) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7155 (setq start (match-end 0) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7156 char (string-to-char (match-string 0 name))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7157 (if (not (assoc char keys-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7158 (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7159 (setq help (format "%c: %s" char |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7160 (replace-match |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7161 (concat "[" (match-string 0 name) "]") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7162 t t name)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7163 keys-alist (cons (list char help name) keys-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7164 (throw 'exit t)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7165 ;; Bummer, nothing found! Use a stupid number |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7166 (setq char (string-to-char (int-to-string (setq cnt (1+ cnt)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7167 help (format "%c: %s" char name) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7168 keys-alist (cons (list char help name) keys-alist)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7169 (nreverse keys-alist))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7170 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7171 (defun idlwave-set-local (var value &optional buffer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7172 "Set the buffer-local value of VAR in BUFFER to VALUE." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7173 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7174 (set-buffer (or buffer (current-buffer))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7175 (set (make-local-variable var) value))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7176 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7177 (defun idlwave-local-value (var &optional buffer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7178 "Return the value of VAR in BUFFER, but only if VAR is local to BUFFER." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7179 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7180 (set-buffer (or buffer (current-buffer))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7181 (and (local-variable-p var (current-buffer)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7182 (symbol-value var)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7183 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7184 ;; In XEmacs, we can use :activate-callback directly to advice the |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7185 ;; choose functions. We use the private keymap only for the online |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7186 ;; help feature. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7187 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7188 (defvar idlwave-completion-map nil |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7189 "Keymap for completion-list-mode with idlwave-complete.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7190 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7191 (defun idlwave-display-completion-list-xemacs (list &rest cl-args) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7192 (with-output-to-temp-buffer "*Completions*" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7193 (apply 'display-completion-list list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7194 ':activate-callback 'idlwave-default-choose-completion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7195 cl-args)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7196 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7197 (set-buffer "*Completions*") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7198 (use-local-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7199 (or idlwave-completion-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7200 (setq idlwave-completion-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7201 (idlwave-make-modified-completion-map-xemacs |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7202 (current-local-map))))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7203 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7204 (defun idlwave-default-choose-completion (&rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7205 "Execute `default-choose-completion' and then restore the win-conf." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7206 (apply 'idlwave-choose 'default-choose-completion args)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7207 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7208 (defun idlwave-make-modified-completion-map-xemacs (old-map) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7209 "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7210 (let ((new-map (copy-keymap old-map))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7211 (define-key new-map [button3up] 'idlwave-mouse-completion-help) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7212 (define-key new-map [button3] (lambda () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7213 (interactive) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7214 (setq this-command last-command))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7215 new-map)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7216 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7217 ;; In Emacs we also replace keybindings in the completion |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7218 ;; map in order to install our wrappers. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7219 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7220 (defun idlwave-display-completion-list-emacs (list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7221 "Display completion list and install the choose wrappers." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7222 (with-output-to-temp-buffer "*Completions*" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7223 (display-completion-list list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7224 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7225 (set-buffer "*Completions*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7226 (use-local-map |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7227 (or idlwave-completion-map |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7228 (setq idlwave-completion-map |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7229 (idlwave-make-modified-completion-map-emacs |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7230 (current-local-map))))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7231 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7232 (defun idlwave-make-modified-completion-map-emacs (old-map) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7233 "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7234 (let ((new-map (copy-keymap old-map))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7235 (substitute-key-definition |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7236 'choose-completion 'idlwave-choose-completion new-map) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7237 (substitute-key-definition |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7238 'mouse-choose-completion 'idlwave-mouse-choose-completion new-map) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7239 (define-key new-map [mouse-3] 'idlwave-mouse-completion-help) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7240 new-map)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7241 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7242 (defun idlwave-choose-completion (&rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7243 "Choose the completion that point is in or next to." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7244 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7245 (apply 'idlwave-choose 'choose-completion args)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7246 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7247 (defun idlwave-mouse-choose-completion (&rest args) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7248 "Click on an alternative in the `*Completions*' buffer to choose it." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7249 (interactive "e") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7250 (apply 'idlwave-choose 'mouse-choose-completion args)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7251 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7252 ;;---------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7253 ;;---------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7254 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7255 ;;; ------------------------------------------------------------------------ |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7256 ;;; Stucture parsing code, and code to manage class info |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7257 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7258 ;; |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7259 ;; - Go again over the documentation how to write a completion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7260 ;; plugin. It is in self.el, but currently still very bad. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7261 ;; This could be in a separate file in the distribution, or |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7262 ;; in an appendix for the manual. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7263 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7264 (defvar idlwave-struct-skip |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7265 "[ \t]*\\(\\$.*\n\\(^[ \t]*\\(\\$[ \t]*\\)?\\(;.*\\)?\n\\)*\\)?[ \t]*" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7266 "Regexp for skipping continued blank or comment-only lines in |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7267 structures") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7268 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7269 (defvar idlwave-struct-tag-regexp |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7270 (concat "[{,]" ;leading comma/brace |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7271 idlwave-struct-skip ; 4 groups |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7272 "\\([a-zA-Z][a-zA-Z0-9_]*\\)" ;the tag itself, group 5 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7273 "[ \t]*:") ; the final colon |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7274 "Regexp for structure tags.") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7275 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7276 (defun idlwave-struct-tags () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7277 "Return a list of all tags in the structure defined at point. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7278 Point is expected just before the opening `{' of the struct definition." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7279 (save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7280 (let* ((borders (idlwave-struct-borders)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7281 (beg (car borders)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7282 (end (cdr borders)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7283 tags) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7284 (goto-char beg) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7285 (save-restriction |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7286 (narrow-to-region beg end) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7287 (while (re-search-forward idlwave-struct-tag-regexp end t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7288 ;; Check if we are still on the top level of the structure. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7289 (if (and (condition-case nil (progn (up-list -1) t) (error nil)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7290 (= (point) beg)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7291 (push (match-string-no-properties 5) tags)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7292 (goto-char (match-end 0)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7293 (nreverse tags)))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7294 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7295 (defun idlwave-find-struct-tag (tag) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7296 "Find a given TAG in the structure defined at point." |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7297 (let* ((borders (idlwave-struct-borders)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7298 (beg (car borders)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7299 (end (cdr borders)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7300 (case-fold-search t)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7301 (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7302 end t))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7303 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7304 (defun idlwave-struct-inherits () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7305 "Return a list of all `inherits' names in the struct at point. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7306 Point is expected just before the opening `{' of the struct definition." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7307 (save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7308 (let* ((borders (idlwave-struct-borders)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7309 (beg (car borders)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7310 (end (cdr borders)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7311 (case-fold-search t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7312 names) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7313 (goto-char beg) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7314 (save-restriction |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7315 (narrow-to-region beg end) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7316 (while (re-search-forward |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7317 (concat "[{,]" ;leading comma/brace |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7318 idlwave-struct-skip ; 4 groups |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7319 "inherits" ; The INHERITS tag |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7320 idlwave-struct-skip ; 4 more |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7321 "\\([a-zA-Z][a-zA-Z0-9_]*\\)") ; The super-group, #9 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7322 end t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7323 ;; Check if we are still on the top level of the structure. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7324 (if (and (condition-case nil (progn (up-list -1) t) (error nil)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7325 (= (point) beg)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7326 (push (match-string-no-properties 9) names)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7327 (goto-char (match-end 0)))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7328 (nreverse names)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7329 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7330 (defun idlwave-in-structure () |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7331 "Return t if point is inside an IDL structure definition." |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7332 (let ((beg (point))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7333 (save-excursion |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7334 (if (not (or (idlwave-in-comment) (idlwave-in-quote))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7335 (if (idlwave-find-structure-definition nil nil 'back) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7336 (let ((borders (idlwave-struct-borders))) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7337 (or (= (car borders) (cdr borders)) ;; struct not yet closed... |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7338 (and (> beg (car borders)) (< beg (cdr borders)))))))))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7339 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7340 (defun idlwave-struct-borders () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7341 "Return the borders of the {...} after point as a cons cell." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7342 (let (beg) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7343 (save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7344 (skip-chars-forward "^{") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7345 (setq beg (point)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7346 (condition-case nil (forward-list 1) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7347 (error (goto-char beg))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7348 (cons beg (point))))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7349 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7350 (defun idlwave-find-structure-definition (&optional var name bound) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7351 "Search forward for a structure definition. If VAR is non-nil, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7352 search for a structure assigned to variable VAR. If NAME is non-nil, |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7353 search for a named structure NAME, if a string, or a generic named |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7354 structure otherwise. If BOUND is an integer, limit the search. If |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7355 BOUND is the symbol `all', we search first back and then forward |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7356 through the entire file. If BOUND is the symbol `back' we search only |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7357 backward." |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7358 (let* ((ws "[ \t]*\\(\\$.*\n[ \t]*\\)*") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7359 (case-fold-search t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7360 (lim (if (integerp bound) bound nil)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7361 (re (concat |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7362 (if var |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7363 (concat "\\<" (regexp-quote (downcase var)) "\\>" ws) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7364 "\\(\\)") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7365 "=" ws "\\({\\)" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7366 (if name |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7367 (if (stringp name) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7368 (concat ws "\\(\\<" (downcase name) "\\)[^a-zA-Z0-9_$]") |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7369 ;; Just a generic name |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7370 (concat ws "\\<\\([a-zA-Z_0-9$]+\\)" ws ",")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7371 "")))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7372 (if (or (and (or (eq bound 'all) (eq bound 'back)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7373 (re-search-backward re nil t)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7374 (and (not (eq bound 'back)) (re-search-forward re lim t))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7375 (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7376 (goto-char (match-beginning 3)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7377 (match-string-no-properties 5))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7378 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7379 (defvar idlwave-class-info nil) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7380 (defvar idlwave-class-reset nil) ; to reset buffer-local classes |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7381 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7382 (add-hook 'idlwave-update-rinfo-hook |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7383 (lambda () (setq idlwave-class-reset t))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7384 (add-hook 'idlwave-after-load-rinfo-hook |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7385 (lambda () (setq idlwave-class-info nil))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7386 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7387 (defun idlwave-class-info (class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7388 (let (list entry) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7389 (if idlwave-class-info |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7390 (if idlwave-class-reset |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7391 (setq |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7392 idlwave-class-reset nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7393 idlwave-class-info ; Remove any visited in a buffer |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7394 (delq nil (mapcar |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7395 (lambda (x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7396 (let ((filebuf |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7397 (idlwave-class-file-or-buffer |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7398 (or (cdr (assq 'found-in x)) (car x))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7399 (if (cdr filebuf) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7400 nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7401 x))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7402 idlwave-class-info)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7403 ;; Info is nil, put in the system stuff to start. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7404 (setq idlwave-class-info idlwave-system-class-info) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7405 (setq list idlwave-class-info) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7406 (while (setq entry (pop list)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7407 (idlwave-sintern-class-info entry))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7408 (setq class (idlwave-sintern-class class)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7409 (or (assq class idlwave-class-info) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7410 (progn (idlwave-scan-class-info class) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7411 (assq class idlwave-class-info))))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7412 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7413 (defun idlwave-sintern-class-info (entry) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7414 "Sintern the class names in a class-info entry." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7415 (let ((taglist (assq 'tags entry)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7416 (inherits (assq 'inherits entry))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7417 (setcar entry (idlwave-sintern-class (car entry) 'set)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7418 (if inherits |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7419 (setcdr inherits (mapcar (lambda (x) (idlwave-sintern-class x 'set)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7420 (cdr inherits)))))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7421 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7422 (defun idlwave-find-class-definition (class &optional all-hook alt-class) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7423 "Find class structure definition(s) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7424 If ALL-HOOK is set, find all named structure definitions in a given |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7425 class__define routine, on which ALL-HOOK will be run. If ALT-CLASS is |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7426 set, look for the name__define pro, and inside of it, for the ALT-CLASS |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7427 class/struct definition" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7428 (let ((case-fold-search t) end-lim list name) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7429 (when (re-search-forward |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7430 (concat "^[ \t]*pro[ \t]+" (downcase class) "__define" "\\>") nil t) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7431 (if all-hook |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7432 (progn |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7433 ;; For everything there |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7434 (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7435 (while (setq name |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7436 (idlwave-find-structure-definition nil t end-lim)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7437 (funcall all-hook name))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7438 (idlwave-find-structure-definition nil (or alt-class class)))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7439 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7440 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7441 (defun idlwave-class-file-or-buffer (class) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7442 "Find buffer visiting CLASS definition" |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7443 (let* ((pro (concat (downcase class) "__define")) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7444 (file (idlwave-routine-source-file |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7445 (nth 3 (idlwave-rinfo-assoc pro 'pro nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7446 (idlwave-routines)))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7447 (cons file (if file (idlwave-get-buffer-visiting file))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7448 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7449 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7450 (defun idlwave-scan-class-info (class) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7451 "Scan all class and named structure info in the class__define pro" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7452 (let* ((idlwave-auto-routine-info-updates nil) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7453 (filebuf (idlwave-class-file-or-buffer class)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7454 (file (car filebuf)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7455 (buf (cdr filebuf)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7456 (class (idlwave-sintern-class class))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7457 (if (or |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7458 (not file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7459 (and ;; neither a regular file nor a visited buffer |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7460 (not buf) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7461 (not (file-regular-p file)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7462 nil ; Cannot find the file/buffer to get any info |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7463 (save-excursion |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7464 (if buf (set-buffer buf) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7465 ;; Read the file in temporarily |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7466 (set-buffer (get-buffer-create " *IDLWAVE-tmp*")) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7467 (erase-buffer) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7468 (unless (eq major-mode 'idlwave-mode) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7469 (idlwave-mode)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7470 (insert-file-contents file)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7471 (save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7472 (goto-char 1) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7473 (idlwave-find-class-definition class |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7474 ;; Scan all of the structures found there |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7475 (lambda (name) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7476 (let* ((this-class (idlwave-sintern-class name)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7477 (entry |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7478 (list this-class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7479 (cons 'tags (idlwave-struct-tags)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7480 (cons 'inherits (idlwave-struct-inherits))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7481 (if (not (eq this-class class)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7482 (setq entry (nconc entry (list (cons 'found-in class))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7483 (idlwave-sintern-class-info entry) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7484 (push entry idlwave-class-info))))))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7485 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7486 (defun idlwave-class-found-in (class) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7487 "Return the FOUND-IN property of the class." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7488 (cdr (assq 'found-in (idlwave-class-info class)))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7489 (defun idlwave-class-tags (class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7490 "Return the native tags in CLASS." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7491 (cdr (assq 'tags (idlwave-class-info class)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7492 (defun idlwave-class-inherits (class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7493 "Return the direct superclasses of CLASS." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7494 (cdr (assq 'inherits (idlwave-class-info class)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7495 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7496 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7497 (defun idlwave-all-class-tags (class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7498 "Return a list of native and inherited tags in CLASS." |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7499 (condition-case err |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7500 (apply 'append (mapcar 'idlwave-class-tags |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7501 (cons class (idlwave-all-class-inherits class)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7502 (error |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7503 (idlwave-class-tag-reset) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7504 (error "%s" (error-message-string err))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7505 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7506 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7507 (defun idlwave-all-class-inherits (class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7508 "Return a list of all superclasses of CLASS (recursively expanded). |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
7509 The list is cached in `idlwave-class-info' for faster access." |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7510 (cond |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7511 ((not idlwave-support-inheritance) nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7512 ((eq class nil) nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7513 ((eq class t) nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7514 (t |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7515 (let ((info (idlwave-class-info class)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7516 entry) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7517 (if (setq entry (assq 'all-inherits info)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7518 (cdr entry) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7519 ;; Save the depth of inheritance scan to check for circular references |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7520 (let ((inherits (mapcar (lambda (x) (cons x 0)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7521 (idlwave-class-inherits class))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7522 rtn all-inherits cl) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7523 (while inherits |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7524 (setq cl (pop inherits) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7525 rtn (cons (car cl) rtn) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7526 inherits (append (mapcar (lambda (x) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7527 (cons x (1+ (cdr cl)))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7528 (idlwave-class-inherits (car cl))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7529 inherits)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7530 (if (> (cdr cl) 999) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7531 (error |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7532 "Class scan: inheritance depth exceeded. Circular inheritance?") |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7533 )) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7534 (setq all-inherits (nreverse rtn)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7535 (nconc info (list (cons 'all-inherits all-inherits))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7536 all-inherits)))))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7537 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7538 (defun idlwave-entry-keywords (entry &optional record-link) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7539 "Return the flat entry keywords alist from routine-info entry. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7540 If RECORD-LINK is non-nil, the keyword text is copied and a text |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7541 property indicating the link is added." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7542 (let (kwds) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7543 (mapcar |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7544 (lambda (key-list) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7545 (let ((file (car key-list))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7546 (mapcar (lambda (key-cons) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7547 (let ((key (car key-cons)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7548 (link (cdr key-cons))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7549 (when (and record-link file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7550 (setq key (copy-sequence key)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7551 (put-text-property |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7552 0 (length key) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7553 'link |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7554 (concat |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7555 file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7556 (if link |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7557 (concat idlwave-html-link-sep |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7558 (number-to-string link)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7559 key)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7560 (push (list key) kwds))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7561 (cdr key-list)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7562 (nthcdr 5 entry)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7563 (nreverse kwds))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7564 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7565 (defun idlwave-entry-find-keyword (entry keyword) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7566 "Find keyword KEYWORD in entry ENTRY, and return (with link) if set" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7567 (catch 'exit |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7568 (mapc |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7569 (lambda (key-list) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7570 (let ((file (car key-list)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7571 (kwd (assoc keyword (cdr key-list)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7572 (when kwd |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7573 (setq kwd (cons (car kwd) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7574 (if (and file (cdr kwd)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7575 (concat file |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7576 idlwave-html-link-sep |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7577 (number-to-string (cdr kwd))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7578 (cdr kwd)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7579 (throw 'exit kwd)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7580 (nthcdr 5 entry)))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7581 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7582 ;;========================================================================== |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7583 ;; |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7584 ;; Completing class structure tags. This is a completion plugin. |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7585 ;; The necessary taglist is constructed dynamically |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7586 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7587 (defvar idlwave-current-tags-class nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7588 (defvar idlwave-current-class-tags nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7589 (defvar idlwave-current-native-class-tags nil) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7590 (defvar idlwave-sint-class-tags nil) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7591 (idlwave-new-sintern-type 'class-tag) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7592 (add-to-list 'idlwave-complete-special 'idlwave-complete-class-structure-tag) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7593 (add-hook 'idlwave-update-rinfo-hook 'idlwave-class-tag-reset) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7594 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7595 (defun idlwave-complete-class-structure-tag () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7596 "Complete a structure tag on a `self' argument in an object method." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7597 (interactive) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7598 (let ((pos (point)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7599 (case-fold-search t)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7600 (if (save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7601 ;; Check if the context is right |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7602 (skip-chars-backward "a-zA-Z0-9._$") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7603 (and (< (point) (- pos 4)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7604 (looking-at "self\\."))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7605 (let* ((class-selector (nth 2 (idlwave-current-routine))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7606 (super-classes (idlwave-all-class-inherits class-selector))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7607 ;; Check if we are in a class routine |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7608 (unless class-selector |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34708
diff
changeset
|
7609 (error "Not in a method procedure or function")) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7610 ;; Check if we need to update the "current" class |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7611 (if (not (equal class-selector idlwave-current-tags-class)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7612 (idlwave-prepare-class-tag-completion class-selector)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7613 (setq idlwave-completion-help-info |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7614 (list 'idlwave-complete-class-structure-tag-help |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7615 (idlwave-sintern-routine |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7616 (concat class-selector "__define")) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7617 nil)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7618 (let ((idlwave-cpl-bold idlwave-current-native-class-tags)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7619 (idlwave-complete-in-buffer |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7620 'class-tag 'class-tag |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7621 idlwave-current-class-tags nil |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7622 (format "Select a tag of class %s" class-selector) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7623 "class tag" |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7624 'idlwave-attach-class-tag-classes)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7625 t) ; return t to skip other completions |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7626 nil))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7627 |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7628 (defun idlwave-class-tag-reset () |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7629 (setq idlwave-current-tags-class nil)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7630 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7631 (defun idlwave-prepare-class-tag-completion (class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7632 "Find and parse the necessary class definitions for class structure tags." |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7633 (setq idlwave-sint-class-tags nil) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7634 (setq idlwave-current-tags-class class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7635 (setq idlwave-current-class-tags |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7636 (mapcar (lambda (x) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7637 (list (idlwave-sintern-class-tag x 'set))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7638 (idlwave-all-class-tags class))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7639 (setq idlwave-current-native-class-tags |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7640 (mapcar 'downcase (idlwave-class-tags class)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7641 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7642 ;=========================================================================== |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7643 ;; |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7644 ;; Completing system variables and their structure fields |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7645 ;; This is also a plugin. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7646 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7647 (defvar idlwave-sint-sysvars nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7648 (defvar idlwave-sint-sysvartags nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7649 (idlwave-new-sintern-type 'sysvar) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7650 (idlwave-new-sintern-type 'sysvartag) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7651 (add-to-list 'idlwave-complete-special 'idlwave-complete-sysvar-or-tag) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7652 (add-hook 'idlwave-update-rinfo-hook 'idlwave-sysvars-reset) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7653 (add-hook 'idlwave-after-load-rinfo-hook 'idlwave-sintern-sysvar-alist) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7654 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7655 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7656 (defun idlwave-complete-sysvar-or-tag () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7657 "Complete a system variable." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7658 (interactive) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7659 (let ((pos (point)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7660 (case-fold-search t)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7661 (cond ((save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7662 ;; Check if the context is right for system variable |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7663 (skip-chars-backward "[a-zA-Z0-9_$]") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7664 (equal (char-before) ?!)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7665 (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7666 (idlwave-complete-in-buffer 'sysvar 'sysvar |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7667 idlwave-system-variables-alist nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7668 "Select a system variable" |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7669 "system variable") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7670 t) ; return t to skip other completions |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7671 ((save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7672 ;; Check if the context is right for sysvar tag |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7673 (skip-chars-backward "a-zA-Z0-9_$.") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7674 (and (equal (char-before) ?!) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7675 (looking-at "\\([a-zA-Z][a-zA-Z0-9_$]*\\)\\.") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7676 (<= (match-end 0) pos))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7677 ;; Complete a system variable tag |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7678 (let* ((var (idlwave-sintern-sysvar (match-string 1))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7679 (entry (assq var idlwave-system-variables-alist)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7680 (tags (cdr (assq 'tags entry)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7681 (or entry (error "!%s is not a known system variable" var)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7682 (or tags (error "System variable !%s is not a structure" var)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7683 (setq idlwave-completion-help-info |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7684 (list 'idlwave-complete-sysvar-tag-help var)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7685 (idlwave-complete-in-buffer 'sysvartag 'sysvartag |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7686 tags nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7687 "Select a system variable tag" |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7688 "system variable tag") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7689 t)) ; return t to skip other completions |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7690 (t nil)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7691 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7692 (defvar link) ;dynamic variables set by help callback |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7693 (defvar props) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7694 (defun idlwave-complete-sysvar-help (mode word) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7695 (let ((word (or (nth 1 idlwave-completion-help-info) word)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7696 (entry (assoc word idlwave-system-variables-alist))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7697 (cond |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7698 ((eq mode 'test) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7699 (and (stringp word) entry (nth 1 (assq 'link entry)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7700 ((eq mode 'set) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7701 (if entry (setq link (nth 1 (assq 'link entry))))) ;; setting dynamic!!! |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7702 (t (error "This should not happen"))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7703 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7704 (defun idlwave-complete-sysvar-tag-help (mode word) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7705 (let* ((var (nth 1 idlwave-completion-help-info)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7706 (entry (assoc var idlwave-system-variables-alist)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7707 (tags (cdr (assq 'tags entry))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7708 (main (nth 1 (assq 'link entry))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7709 target main-base) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7710 (cond |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7711 ((eq mode 'test) ; we can at least link the main |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7712 (and (stringp word) entry main)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7713 ((eq mode 'set) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7714 (if entry |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7715 (setq link |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7716 (if (setq target (cdr (assoc word tags))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7717 (idlwave-substitute-link-target main target) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7718 main)))) ;; setting dynamic!!! |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7719 (t (error "This should not happen"))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7720 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7721 (defun idlwave-split-link-target (link) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7722 "Split a given link into link file and anchor." |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7723 (if (string-match idlwave-html-link-sep link) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7724 (cons (substring link 0 (match-beginning 0)) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7725 (string-to-number (substring link (match-end 0)))))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7726 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7727 (defun idlwave-substitute-link-target (link target) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7728 "Substitute the target anchor for the given link." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7729 (let (main-base) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7730 (setq main-base (if (string-match "#" link) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7731 (substring link 0 (match-beginning 0)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7732 link)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7733 (if target |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7734 (concat main-base idlwave-html-link-sep (number-to-string target)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7735 link))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7736 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7737 ;; Fake help in the source buffer for class structure tags. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7738 ;; KWD AND NAME ARE GLOBAL-VARIABLES HERE. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7739 (defvar name) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7740 (defvar kwd) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7741 (defvar idlwave-help-do-class-struct-tag nil) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7742 (defun idlwave-complete-class-structure-tag-help (mode word) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7743 (cond |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7744 ((eq mode 'test) ; nothing gets fontified for class tags |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7745 nil) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7746 ((eq mode 'set) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7747 (let (class-with found-in) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7748 (when (setq class-with |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7749 (idlwave-class-or-superclass-with-tag |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7750 idlwave-current-tags-class |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7751 word)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7752 (if (assq (idlwave-sintern-class class-with) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7753 idlwave-system-class-info) |
63427
6cec4d429edd
idlwave-complete-class-structure-tag-help): Follow error conventions.
Juanma Barranquero <lekktu@gmail.com>
parents:
62772
diff
changeset
|
7754 (error "No help available for system class tags")) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7755 (if (setq found-in (idlwave-class-found-in class-with)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7756 (setq name (cons (concat found-in "__define") class-with)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7757 (setq name (concat class-with "__define"))))) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7758 (setq kwd word |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7759 idlwave-help-do-class-struct-tag t)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7760 (t (error "This should not happen")))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7761 |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7762 (defun idlwave-class-or-superclass-with-tag (class tag) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7763 "Find and return the CLASS or one of its superclass with the |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7764 associated TAG, if any." |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7765 (let ((sclasses (cons class (cdr (assq 'all-inherits |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7766 (idlwave-class-info class))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7767 cl) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7768 (catch 'exit |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7769 (while sclasses |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7770 (setq cl (pop sclasses)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7771 (let ((tags (idlwave-class-tags cl))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7772 (while tags |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7773 (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7774 (throw 'exit cl)) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7775 (setq tags (cdr tags)))))))) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7776 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7777 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7778 (defun idlwave-sysvars-reset () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7779 (if (and (fboundp 'idlwave-shell-is-running) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7780 (idlwave-shell-is-running) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7781 idlwave-idlwave_routine_info-compiled) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7782 (idlwave-shell-send-command "idlwave_get_sysvars" |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7783 'idlwave-process-sysvars 'hide))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7784 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7785 (defun idlwave-process-sysvars () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7786 (idlwave-shell-filter-sysvars) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7787 (setq idlwave-sint-sysvars nil |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7788 idlwave-sint-sysvartags nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7789 (idlwave-sintern-sysvar-alist)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7790 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7791 (defun idlwave-sintern-sysvar-alist () |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7792 (let ((list idlwave-system-variables-alist) entry tags) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7793 (while (setq entry (pop list)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7794 (setcar entry (idlwave-sintern-sysvar (car entry) 'set)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7795 (setq tags (assq 'tags entry)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7796 (if tags |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7797 (setcdr tags |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7798 (mapcar (lambda (x) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7799 (cons (idlwave-sintern-sysvartag (car x) 'set) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7800 (cdr x))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7801 (cdr tags))))))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7802 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7803 (defvar idlwave-shell-command-output) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7804 (defun idlwave-shell-filter-sysvars () |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7805 "Get any new system variables and tags." |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7806 (let ((text idlwave-shell-command-output) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7807 (start 0) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7808 (old idlwave-system-variables-alist) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7809 var tags type name class link old-entry) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7810 (setq idlwave-system-variables-alist nil) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7811 (while (string-match "^IDLWAVE-SYSVAR: !\\([a-zA-Z0-9_$]+\\)\\( \\(.*\\)\\)?" |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7812 text start) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7813 (setq start (match-end 0) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7814 var (match-string 1 text) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7815 tags (if (match-end 3) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7816 (idlwave-split-string (match-string 3 text)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7817 ;; Maintain old links, if present |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7818 (setq old-entry (assq (idlwave-sintern-sysvar var) old)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7819 (setq link (assq 'link old-entry)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7820 (setq idlwave-system-variables-alist |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7821 (cons (list var |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7822 (cons |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7823 'tags |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7824 (mapcar (lambda (x) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7825 (cons x |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7826 (cdr (assq |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7827 (idlwave-sintern-sysvartag x) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7828 (cdr (assq 'tags old-entry)))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7829 tags)) link) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7830 idlwave-system-variables-alist))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7831 ;; Keep the old value if query was not successful |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7832 (setq idlwave-system-variables-alist |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7833 (or idlwave-system-variables-alist old)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7834 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7835 (defun idlwave-completion-fontify-classes () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7836 "Goto the *Completions* buffer and fontify the class info." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7837 (when (featurep 'font-lock) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7838 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7839 (set-buffer "*Completions*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7840 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7841 (goto-char (point-min)) |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7842 (let ((buffer-read-only nil)) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7843 (while (re-search-forward "\\.*<[^>]+>" nil t) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7844 (put-text-property (match-beginning 0) (match-end 0) |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7845 'face 'font-lock-string-face))))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7846 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7847 (defun idlwave-uniquify (list) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7848 (let ((ht (make-hash-table :size (length list) :test 'equal))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7849 (delq nil |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7850 (mapcar (lambda (x) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7851 (unless (gethash x ht) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7852 (puthash x t ht) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7853 x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7854 list)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7855 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7856 (defun idlwave-after-successful-completion (type slash &optional verify) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7857 "Add `=' or `(' after successful completion of keyword and function. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7858 Restore the pre-completion window configuration if possible." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7859 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7860 ((eq type 'procedure) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7861 nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7862 ((eq type 'function) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7863 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7864 ((equal idlwave-function-completion-adds-paren nil) nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7865 ((or (equal idlwave-function-completion-adds-paren t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7866 (equal idlwave-function-completion-adds-paren 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7867 (insert "(")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7868 ((equal idlwave-function-completion-adds-paren 2) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7869 (insert "()") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7870 (backward-char 1)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7871 (t nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7872 ((eq type 'keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7873 (if (and idlwave-keyword-completion-adds-equal |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7874 (not slash)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7875 (progn (insert "=") t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7876 nil))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7877 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7878 ;; Restore the pre-completion window configuration if this is safe. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7879 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7880 (if (or (eq verify 'force) ; force |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7881 (and |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7882 (get-buffer-window "*Completions*") ; visible |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7883 (idlwave-local-value 'idlwave-completion-p |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7884 "*Completions*") ; cib-buffer |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7885 (eq (marker-buffer idlwave-completion-mark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7886 (current-buffer)) ; buffer OK |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7887 (equal (marker-position idlwave-completion-mark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7888 verify))) ; pos OK |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7889 (idlwave-restore-wconf-after-completion)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7890 (move-marker idlwave-completion-mark nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7891 (setq idlwave-before-completion-wconf nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7892 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7893 (defun idlwave-mouse-context-help (ev &optional arg) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7894 "Call `idlwave-context-help' on the clicked location." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7895 (interactive "eP") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7896 (mouse-set-point ev) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7897 (idlwave-context-help arg)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7898 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7899 (defvar idlwave-last-context-help-pos nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7900 (defun idlwave-context-help (&optional arg) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7901 "Display IDL Online Help on context. |
47440
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7902 If point is on a keyword, help for that keyword will be shown. If |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7903 point is on a routine name or in the argument list of a routine, help |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7904 for that routine will be displayed. Works for system routines and |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7905 keywords, it pulls up text help. For other routies and keywords, |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7906 visits the source file, finding help in the header (if |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7907 `idlwave-help-source-try-header' is non-nil) or the routine definition |
0e5a022947e9
Updated to IDLWAVE version 4.15. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
47261
diff
changeset
|
7908 itself." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7909 (interactive "P") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7910 (idlwave-do-context-help arg)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7911 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7912 (defun idlwave-mouse-completion-help (ev) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7913 "Display online help about the completion at point." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7914 (interactive "eP") |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7915 ;; Restore last-command for next command, to make |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7916 ;; scrolling/cancelling of completions work. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7917 (setq this-command last-command) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7918 (idlwave-do-mouse-completion-help ev)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7919 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7920 (defun idlwave-routine-info (&optional arg external) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7921 "Display a routines calling sequence and list of keywords. When |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7922 point is on the name a function or procedure, or in the argument list |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7923 of a function or procedure, this command displays a help buffer with |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7924 the information. When called with prefix arg, enforce class query. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7925 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7926 When point is on an object operator `->', display the class stored in |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7927 this arrow, if any (see `idlwave-store-inquired-class'). With a |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7928 prefix arg, the class property is cleared out." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7929 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7930 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7931 (idlwave-routines) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7932 (if (string-match "->" (buffer-substring |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7933 (max (point-min) (1- (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7934 (min (+ 2 (point)) (point-max)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7935 ;; Cursor is on an arrow |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7936 (if (get-text-property (point) 'idlwave-class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7937 ;; arrow has class property |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7938 (if arg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7939 ;; Remove property |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7940 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7941 (backward-char 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7942 (when (looking-at ".?\\(->\\)") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7943 (remove-text-properties (match-beginning 1) (match-end 1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7944 '(idlwave-class nil face nil)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7945 (message "Class property removed from arrow"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7946 ;; Echo class property |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7947 (message "Arrow has text property identifying object to be class %s" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7948 (get-text-property (point) 'idlwave-class))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7949 ;; No property found |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7950 (message "Arrow has no class text property")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7951 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7952 ;; Not on an arrow... |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7953 (let* ((idlwave-query-class nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7954 (idlwave-force-class-query (equal arg '(4))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7955 (module (idlwave-what-module))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
7956 (if (car module) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7957 (apply 'idlwave-display-calling-sequence |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
7958 (idlwave-fix-module-if-obj_new module)) |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34708
diff
changeset
|
7959 (error "Don't know which calling sequence to show"))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7960 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7961 (defun idlwave-resolve (&optional arg) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
7962 "Call RESOLVE_ROUTINE on the module name at point. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7963 Like `idlwave-routine-info', this looks for a routine call at point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7964 After confirmation in the minibuffer, it will use the shell to issue |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7965 a RESOLVE call for this routine, to attempt to make it defined and its |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7966 routine info available for IDLWAVE. If the routine is a method call, |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7967 both `class__method' and `class__define' will be tried. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7968 With ARG, enforce query for the class of object methods." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7969 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7970 (let* ((idlwave-query-class nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7971 (idlwave-force-class-query (equal arg '(4))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7972 (module (idlwave-what-module)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7973 (name (idlwave-make-full-name (nth 2 module) (car module))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7974 (type (if (eq (nth 1 module) 'pro) "pro" "function")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7975 (resolve (read-string "Resolve: " (format "%s %s" type name))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7976 (kwd "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7977 class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7978 (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7979 resolve) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7980 (setq type (match-string 1 resolve) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7981 class (if (match-beginning 2) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7982 (match-string 3 resolve) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7983 nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7984 name (match-string 4 resolve))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7985 (if (string= (downcase type) "function") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7986 (setq kwd ",/is_function")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7987 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7988 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7989 ((null class) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7990 (idlwave-shell-send-command |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7991 (format "resolve_routine,'%s'%s" (downcase name) kwd) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7992 'idlwave-update-routine-info |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7993 nil t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7994 (t |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7995 (idlwave-shell-send-command |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7996 (format "resolve_routine,'%s__define'%s" (downcase class) kwd) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7997 (list 'idlwave-shell-send-command |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
7998 (format "resolve_routine,'%s__%s'%s" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
7999 (downcase class) (downcase name) kwd) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8000 '(idlwave-update-routine-info) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8001 nil t)))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8002 |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8003 (defun idlwave-find-module-this-file () |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8004 (interactive) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8005 (idlwave-find-module '(4))) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8006 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8007 (defun idlwave-find-module (&optional arg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8008 "Find the source code of an IDL module. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8009 Works for modules for which IDLWAVE has routine info available. The |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8010 function offers as default the module name `idlwave-routine-info' |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8011 would use. With ARG limit to this buffer. With two prefix ARG's |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8012 force class query for object methods." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8013 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8014 (let* ((idlwave-query-class nil) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8015 (idlwave-force-class-query (equal arg '(16))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8016 (this-buffer (equal arg '(4))) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8017 (module (idlwave-fix-module-if-obj_new (idlwave-what-module))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8018 (default (if module |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8019 (concat (idlwave-make-full-name |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8020 (nth 2 module) (car module)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8021 (if (eq (nth 1 module) 'pro) "<p>" "<f>")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8022 "none")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8023 (list |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8024 (idlwave-uniquify |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8025 (delq nil |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8026 (mapcar (lambda (x) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8027 (if (eq 'system (car-safe (nth 3 x))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8028 ;; Take out system routines with no source. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8029 nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8030 (list |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8031 (concat (idlwave-make-full-name |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8032 (nth 2 x) (car x)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8033 (if (eq (nth 1 x) 'pro) "<p>" "<f>"))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8034 (if this-buffer |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8035 (idlwave-save-buffer-update) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8036 (idlwave-routines)))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8037 (name (idlwave-completing-read |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8038 (if (or (not this-buffer) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8039 (assoc default list)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8040 (format "Module (Default %s): " default) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8041 (format "Module in this file: ")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8042 list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8043 type class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8044 (if (string-match "\\`\\s-*\\'" name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8045 ;; Nothing, use the default. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8046 (setq name default)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8047 (if (string-match "<[fp]>" name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8048 (setq type (substring name -2 -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8049 name (substring name 0 -3))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8050 (if (string-match "\\(.*\\)::\\(.*\\)" name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8051 (setq class (match-string 1 name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8052 name (match-string 2 name))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8053 (setq name (idlwave-sintern-routine-or-method name class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8054 class (idlwave-sintern-class class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8055 type (cond ((equal type "f") 'fun) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8056 ((equal type "p") 'pro) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8057 (t t))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8058 (idlwave-do-find-module name type class nil this-buffer))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8059 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8060 (defun idlwave-do-find-module (name type class |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8061 &optional force-source this-buffer) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8062 (let ((name1 (idlwave-make-full-name class name)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8063 source buf1 entry |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8064 (buf (current-buffer)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8065 (pos (point)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8066 file name2) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8067 (setq entry (idlwave-best-rinfo-assq name type class (idlwave-routines) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8068 'WITH-FILE) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8069 source (or force-source (nth 3 entry)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8070 name2 (if (nth 2 entry) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8071 (idlwave-make-full-name (nth 2 entry) name) |
47930
43574ede3ab1
(idlwave-region-active-p): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
47479
diff
changeset
|
8072 name1)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8073 (if source |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8074 (setq file (idlwave-routine-source-file source))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8075 (unless file ; Try to find it on the path. |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8076 (setq file |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8077 (idlwave-expand-lib-file-name |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8078 (if class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8079 (format "%s__define.pro" (downcase class)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8080 (format "%s.pro" (downcase name)))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8081 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8082 ((or (null name) (equal name "")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8083 (error "Abort")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8084 ((eq (car source) 'system) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8085 (error "Source code for system routine %s is not available" |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8086 name2)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8087 ((or (not file) (not (file-regular-p file))) |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34708
diff
changeset
|
8088 (error "Source code for routine %s is not available" |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8089 name2)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8090 (t |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8091 (when (not this-buffer) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8092 (setq buf1 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8093 (idlwave-find-file-noselect file 'find)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8094 (pop-to-buffer buf1 t)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8095 (goto-char (point-max)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8096 (let ((case-fold-search t)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8097 (if (re-search-backward |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8098 (concat "^[ \t]*\\<" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8099 (cond ((eq type 'fun) "function") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8100 ((eq type 'pro) "pro") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8101 (t "\\(pro\\|function\\)")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8102 "\\>[ \t]+" |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8103 (regexp-quote (downcase name2)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8104 "[^a-zA-Z0-9_$]") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8105 nil t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8106 (goto-char (match-beginning 0)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8107 (pop-to-buffer buf) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8108 (goto-char pos) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8109 (error "Could not find routine %s" name2))))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8110 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8111 (defun idlwave-what-module () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8112 "Return a default module for stuff near point. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8113 Used by `idlwave-routine-info' and `idlwave-find-module'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8114 (idlwave-routines) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8115 (if (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:
27606
diff
changeset
|
8116 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8117 (idlwave-beginning-of-statement) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8118 (looking-at "[ \t]*\\(pro\\|function\\)[ \t]+\\(\\([a-zA-Z0-9_$]+\\)::\\)?\\([a-zA-Z0-9$_]+\\)\\([, \t\n]\\|$\\)"))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8119 ;; This is a function or procedure definition statement |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8120 ;; We return the defined routine as module. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8121 (list |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8122 (idlwave-sintern-routine-or-method (match-string-no-properties 4) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8123 (match-string-no-properties 2)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8124 (if (equal (downcase (match-string 1)) "pro") 'pro 'fun) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8125 (idlwave-sintern-class (match-string 3))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8126 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8127 ;; Not a definition statement - analyze precise position. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8128 (let* ((where (idlwave-where)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8129 (cw (nth 2 where)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8130 (pro (car (nth 0 where))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8131 (func (car (nth 1 where))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8132 (this-word (idlwave-this-word "a-zA-Z0-9$_")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8133 (next-char (save-excursion (skip-chars-forward "a-zA-Z0-9$_") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8134 (following-char))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8135 ) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8136 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8137 ((and (eq cw 'procedure) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8138 (not (equal this-word ""))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8139 (setq this-word (idlwave-sintern-routine-or-method |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8140 this-word (nth 2 (nth 3 where)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8141 (list this-word 'pro |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8142 (idlwave-determine-class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8143 (cons this-word (cdr (nth 3 where))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8144 'pro))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8145 ((and (eq cw 'function) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8146 (not (equal this-word "")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8147 (or (eq next-char ?\() ; exclude arrays, vars. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8148 (looking-at "[a-zA-Z0-9_]*[ \t]*("))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8149 (setq this-word (idlwave-sintern-routine-or-method |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8150 this-word (nth 2 (nth 3 where)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8151 (list this-word 'fun |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8152 (idlwave-determine-class |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8153 (cons this-word (cdr (nth 3 where))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8154 'fun))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8155 ((and (memq cw '(function-keyword procedure-keyword)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8156 (not (equal this-word "")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8157 (eq next-char ?\()) ; A function! |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8158 (setq this-word (idlwave-sintern-routine this-word)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8159 (list this-word 'fun nil)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8160 (func |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8161 (list func 'fun (idlwave-determine-class (nth 1 where) 'fun))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8162 (pro |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8163 (list pro 'pro (idlwave-determine-class (nth 0 where) 'pro))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8164 (t nil))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8165 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8166 (defun idlwave-what-module-find-class () |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8167 "Call idlwave-what-module and find the inherited class if necessary." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8168 (let* ((module (idlwave-what-module)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8169 (class (nth 2 module)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8170 classes) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8171 (if (and (= (length module) 3) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8172 (stringp class)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8173 (list (car module) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8174 (nth 1 module) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8175 (apply 'idlwave-find-inherited-class module)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8176 module))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8177 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8178 (defun idlwave-find-inherited-class (name type class) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8179 "Find the class which defines TYPE NAME and is CLASS or inherited by CLASS." |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8180 (let ((entry (idlwave-best-rinfo-assoc name type class (idlwave-routines)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8181 (if entry |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8182 (nth 2 entry) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8183 class))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8184 |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8185 (defun idlwave-fix-module-if-obj_new (module) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8186 "Check if MODULE points to obj_new. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8187 If yes, and if the cursor is in the keyword region, change to the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8188 appropriate Init method." |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8189 (let* ((name (car module)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8190 (pos (point)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8191 (case-fold-search t) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8192 string) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8193 (if (and (stringp name) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8194 (equal (downcase name) "obj_new") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8195 (save-excursion |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8196 (idlwave-beginning-of-statement) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8197 (setq string (buffer-substring (point) pos)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8198 (string-match "obj_new([^'\"]*['\"]\\([a-zA-Z0-9_]+\\)" |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8199 string))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8200 (let ((name "Init") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8201 (class (match-string 1 string))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8202 (setq module (list (idlwave-sintern-method "Init") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8203 'fun |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8204 (idlwave-sintern-class class))))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8205 module)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8206 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8207 (defun idlwave-fix-keywords (name type class keywords |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8208 &optional super-classes system) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8209 "Update a list of keywords. |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8210 Translate OBJ_NEW, adding all super-class keywords, or all keywords |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8211 from all classes if class equals t. If SYSTEM is non-nil, don't |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8212 demand _EXTRA in the keyword list." |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8213 (let ((case-fold-search t)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8214 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8215 ;; If this is the OBJ_NEW function, try to figure out the class and use |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8216 ;; the keywords from the corresponding INIT method. |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8217 (if (and (equal (upcase name) "OBJ_NEW") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8218 (or (eq major-mode 'idlwave-mode) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8219 (eq major-mode 'idlwave-shell-mode))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8220 (let* ((bos (save-excursion (idlwave-beginning-of-statement) (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8221 (string (buffer-substring bos (point))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8222 (case-fold-search t) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8223 class) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8224 (and (string-match "obj_new([^'\"]*['\"]\\([a-zA-Z0-9_]+\\)" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8225 string) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8226 (setq class (idlwave-sintern-class (match-string 1 string))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8227 (setq idlwave-current-obj_new-class class) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8228 (setq keywords |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8229 (append keywords |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8230 (idlwave-entry-keywords |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8231 (idlwave-rinfo-assq |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8232 (idlwave-sintern-method "INIT") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8233 'fun |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8234 class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8235 (idlwave-routines)) 'do-link)))))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8236 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8237 ;; If the class is `t', combine all keywords of all methods NAME |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8238 (when (eq class t) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8239 (mapc (lambda (entry) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8240 (and |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8241 (nth 2 entry) ; non-nil class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8242 (eq (nth 1 entry) type) ; correct type |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8243 (setq keywords |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8244 (append keywords |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8245 (idlwave-entry-keywords entry 'do-link))))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8246 (idlwave-all-assq name (idlwave-routines))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8247 (setq keywords (idlwave-uniquify keywords))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8248 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8249 ;; If we have inheritance, add all keywords from superclasses, if |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8250 ;; the user indicated that method in `idlwave-keyword-class-inheritance' |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8251 (when (and |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8252 super-classes |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8253 idlwave-keyword-class-inheritance |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8254 (stringp class) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8255 (or |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8256 system |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8257 (assq (idlwave-sintern-keyword "_extra") keywords) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8258 (assq (idlwave-sintern-keyword "_ref_extra") keywords)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8259 ;; Check if one of the keyword-class regexps matches the name |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8260 (let ((regexps idlwave-keyword-class-inheritance) re) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8261 (catch 'exit |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8262 (while (setq re (pop regexps)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8263 (if (string-match re name) (throw 'exit t)))))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8264 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8265 (loop for entry in (idlwave-routines) do |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8266 (and (nth 2 entry) ; non-nil class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8267 (memq (nth 2 entry) super-classes) ; an inherited class |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8268 (eq (nth 1 entry) type) ; correct type |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8269 (eq (car entry) name) ; correct name |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8270 (mapcar (lambda (k) (add-to-list 'keywords k)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8271 (idlwave-entry-keywords entry 'do-link)))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8272 (setq keywords (idlwave-uniquify keywords))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8273 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8274 ;; Return the final list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8275 keywords)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8276 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8277 (defun idlwave-expand-keyword (keyword module) |
60925
a9c571ede913
* progmodes/cperl-mode.el, progmodes/idlw-shell.el,
Werner LEMBERG <wl@gnu.org>
parents:
60917
diff
changeset
|
8278 "Expand KEYWORD to one of the valid keyword parameters of MODULE. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8279 KEYWORD may be an exact match or an abbreviation of a keyword. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8280 If the match is exact, KEYWORD itself is returned, even if there may be other |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8281 keywords of which KEYWORD is an abbreviation. This is necessary because some |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8282 system routines have keywords which are prefixes of other keywords. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8283 If KEYWORD is an abbreviation of several keywords, a list of all possible |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8284 completions is returned. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8285 If the abbreviation was unique, the correct keyword is returned. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8286 If it cannot be a keyword, the function return nil. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8287 If we do not know about MODULE, just return KEYWORD literally." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8288 (let* ((name (car module)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8289 (type (nth 1 module)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8290 (class (nth 2 module)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8291 (kwd (idlwave-sintern-keyword keyword)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8292 (entry (idlwave-best-rinfo-assoc name type class (idlwave-routines))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8293 (kwd-alist (idlwave-entry-keywords entry)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8294 (extra (or (assq (idlwave-sintern-keyword "_EXTRA") kwd-alist) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8295 (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8296 (completion-ignore-case t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8297 candidates) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8298 (cond ((assq kwd kwd-alist) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8299 kwd) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8300 ((setq candidates (all-completions kwd kwd-alist)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8301 (if (= (length candidates) 1) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8302 (car candidates) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8303 candidates)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8304 ((and entry extra) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8305 ;; Inheritance may cause this keyword to be correct |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8306 keyword) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8307 (entry |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8308 ;; We do know the function, which does not have the keyword. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8309 nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8310 (t |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8311 ;; We do not know the function, so this just might be a correct |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8312 ;; keyword - return it as it is. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8313 keyword)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8314 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8315 (defvar idlwave-rinfo-mouse-map (make-sparse-keymap)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8316 (defvar idlwave-rinfo-map (make-sparse-keymap)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8317 (define-key idlwave-rinfo-mouse-map |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8318 (if (featurep 'xemacs) [button2] [mouse-2]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8319 'idlwave-mouse-active-rinfo) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8320 (define-key idlwave-rinfo-mouse-map |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8321 (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:
27606
diff
changeset
|
8322 'idlwave-mouse-active-rinfo-shift) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8323 (define-key idlwave-rinfo-mouse-map |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8324 (if (featurep 'xemacs) [button3] [mouse-3]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8325 'idlwave-mouse-active-rinfo-right) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8326 (define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8327 (define-key idlwave-rinfo-map "q" 'idlwave-quit-help) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8328 (define-key idlwave-rinfo-mouse-map "q" 'idlwave-quit-help) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8329 (defvar idlwave-popup-source nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8330 (defvar idlwave-rinfo-marker (make-marker)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8331 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8332 (defun idlwave-quit-help () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8333 (interactive) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8334 (let ((ri-window (get-buffer-window "*Help*")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8335 (olh-window (get-buffer-window "*IDLWAVE Help*"))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8336 (when (and olh-window |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8337 (fboundp 'idlwave-help-quit)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8338 (select-window olh-window) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8339 (idlwave-help-quit)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8340 (when (window-live-p ri-window) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8341 (delete-window ri-window)))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8342 |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8343 (defun idlwave-display-calling-sequence (name type class |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8344 &optional initial-class) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8345 ;; Display the calling sequence of module NAME, type TYPE in class CLASS. |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8346 (let* ((initial-class (or initial-class class)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8347 (entry (or (idlwave-best-rinfo-assq name type class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8348 (idlwave-routines)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8349 (idlwave-rinfo-assq name type class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8350 idlwave-unresolved-routines))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8351 (name (or (car entry) name)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8352 (class (or (nth 2 entry) class)) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8353 (superclasses (idlwave-all-class-inherits initial-class)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8354 (twins (idlwave-routine-twins entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8355 (dtwins (idlwave-study-twins twins)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8356 (all dtwins) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8357 (system (eq (car (nth 3 entry)) 'system)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8358 (calling-seq (nth 4 entry)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8359 (keywords (idlwave-entry-keywords entry 'do-link)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8360 (html-file (car (nth 5 entry))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8361 (help-echo-kwd |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8362 "Button2: Insert KEYWORD (SHIFT=`/KEYWORD') | Button3: Online Help ") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8363 (help-echo-use |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8364 "Button2/3: Online Help") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8365 (help-echo-src |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8366 "Button2: Jump to source and back | Button3: Source in Help window.") |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8367 (help-echo-class |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8368 "Button2: Display info about same method in superclass") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8369 (col 0) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8370 (data (list name type class (current-buffer) nil initial-class)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8371 (km-prop (if (featurep 'xemacs) 'keymap 'local-map)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8372 (face 'idlwave-help-link) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8373 beg props win cnt total) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8374 ;; Fix keywords, but don't add chained super-classes, since these |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8375 ;; are shown separately for that super-class |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8376 (setq keywords (idlwave-fix-keywords name type class keywords)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8377 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8378 ((null entry) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8379 (error "No %s %s known %s" type name |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8380 (if initial-class (concat "in class " initial-class) ""))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8381 ((or (null name) (equal name "")) |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34708
diff
changeset
|
8382 (error "No function or procedure call at point")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8383 ((null calling-seq) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8384 (error "Calling sequence of %s %s not available" type name)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8385 (t |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8386 (save-excursion |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8387 (move-marker idlwave-rinfo-marker (point)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8388 (set-buffer (get-buffer-create "*Help*")) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8389 (use-local-map idlwave-rinfo-map) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8390 (setq buffer-read-only nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8391 (erase-buffer) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8392 (set (make-local-variable 'idlwave-popup-source) nil) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8393 (set (make-local-variable 'idlwave-current-obj_new-class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8394 idlwave-current-obj_new-class) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8395 (when superclasses |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8396 (setq props (list 'mouse-face 'highlight |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8397 km-prop idlwave-rinfo-mouse-map |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8398 'help-echo help-echo-class |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8399 'data (cons 'class data))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8400 (let ((classes (cons initial-class superclasses)) c) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8401 (insert "Classes: ") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8402 (while (setq c (pop classes)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8403 (insert " ") |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8404 (setq beg (point)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8405 (insert c) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8406 (if (equal (downcase c) (downcase class)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8407 (add-text-properties beg (point) (list 'face 'bold)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8408 ;; If Method exists in a different class link it |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8409 (if (idlwave-rinfo-assq name type c (idlwave-routines)) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8410 (add-text-properties beg (point) props)))) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8411 (insert "\n"))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8412 (setq props (list 'mouse-face 'highlight |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8413 km-prop idlwave-rinfo-mouse-map |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8414 'help-echo help-echo-use |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8415 'data (cons 'usage data))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8416 (if html-file (setq props (append (list 'face face 'link html-file) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8417 props))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8418 (insert "Usage: ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8419 (setq beg (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8420 (insert (if class |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8421 (format calling-seq class name class name class name) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8422 (format calling-seq name name name name)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8423 "\n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8424 (add-text-properties beg (point) props) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8425 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8426 (insert "Keywords:") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8427 (if (null keywords) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8428 (insert " No keywords accepted.") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8429 (setq col 9) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8430 (mapcar |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8431 (lambda (x) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8432 (if (>= (+ col 1 (length (car x))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8433 (window-width)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8434 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8435 (insert "\n ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8436 (setq col 9))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8437 (insert " ") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8438 (setq beg (point) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8439 ;; Relevant keywords already have link property attached |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8440 props (list 'mouse-face 'highlight |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8441 km-prop idlwave-rinfo-mouse-map |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8442 'data (cons 'keyword data) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8443 'help-echo help-echo-kwd |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8444 'keyword (car x))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8445 (if system (setq props (append (list 'face face) props))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8446 (insert (car x)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8447 (add-text-properties beg (point) props) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8448 (setq col (+ col 1 (length (car x))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8449 keywords)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8450 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8451 (setq cnt 1 total (length all)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8452 ;; Here entry is (key file (list of type-conses)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8453 (while (setq entry (pop all)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8454 (setq props (list 'mouse-face 'highlight |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8455 km-prop idlwave-rinfo-mouse-map |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8456 'help-echo help-echo-src |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8457 'source (list (car (car (nth 2 entry))) ;type |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8458 (nth 1 entry) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8459 nil |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8460 (cdr (car (nth 2 entry)))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8461 'data (cons 'source data))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8462 (idlwave-insert-source-location |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8463 (format "\n%-8s %s" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8464 (if (equal cnt 1) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8465 (if (> total 1) "Sources:" "Source:") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8466 "") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8467 (if (> total 1) "- " "")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8468 entry props) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8469 (incf cnt) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8470 (when (and all (> cnt idlwave-rinfo-max-source-lines)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8471 ;; No more source lines, please |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8472 (insert (format |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8473 "\n Source information truncated to %d entries." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8474 idlwave-rinfo-max-source-lines)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8475 (setq all nil))) |
60766
a4cac40cf780
Remove unnecessary `beginning-of-buffer'.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
60690
diff
changeset
|
8476 (goto-char (point-min)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8477 (setq buffer-read-only t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8478 (display-buffer "*Help*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8479 (if (and (setq win (get-buffer-window "*Help*")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8480 idlwave-resize-routine-help-window) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8481 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8482 (let ((ww (selected-window))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8483 (unwind-protect |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8484 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8485 (select-window win) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8486 (enlarge-window (- (/ (frame-height) 2) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8487 (window-height))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8488 (shrink-window-if-larger-than-buffer)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8489 (select-window ww))))))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8490 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8491 (defun idlwave-insert-source-location (prefix entry &optional file-props) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8492 "Insert a source location into the routine info buffer. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8493 Start line with PREFIX. If a file name is inserted, add FILE-PROPS to |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8494 it." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8495 (let* ((key (car entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8496 (file (nth 1 entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8497 (types (nth 2 entry)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8498 (shell-flag (assq 'compiled types)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8499 (buffer-flag (assq 'buffer types)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8500 (user-flag (assq 'user types)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8501 (lib-flag (assq 'lib types)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8502 (ndupl (or (and buffer-flag (idlwave-count-memq 'buffer types)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8503 (and user-flag (idlwave-count-memq 'user types)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8504 (and lib-flag (idlwave-count-memq 'lib types)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8505 1)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8506 (doflags t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8507 beg special) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8508 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8509 (insert prefix) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8510 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8511 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8512 ((eq key 'system) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8513 (setq doflags nil) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8514 (insert "System ")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8515 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8516 ((eq key 'builtin) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8517 (setq doflags nil) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8518 (insert "Builtin ")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8519 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8520 ((and (not file) shell-flag) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8521 (insert "Unresolved")) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8522 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8523 ((null file) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8524 (insert "ERROR")) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8525 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8526 ((idlwave-syslib-p file) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8527 (if (string-match "obsolete" (file-name-directory file)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8528 (insert "Obsolete ") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8529 (insert "SystemLib "))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8530 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8531 ;; New special syntax: taken directly from routine-info for |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8532 ;; library catalog routines |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8533 ((setq special (or (cdr lib-flag) (cdr user-flag))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8534 (insert (format "%-10s" special))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8535 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8536 ;; Old special syntax: a matching regexp |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8537 ((setq special (idlwave-special-lib-test file)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8538 (insert (format "%-10s" special))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8539 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8540 ;; Catch-all with file |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8541 ((idlwave-lib-p file) (insert "Library ")) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8542 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8543 ;; Sanity catch all |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8544 (t (insert "Other "))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8545 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8546 (when doflags |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8547 (insert (concat |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8548 " [" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8549 (if lib-flag "L" "-") |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8550 (if user-flag "C" "-") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8551 (if shell-flag "S" "-") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8552 (if buffer-flag "B" "-") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8553 "] "))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8554 (when (> ndupl 1) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8555 (setq beg (point)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8556 (insert (format "(%dx) " ndupl)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8557 (add-text-properties beg (point) (list 'face 'bold))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8558 (when (and file (not (equal file ""))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8559 (setq beg (point)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8560 (insert (apply 'abbreviate-file-name |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8561 (if (featurep 'xemacs) (list file t) (list file)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8562 (if file-props |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8563 (add-text-properties beg (point) file-props))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8564 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8565 (defun idlwave-special-lib-test (file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8566 "Check the path of FILE against the regexps which define special libs. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8567 Return the name of the special lib if there is a match." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8568 (let ((alist idlwave-special-lib-alist) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8569 entry rtn) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8570 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8571 ((stringp file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8572 (while (setq entry (pop alist)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8573 (if (string-match (car entry) file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8574 (setq rtn (cdr entry) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8575 alist nil))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8576 rtn) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8577 (t nil)))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8578 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8579 (defun idlwave-mouse-active-rinfo-right (ev) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8580 (interactive "e") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8581 (idlwave-mouse-active-rinfo ev 'right)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8582 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8583 (defun idlwave-mouse-active-rinfo-shift (ev) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8584 (interactive "e") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8585 (idlwave-mouse-active-rinfo ev nil 'shift)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8586 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8587 (defun idlwave-active-rinfo-space () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8588 (interactive) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8589 (idlwave-mouse-active-rinfo nil 'right)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8590 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8591 (defun idlwave-mouse-active-rinfo (ev &optional right shift) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8592 "Does the mouse actions in the routine info buffer. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8593 Optional args RIGHT and SHIFT indicate, if mouse-3 was used, and if SHIFT |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8594 was pressed." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8595 (interactive "e") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8596 (if ev (mouse-set-point ev)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8597 (let (data id name type class buf bufwin source link keyword |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63494
diff
changeset
|
8598 word initial-class) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8599 (setq data (get-text-property (point) 'data) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8600 source (get-text-property (point) 'source) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8601 keyword (get-text-property (point) 'keyword) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8602 link (get-text-property (point) 'link) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8603 id (car data) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8604 name (nth 1 data) type (nth 2 data) class (nth 3 data) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8605 buf (nth 4 data) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8606 initial-class (nth 6 data) |
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8607 word (idlwave-this-word) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8608 bufwin (get-buffer-window buf t)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8609 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8610 (cond ((eq id 'class) ; Switch class being displayed |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8611 (if (window-live-p bufwin) (select-window bufwin)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8612 (idlwave-display-calling-sequence |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8613 (idlwave-sintern-method name) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8614 type (idlwave-sintern-class word) |
34433
31e98a1ac98f
Updated IDLWAVE to version 4.7
Carsten Dominik <dominik@science.uva.nl>
parents:
34342
diff
changeset
|
8615 initial-class)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8616 ((eq id 'usage) ; Online help on this routine |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8617 (idlwave-online-help link name type class)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8618 ((eq id 'source) ; Source in help or buffer |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8619 (if right ; In help |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8620 (let ((idlwave-extra-help-function 'idlwave-help-with-source) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8621 (idlwave-help-source-try-header nil) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8622 ;; Fake idlwave-routines so help will find the right entry |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8623 (idlwave-routines |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8624 (list (list name type class source "")))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8625 (idlwave-help-get-special-help name type class nil)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8626 ;; Otherwise just pop to the source |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8627 (setq idlwave-popup-source (not idlwave-popup-source)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8628 (if idlwave-popup-source |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8629 (condition-case err |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8630 (idlwave-do-find-module name type class source) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8631 (error |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8632 (setq idlwave-popup-source nil) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8633 (if (window-live-p bufwin) (select-window bufwin)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8634 (error (nth 1 err)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8635 (if bufwin |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8636 (select-window bufwin) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8637 (pop-to-buffer buf)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8638 (goto-char (marker-position idlwave-rinfo-marker))))) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8639 ((eq id 'keyword) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
8640 (if right |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8641 (idlwave-online-help link name type class keyword) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8642 (idlwave-rinfo-insert-keyword keyword buf shift)))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8643 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8644 (defun idlwave-rinfo-insert-keyword (keyword buffer &optional shift) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8645 "Insert KEYWORD in BUFFER. Make sure buffer is displayed in a window." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8646 (let ((bwin (get-buffer-window buffer))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8647 (if idlwave-complete-empty-string-as-lower-case |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8648 (setq keyword (downcase keyword))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8649 (if bwin |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8650 (select-window bwin) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8651 (pop-to-buffer buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8652 (setq bwin (get-buffer-window buffer))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8653 (if (eq (preceding-char) ?/) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8654 (insert keyword) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8655 (unless (save-excursion |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8656 (re-search-backward |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8657 "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\=" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8658 (min (- (point) 100) (point-min)) t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8659 (insert ", ")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8660 (if shift (insert "/")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8661 (insert keyword) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8662 (if (and (not shift) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8663 idlwave-keyword-completion-adds-equal) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8664 (insert "="))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8665 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8666 (defun idlwave-list-buffer-load-path-shadows (&optional arg) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8667 "List the load path shadows of all routines defined in current buffer." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8668 (interactive "P") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8669 (idlwave-routines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8670 (if (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:
27606
diff
changeset
|
8671 (idlwave-list-load-path-shadows |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8672 nil (idlwave-update-current-buffer-info 'save-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8673 "in current buffer") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8674 (error "Current buffer is not in idlwave-mode"))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8675 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8676 (defun idlwave-list-shell-load-path-shadows (&optional arg) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8677 "List the load path shadows of all routines compiled under the shell. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8678 This is very useful for checking an IDL application. Just compile the |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8679 application, do RESOLVE_ALL, and `C-c C-i' to compile all referenced |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8680 routines and update IDLWAVE internal info. Then check for shadowing |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8681 with this command." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8682 (interactive "P") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8683 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8684 ((or (not (fboundp 'idlwave-shell-is-running)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8685 (not (idlwave-shell-is-running))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8686 (error "Shell is not running")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8687 ((null idlwave-compiled-routines) |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
34708
diff
changeset
|
8688 (error "No compiled routines. Maybe you need to update with `C-c C-i'")) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8689 (t |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8690 (idlwave-list-load-path-shadows nil idlwave-compiled-routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8691 "in the shell")))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8692 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8693 (defun idlwave-list-all-load-path-shadows (&optional arg) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8694 "List the load path shadows of all routines known to IDLWAVE." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8695 (interactive "P") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8696 (idlwave-list-load-path-shadows nil nil "globally")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8697 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8698 (defun idlwave-list-load-path-shadows (arg &optional special-routines loc) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8699 "List the routines which are defined multiple times. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8700 Search the information IDLWAVE has about IDL routines for multiple |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8701 definitions. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8702 When SPECIAL-ROUTINES in non-nil, only look for shadows of these routines. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8703 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8704 When IDL hits a routine call which is not defined, it will search on |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8705 the load path in order to find a definition. The output of this |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8706 command can be used to detect possible name clashes during this process." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8707 (idlwave-routines) ; Make sure everything is loaded. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8708 (unless (or idlwave-user-catalog-routines idlwave-library-catalog-routines) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8709 (or (y-or-n-p |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8710 "You don't have any user or library catalogs. Continue anyway? ") |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8711 (error "Abort"))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8712 (let* ((routines (append idlwave-system-routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8713 idlwave-compiled-routines |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8714 idlwave-library-catalog-routines |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8715 idlwave-user-catalog-routines |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8716 idlwave-buffer-routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8717 nil)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8718 (km-prop (if (featurep 'xemacs) 'keymap 'local-map)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8719 (keymap (make-sparse-keymap)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8720 (props (list 'mouse-face 'highlight |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8721 km-prop keymap |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8722 'help-echo "Mouse2: Find source")) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8723 (nroutines (length (or special-routines routines))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8724 (step (/ nroutines 100)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8725 (n 0) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8726 (cnt 0) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8727 (idlwave-sort-prefer-buffer-info nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8728 routine twins dtwins twin done props1 lroutines) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8729 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8730 (if special-routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8731 ;; Just looking for shadows of a few special routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8732 (setq lroutines routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8733 routines special-routines)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8734 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8735 (message "Sorting routines...") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8736 (setq routines (sort routines |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8737 (lambda (a b) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8738 (string< (downcase (idlwave-make-full-name |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8739 (nth 2 a) (car a))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8740 (downcase (idlwave-make-full-name |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8741 (nth 2 b) (car b))))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8742 (message "Sorting routines...done") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8743 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8744 (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)]) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8745 (lambda (ev) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8746 (interactive "e") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8747 (mouse-set-point ev) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8748 (apply 'idlwave-do-find-module |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8749 (get-text-property (point) 'find-args)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8750 (define-key keymap [(return)] |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8751 (lambda () |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8752 (interactive) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8753 (apply 'idlwave-do-find-module |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8754 (get-text-property (point) 'find-args)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8755 (message "Compiling list...( 0%%)") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8756 (save-excursion |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8757 (set-buffer (get-buffer-create "*Shadows*")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8758 (setq buffer-read-only nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8759 (erase-buffer) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8760 (while (setq routine (pop routines)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8761 (if (= (mod (setq n (1+ n)) step) 0) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8762 (message "Compiling list...(%2d%%)" (/ (* n 100) nroutines))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8763 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8764 ;; Get a list of all twins |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8765 (setq twins (idlwave-routine-twins routine (or lroutines routines))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8766 (if (memq routine done) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8767 (setq dtwins nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8768 (setq dtwins (idlwave-study-twins twins))) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
8769 ;; Mark all twins as dealt with |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8770 (setq done (append twins done)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8771 (when (or (> (length dtwins) 1) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8772 (> (idlwave-count-memq 'lib (nth 2 (car dtwins))) 1) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8773 (> (idlwave-count-memq 'user (nth 2 (car dtwins))) 1) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8774 (> (idlwave-count-memq 'buffer (nth 2 (car dtwins))) 1)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8775 (incf cnt) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8776 (insert (format "\n%s%s" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8777 (idlwave-make-full-name (nth 2 routine) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8778 (car routine)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8779 (if (eq (nth 1 routine) 'fun) "()" ""))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8780 (while (setq twin (pop dtwins)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8781 (setq props1 (append (list 'find-args |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8782 (list (nth 0 routine) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8783 (nth 1 routine) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8784 (nth 2 routine))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8785 props)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8786 (idlwave-insert-source-location "\n - " twin props1)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8787 (goto-char (point-min)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8788 (setq buffer-read-only t)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8789 (setq loc (or loc "")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8790 (if (> cnt 0) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8791 (progn |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8792 (display-buffer (get-buffer "*Shadows*")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8793 (message "%d case%s of shadowing found %s" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8794 cnt (if (= cnt 1) "" "s") loc)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8795 (message "No shadowing conflicts found %s" loc)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8796 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8797 (defun idlwave-print-source (routine) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8798 (let* ((source (nth 3 routine)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8799 (stype (car source)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8800 (sfile (idlwave-routine-source-file source))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8801 (if (idlwave-syslib-p sfile) (setq stype 'syslib)) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8802 (if (and (eq stype 'compiled) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8803 (or (not (stringp sfile)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8804 (not (string-match "\\S-" sfile)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8805 (setq stype 'unresolved)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8806 (princ (format " %-10s %s\n" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8807 stype |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8808 (if sfile sfile "No source code available"))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8809 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8810 (defun idlwave-routine-twins (entry &optional list) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8811 "Return all twin entries of ENTRY in LIST. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8812 LIST defaults to `idlwave-routines'. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8813 Twin entries are those which have the same name, type, and class. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8814 ENTRY will also be returned, as the first item of this list." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8815 (let* ((name (car entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8816 (type (nth 1 entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8817 (class (nth 2 entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8818 (candidates (idlwave-all-assq name (or list (idlwave-routines)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8819 twins candidate) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8820 (while (setq candidate (pop candidates)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8821 (if (and (not (eq candidate entry)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8822 (eq type (nth 1 candidate)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8823 (eq class (nth 2 candidate))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8824 (push candidate twins))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8825 (if (setq candidate (idlwave-rinfo-assq name type class |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8826 idlwave-unresolved-routines)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8827 (push candidate twins)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8828 (cons entry (nreverse twins)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8829 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8830 (defun idlwave-study-twins (entries) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8831 "Return dangerous twins of first entry in ENTRIES. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8832 Dangerous twins are routines with same name, but in different files on |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8833 the load path. If a file is in the system library and has an entry in |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8834 the `idlwave-system-routines' list, we omit the latter as |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8835 non-dangerous because many IDL routines are implemented as library |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8836 routines, and may have been scanned." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8837 (let* ((entry (car entries)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8838 (name (car entry)) ; |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8839 (type (nth 1 entry)) ; Must be bound for |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8840 (class (nth 2 entry)) ; idlwave-routine-twin-compare |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8841 (cnt 0) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8842 source type type-cons file alist syslibp key) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8843 (while (setq entry (pop entries)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8844 (incf cnt) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8845 (setq source (nth 3 entry) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8846 type (car source) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8847 type-cons (cons type (nth 3 source)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8848 file (idlwave-routine-source-file source)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8849 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8850 ;; Make KEY to index entry properly |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8851 (setq key (cond ((eq type 'system) type) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8852 (file (file-truename file)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8853 (t 'unresolved))) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8854 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8855 ;; Check for an entry in the system library |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8856 (if (and file |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8857 (not syslibp) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8858 (idlwave-syslib-p file)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8859 (setq syslibp t)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8860 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8861 ;; If there's more than one matching entry for the same file, just |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8862 ;; append the type-cons to the type list. |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8863 (if (setq entry (assoc key alist)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8864 (push type-cons (nth 2 entry)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8865 (push (list key file (list type-cons)) alist))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8866 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8867 (setq alist (nreverse alist)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8868 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8869 (when syslibp |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8870 ;; File is in system *library* - remove any 'system entry |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8871 (setq alist (delq (assq 'system alist) alist))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8872 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8873 ;; If 'system remains and we've scanned the syslib, it's a builtin |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8874 ;; (rather than a !DIR/lib/.pro file bundled as source). |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8875 (when (and (idlwave-syslib-scanned-p) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8876 (setq entry (assoc 'system alist))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8877 (setcar entry 'builtin)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8878 (sort alist 'idlwave-routine-twin-compare))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8879 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8880 (defvar type) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8881 (defvar class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8882 (defvar idlwave-sort-prefer-buffer-info t |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8883 "Internal variable used to influence `idlwave-routine-twin-compare'.") |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8884 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8885 (defmacro idlwave-xor (a b) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8886 `(and (or ,a ,b) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8887 (not (and ,a ,b)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8888 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8889 (defun idlwave-routine-entry-compare (a b) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8890 "Compare two routine info entries for sortiung. This is the general case. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8891 It first compates class, names, and type. If it turns out that A and B |
47261
863b1f0c98f8
(idlwave-support-inheritance, idlwave-routine-entry-compare): Fix spacing.
Juanma Barranquero <lekktu@gmail.com>
parents:
47125
diff
changeset
|
8892 are twins (same name, class, and type), calls another routine which |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8893 compares twins on the basis of their file names and path locations." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8894 (let ((name (car a)) (type (nth 1 a)) (class (nth 2 a))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8895 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8896 ((not (equal (idlwave-downcase-safe class) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8897 (idlwave-downcase-safe (nth 2 b)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8898 ;; Class decides |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8899 (cond ((null (nth 2 b)) nil) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8900 ((null class) t) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8901 (t (string< (downcase class) (downcase (nth 2 b)))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8902 ((not (equal (downcase name) (downcase (car b)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8903 ;; Name decides |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8904 (string< (downcase name) (downcase (car b)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8905 ((not (eq type (nth 1 b))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8906 ;; Type decides |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8907 (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8908 (t |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8909 ;; A and B are twins - so the decision is more complicated. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8910 ;; Call twin-compare with the proper arguments. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8911 (idlwave-routine-entry-compare-twins a b))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8912 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8913 (defun idlwave-routine-entry-compare-twins (a b) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8914 "Compare two routine entries, under the assumption that they are |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8915 twins. This basically calls `idlwave-routine-twin-compare' with the |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8916 correct args." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8917 (let* ((name (car a)) (type (nth 1 a)) (class (nth 2 a)) ; needed outside |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8918 (asrc (nth 3 a)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8919 (atype (car asrc)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8920 (bsrc (nth 3 b)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8921 (btype (car bsrc)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8922 (afile (idlwave-routine-source-file asrc)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8923 (bfile (idlwave-routine-source-file bsrc))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8924 (idlwave-routine-twin-compare |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8925 (if (stringp afile) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8926 (list (file-truename afile) afile (list atype)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8927 (list atype afile (list atype))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8928 (if (stringp bfile) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8929 (list (file-truename bfile) bfile (list btype)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8930 (list btype bfile (list btype)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8931 )) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8932 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8933 (defun idlwave-routine-twin-compare (a b) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8934 "Compare two routine twin entries for sorting. |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8935 In here, A and B are not normal routine info entries, but special |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8936 lists (KEY FILENAME (TYPES...)). |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8937 This expects NAME TYPE CLASS to be bound to the right values." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8938 (let* (;; Dis-assemble entries |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8939 (akey (car a)) (bkey (car b)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8940 (afile (nth 1 a)) (bfile (nth 1 b)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8941 (atypes (nth 2 a)) (btypes (nth 2 b)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8942 ;; System routines? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8943 (asysp (memq akey '(builtin system))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8944 (bsysp (memq bkey '(builtin system))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8945 ;; Compiled routines? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8946 (acompp (memq 'compiled atypes)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8947 (bcompp (memq 'compiled btypes)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8948 ;; Unresolved? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8949 (aunresp (or (eq akey 'unresolved) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8950 (and acompp (not afile)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8951 (bunresp (or (eq bkey 'unresolved) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8952 (and bcompp (not bfile)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8953 ;; Buffer info available? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8954 (abufp (memq 'buffer atypes)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8955 (bbufp (memq 'buffer btypes)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8956 ;; On search path? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8957 (tpath-alist (idlwave-true-path-alist)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8958 (apathp (and (stringp akey) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8959 (assoc (file-name-directory akey) tpath-alist))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8960 (bpathp (and (stringp bkey) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8961 (assoc (file-name-directory bkey) tpath-alist))) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8962 ;; How early on search path? High number means early since we |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8963 ;; measure the tail of the path list |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8964 (anpath (length (memq apathp tpath-alist))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8965 (bnpath (length (memq bpathp tpath-alist))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8966 ;; Look at file names |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8967 (aname (if (stringp afile) (downcase (file-name-nondirectory afile)) "")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8968 (bname (if (stringp bfile) (downcase (file-name-nondirectory bfile)) "")) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8969 (fname-re (if class (format "\\`%s__\\(%s\\|define\\)\\.pro\\'" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8970 (regexp-quote (downcase class)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8971 (regexp-quote (downcase name))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8972 (format "\\`%s\\.pro" (regexp-quote (downcase name))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8973 ;; Is file name derived from the routine name? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8974 ;; Method file or class definition file? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8975 (anamep (string-match fname-re aname)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8976 (adefp (and class anamep (string= "define" (match-string 1 aname)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8977 (bnamep (string-match fname-re bname)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8978 (bdefp (and class bnamep (string= "define" (match-string 1 bname))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8979 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8980 ;; Now: follow JD's ideas about sorting. Looks really simple now, |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8981 ;; doesn't it? The difficult stuff is hidden above... |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8982 (cond |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8983 ((idlwave-xor asysp bsysp) asysp) ; System entries first |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8984 ((idlwave-xor aunresp bunresp) bunresp) ; Unresolved last |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8985 ((and idlwave-sort-prefer-buffer-info |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8986 (idlwave-xor abufp bbufp)) abufp) ; Buffers before non-buffers |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8987 ((idlwave-xor acompp bcompp) acompp) ; Compiled entries |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8988 ((idlwave-xor apathp bpathp) apathp) ; Library before non-library |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8989 ((idlwave-xor anamep bnamep) anamep) ; Correct file names first |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8990 ((and class anamep bnamep ; both file names match -> |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8991 (idlwave-xor adefp bdefp)) bdefp) ; __define after __method |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8992 ((> anpath bnpath) t) ; Who is first on path? |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8993 (t nil)))) ; Default |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
8994 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8995 (defun idlwave-routine-source-file (source) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
8996 (if (nth 2 source) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8997 (expand-file-name (nth 1 source) (nth 2 source)) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8998 (nth 1 source))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
8999 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9000 (defun idlwave-downcase-safe (string) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9001 "Donwcase if string, else return unchanged." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9002 (if (stringp string) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9003 (downcase string) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9004 string)) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9005 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9006 (defun idlwave-count-eq (elt list) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9007 "How often is ELT in LIST?" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9008 (length (delq nil (mapcar (lambda (x) (eq x elt)) list)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9009 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9010 (defun idlwave-count-memq (elt alist) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9011 "How often is ELT a key in ALIST?" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9012 (length (delq nil (mapcar (lambda (x) (eq (car x) elt)) alist)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9013 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9014 (defun idlwave-syslib-p (file) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9015 "Non-nil if FILE is in the system library." |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9016 (let* ((true-syslib (file-name-as-directory |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9017 (file-truename |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9018 (expand-file-name "lib" (idlwave-sys-dir))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9019 (true-file (file-truename file))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9020 (string-match (concat "^" (regexp-quote true-syslib)) true-file))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9021 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9022 (defun idlwave-lib-p (file) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9023 "Non-nil if file is in the library" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9024 (let ((true-dir (file-name-directory (file-truename file)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9025 (assoc true-dir (idlwave-true-path-alist)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9026 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9027 (defun idlwave-path-alist-add-flag (list-entry flag) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9028 "Add a flag to the path list entry, if not set." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9029 (let ((flags (cdr list-entry))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9030 (add-to-list 'flags flag) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9031 (setcdr list-entry flags))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9032 |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9033 (defun idlwave-path-alist-remove-flag (list-entry flag) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9034 "Remove a flag to the path list entry, if set." |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9035 (let ((flags (delq flag (cdr list-entry)))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9036 (setcdr list-entry flags))) |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9037 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9038 (defun idlwave-true-path-alist () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9039 "Return `idlwave-path-alist' alist with true-names. |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9040 Info is cached, but relies on the functions setting `idlwave-path-alist' |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9041 to reset the variable `idlwave-true-path-alist' to nil." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9042 (or idlwave-true-path-alist |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9043 (setq idlwave-true-path-alist |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9044 (mapcar (lambda(x) (cons |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9045 (file-name-as-directory |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9046 (file-truename |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9047 (directory-file-name |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9048 (car x)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9049 (cdr x))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9050 idlwave-path-alist)))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9051 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9052 (defun idlwave-syslib-scanned-p () |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9053 "Non-nil if the system lib file !DIR/lib has been scanned." |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9054 (let* ((true-syslib (file-name-as-directory |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9055 (file-truename |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9056 (expand-file-name "lib" (idlwave-sys-dir)))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9057 (cdr (assoc true-syslib (idlwave-true-path-alist))))) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9058 |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9059 ;; ---------------------------------------------------------------------------- |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9060 ;; |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9061 ;; Online Help display |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9062 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9063 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9064 ;; ---------------------------------------------------------------------------- |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9065 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9066 ;; Additions for use with imenu.el and func-menu.el |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9067 ;; (pop-up a list of IDL units in the current file). |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9068 ;; |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9069 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9070 (defun idlwave-prev-index-position () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9071 "Search for the previous procedure or function. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9072 Return nil if not found. For use with imenu.el." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9073 (save-match-data |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9074 (cond |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9075 ((idlwave-find-key "\\<\\(pro\\|function\\)\\>" -1 'nomark)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9076 ;; ((idlwave-find-key idlwave-begin-unit-reg 1 'nomark) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9077 (t nil)))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9078 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9079 (defun idlwave-unit-name () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9080 "Return the unit name. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9081 Assumes that point is at the beginning of the unit as found by |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9082 `idlwave-prev-index-position'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9083 (forward-sexp 2) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9084 (forward-sexp -1) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9085 (let ((begin (point))) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9086 (re-search-forward |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9087 "[a-zA-Z_][a-zA-Z0-9$_]+\\(::[a-zA-Z_][a-zA-Z0-9$_]+\\)?") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9088 (if (fboundp 'buffer-substring-no-properties) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9089 (buffer-substring-no-properties begin (point)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9090 (buffer-substring begin (point))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9091 |
47479 | 9092 (defalias 'idlwave-function-menu |
9093 (condition-case nil | |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9094 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9095 (require 'func-menu) |
47479 | 9096 'function-menu) |
9097 (error (condition-case nil | |
9098 (progn | |
9099 (require 'imenu) | |
9100 'imenu) | |
9101 (error nil))))) | |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9102 |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9103 ;; Here we hack func-menu.el in order to support this new mode. |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9104 ;; The latest versions of func-menu.el already have this stuff in, so |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9105 ;; we hack only if it is not already there. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9106 (when (fboundp 'eval-after-load) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9107 (eval-after-load "func-menu" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9108 '(progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9109 (or (assq 'idlwave-mode fume-function-name-regexp-alist) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9110 (not (boundp 'fume-function-name-regexp-idl)) ; avoid problems |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9111 (setq fume-function-name-regexp-alist |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9112 (cons '(idlwave-mode . fume-function-name-regexp-idl) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9113 fume-function-name-regexp-alist))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9114 (or (assq 'idlwave-mode fume-find-function-name-method-alist) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9115 (not (fboundp 'fume-find-next-idl-function-name)) ; avoid problems |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9116 (setq fume-find-function-name-method-alist |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9117 (cons '(idlwave-mode . fume-find-next-idl-function-name) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9118 fume-find-function-name-method-alist)))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9119 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9120 (defun idlwave-edit-in-idlde () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9121 "Edit the current file in IDL Development environment." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9122 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9123 (start-process "idldeclient" nil |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9124 idlwave-shell-explicit-file-name "-c" "-e" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9125 (buffer-file-name))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9126 |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9127 (defvar idlwave-help-use-assistant) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9128 (defun idlwave-launch-idlhelp () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9129 "Start the IDLhelp application." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9130 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9131 (if idlwave-help-use-assistant |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9132 (idlwave-help-assistant-raise) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9133 (start-process "idlhelp" nil idlwave-help-application))) |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9134 |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9135 ;; Menus - using easymenu.el |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9136 (defvar idlwave-mode-menu-def |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9137 `("IDLWAVE" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9138 ["PRO/FUNC menu" idlwave-function-menu t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9139 ("Motion" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9140 ["Subprogram Start" idlwave-beginning-of-subprogram t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9141 ["Subprogram End" idlwave-end-of-subprogram t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9142 ["Block Start" idlwave-beginning-of-block t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9143 ["Block End" idlwave-end-of-block t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9144 ["Up Block" idlwave-backward-up-block t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9145 ["Down Block" idlwave-down-block t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9146 ["Skip Block Backward" idlwave-backward-block t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9147 ["Skip Block Forward" idlwave-forward-block t]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9148 ("Mark" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9149 ["Subprogram" idlwave-mark-subprogram t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9150 ["Block" idlwave-mark-block t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9151 ["Header" idlwave-mark-doclib t]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9152 ("Format" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9153 ["Indent Entire Statement" idlwave-indent-statement |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9154 :active t :keys "C-u \\[indent-for-tab-command]" ] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9155 ["Indent Subprogram" idlwave-indent-subprogram t] |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9156 ["(Un)Comment Region" idlwave-toggle-comment-region t] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9157 ["Continue/Split line" idlwave-split-line t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9158 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9159 ["Toggle Auto Fill" idlwave-auto-fill-mode :style toggle |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9160 :selected (symbol-value idlwave-fill-function)]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9161 ("Templates" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9162 ["Procedure" idlwave-procedure t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9163 ["Function" idlwave-function t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9164 ["Doc Header" idlwave-doc-header t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9165 ["Log" idlwave-doc-modification t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9166 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9167 ["Case" idlwave-case t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9168 ["For" idlwave-for t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9169 ["Repeat" idlwave-repeat t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9170 ["While" idlwave-while t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9171 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9172 ["Close Block" idlwave-close-block t]) |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9173 ("Completion" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9174 ["Complete" idlwave-complete t] |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9175 ("Complete Specific" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9176 ["1 Procedure Name" (idlwave-complete 'procedure) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9177 ["2 Procedure Keyword" (idlwave-complete 'procedure-keyword) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9178 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9179 ["3 Function Name" (idlwave-complete 'function) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9180 ["4 Function Keyword" (idlwave-complete 'function-keyword) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9181 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9182 ["5 Procedure Method Name" (idlwave-complete 'procedure-method) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9183 ["6 Procedure Method Keyword" (idlwave-complete 'procedure-method-keyword) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9184 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9185 ["7 Function Method Name" (idlwave-complete 'function-method) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9186 ["8 Function Method Keyword" (idlwave-complete 'function-method-keyword) t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9187 "--" |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9188 ["9 Class Name" idlwave-complete-class t])) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9189 ("Routine Info" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9190 ["Show Routine Info" idlwave-routine-info t] |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9191 ["Online Context Help" idlwave-context-help t] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9192 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9193 ["Find Routine Source" idlwave-find-module t] |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9194 ["Resolve Routine" idlwave-resolve (featurep 'idlw-shell)] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9195 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9196 ["Update Routine Info" idlwave-update-routine-info t] |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9197 ["Rescan XML Help Catalog" idlwave-convert-xml-system-routine-info t] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9198 "--" |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9199 "IDL User Catalog" |
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9200 ["Select Catalog Directories" (idlwave-create-user-catalog-file nil) t] |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9201 ["Scan Directories" (idlwave-update-routine-info '(16)) |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9202 (and idlwave-path-alist (not idlwave-catalog-process))] |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9203 ["Scan Directories &" (idlwave-update-routine-info '(64)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9204 (and idlwave-path-alist (not idlwave-catalog-process))] |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9205 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9206 "Routine Shadows" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9207 ["Check Current Buffer" idlwave-list-buffer-load-path-shadows t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9208 ["Check Compiled Routines" idlwave-list-shell-load-path-shadows t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9209 ["Check Everything" idlwave-list-all-load-path-shadows t]) |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9210 ("Misc" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9211 ["Kill auto-created buffers" idlwave-kill-autoloaded-buffers t] |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9212 "--" |
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9213 ["Insert TAB character" idlwave-hard-tab t]) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9214 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9215 ("External" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9216 ["Start IDL shell" idlwave-shell t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9217 ["Edit file in IDLDE" idlwave-edit-in-idlde t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9218 ["Launch IDL Help" idlwave-launch-idlhelp t]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9219 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9220 ("Customize" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9221 ["Browse IDLWAVE Group" idlwave-customize t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9222 "--" |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9223 ["Build Full Customize Menu" idlwave-create-customize-menu |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9224 (fboundp 'customize-menu-create)]) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9225 ("Documentation" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9226 ["Describe Mode" describe-mode t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9227 ["Abbreviation List" idlwave-list-abbrevs t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9228 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9229 ["Commentary in idlwave.el" idlwave-show-commentary t] |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
9230 ["Commentary in idlw-shell.el" idlwave-shell-show-commentary t] |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9231 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9232 ["Info" idlwave-info t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9233 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9234 ["Launch IDL Help" idlwave-launch-idlhelp t]))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9235 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9236 (defvar idlwave-mode-debug-menu-def |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9237 '("Debug" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9238 ["Start IDL shell" idlwave-shell t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9239 ["Save and .RUN buffer" idlwave-shell-save-and-run |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9240 (and (boundp 'idlwave-shell-automatic-start) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9241 idlwave-shell-automatic-start)])) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9242 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9243 (if (or (featurep 'easymenu) (load "easymenu" t)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9244 (progn |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9245 (easy-menu-define idlwave-mode-menu idlwave-mode-map |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9246 "IDL and WAVE CL editing menu" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9247 idlwave-mode-menu-def) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9248 (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map |
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9249 "IDL and WAVE CL editing menu" |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9250 idlwave-mode-debug-menu-def))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9251 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9252 (defun idlwave-customize () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9253 "Call the customize function with idlwave as argument." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9254 (interactive) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9255 ;; Try to load the code for the shell, so that we can customize it |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9256 ;; as well. |
27185
ae5b17b9c403
fixed some bugs associated with the new file names
Carsten Dominik <dominik@science.uva.nl>
parents:
27107
diff
changeset
|
9257 (or (featurep 'idlw-shell) |
ae5b17b9c403
fixed some bugs associated with the new file names
Carsten Dominik <dominik@science.uva.nl>
parents:
27107
diff
changeset
|
9258 (load "idlw-shell" t)) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9259 (customize-browse 'idlwave)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9260 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9261 (defun idlwave-create-customize-menu () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9262 "Create a full customization menu for IDLWAVE, insert it into the menu." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9263 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9264 (if (fboundp 'customize-menu-create) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9265 (progn |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9266 ;; Try to load the code for the shell, so that we can customize it |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9267 ;; as well. |
27185
ae5b17b9c403
fixed some bugs associated with the new file names
Carsten Dominik <dominik@science.uva.nl>
parents:
27107
diff
changeset
|
9268 (or (featurep 'idlw-shell) |
ae5b17b9c403
fixed some bugs associated with the new file names
Carsten Dominik <dominik@science.uva.nl>
parents:
27107
diff
changeset
|
9269 (load "idlw-shell" t)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9270 (easy-menu-change |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9271 '("IDLWAVE") "Customize" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9272 `(["Browse IDLWAVE group" idlwave-customize t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9273 "--" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9274 ,(customize-menu-create 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9275 ["Set" Custom-set t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9276 ["Save" Custom-save t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9277 ["Reset to Current" Custom-reset-current t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9278 ["Reset to Saved" Custom-reset-saved t] |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9279 ["Reset to Standard Settings" Custom-reset-standard t])) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9280 (message "\"IDLWAVE\"-menu now contains full customization menu")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9281 (error "Cannot expand menu (outdated version of cus-edit.el)"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9282 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9283 (defun idlwave-show-commentary () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9284 "Use the finder to view the file documentation from `idlwave.el'." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9285 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9286 (require 'finder) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9287 (finder-commentary "idlwave.el")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9288 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9289 (defun idlwave-shell-show-commentary () |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
9290 "Use the finder to view the file documentation from `idlw-shell.el'." |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9291 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9292 (require 'finder) |
27606
0396e9e8d57b
(idlwave-template): Respect `idlwave-abbrev-change-case'.
Carsten Dominik <dominik@science.uva.nl>
parents:
27185
diff
changeset
|
9293 (finder-commentary "idlw-shell.el")) |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9294 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9295 (defun idlwave-info () |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9296 "Read documentation for IDLWAVE in the info system." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9297 (interactive) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9298 (require 'info) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9299 (Info-goto-node "(idlwave)")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9300 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9301 (defun idlwave-list-abbrevs (arg) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9302 "Show the code abbreviations define in IDLWAVE mode. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9303 This lists all abbrevs where the replacement text differs from the input text. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9304 These are the ones the users want to learn to speed up their writing. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9305 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9306 The function does *not* list abbrevs which replace a word with itself |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9307 to call a hook. These hooks are used to change the case of words or |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9308 to blink the matching `begin', and the user does not need to know them. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9309 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9310 With arg, list all abbrevs with the corresponding hook. |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9311 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9312 This function was written since `list-abbrevs' looks terrible for IDLWAVE mode." |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9313 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9314 (interactive "P") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9315 (let ((table (symbol-value 'idlwave-mode-abbrev-table)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9316 abbrevs |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9317 str rpl func fmt (len-str 0) (len-rpl 0)) |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9318 (mapatoms |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9319 (lambda (sym) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9320 (if (symbol-value sym) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9321 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9322 (setq str (symbol-name sym) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9323 rpl (symbol-value sym) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9324 func (symbol-function sym)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9325 (if arg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9326 (setq func (prin1-to-string func)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9327 (if (and (listp func) (stringp (nth 2 func))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9328 (setq rpl (concat "EVAL: " (nth 2 func)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9329 func "") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9330 (setq func ""))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9331 (if (or arg (not (string= rpl str))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9332 (progn |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9333 (setq len-str (max len-str (length str))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9334 (setq len-rpl (max len-rpl (length rpl))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9335 (setq abbrevs (cons (list str rpl func) abbrevs))))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9336 table) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9337 ;; sort the list |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9338 (setq abbrevs (sort abbrevs (lambda (a b) (string< (car a) (car b))))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9339 ;; Make the format |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9340 (setq fmt (format "%%-%ds %%-%ds %%s\n" len-str len-rpl)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9341 (with-output-to-temp-buffer "*Help*" |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9342 (if arg |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9343 (progn |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9344 (princ "Abbreviations and Actions in IDLWAVE-Mode\n") |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9345 (princ "=========================================\n\n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9346 (princ (format fmt "KEY" "REPLACE" "HOOK")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9347 (princ (format fmt "---" "-------" "----"))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9348 (princ "Code Abbreviations and Templates in IDLWAVE-Mode\n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9349 (princ "================================================\n\n") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9350 (princ (format fmt "KEY" "ACTION" "")) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9351 (princ (format fmt "---" "------" ""))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9352 (mapcar |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9353 (lambda (list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9354 (setq str (car list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9355 rpl (nth 1 list) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9356 func (nth 2 list)) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9357 (princ (format fmt str rpl func))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9358 abbrevs))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9359 ;; Make sure each abbreviation uses only one display line |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9360 (save-excursion |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9361 (set-buffer "*Help*") |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9362 (setq truncate-lines t))) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9363 |
46529
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9364 ;; Add .pro files to speedbar for support, if it's loaded |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9365 (eval-after-load "speedbar" '(speedbar-add-supported-extension ".pro")) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9366 |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9367 ;; Set an idle timer to load the routine info. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9368 ;; Will only work on systems which support this. |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9369 (or idlwave-routines (idlwave-start-load-rinfo-timer)) |
148f4d9a8905
Updated to IDLWAVE version 4.14. See idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
45318
diff
changeset
|
9370 |
69822
84de63539ab8
Update to IDLWAVE version 6.0; see idlwave.org. Includes code to
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
9371 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.[Pp][Rr][Oo]\\'" . idlwave-mode)) |
58293
5b2b2365e698
Updated to IDLWAVE version 5.5. See idlwave.org
J.D. Smith <jdsmith@as.arizona.edu>
parents:
57821
diff
changeset
|
9372 |
29774
8eff9cc9cbae
Files re-installed, because changes are too massive to document them here.
Carsten Dominik <dominik@science.uva.nl>
parents:
27606
diff
changeset
|
9373 ;; Run the hook |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9374 (run-hooks 'idlwave-load-hook) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9375 |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9376 (provide 'idlwave) |
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9377 |
58296 | 9378 ;; arch-tag: f77f3b0c-c37c-424f-a328-0886fd42b6fb |
26956
67b3331ff24c
Major mode for editing files of the Interactive Data Language
Carsten Dominik <dominik@science.uva.nl>
parents:
diff
changeset
|
9379 ;;; idlwave.el ends here |