Mercurial > emacs
annotate lisp/progmodes/idlw-help.el @ 94402:2faa99de7eef
* net/tramp.el (tramp-handle-make-symbolic-link)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-insert-directory, tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-insert-file-contents, tramp-handle-write-region)
* net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property, tramp-flush-file-property)
(tramp-flush-directory-property)
* net/tramp-cpmpat.el (tramp-compat-make-temp-file)
* net/tramp-fish.el (tramp-fish-handle-expand-file-name): Disable
`file-name-handler-alist' when handling localname. It could have
a remote file syntax, like a VMS file name.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Sun, 27 Apr 2008 16:36:28 +0000 |
parents | 107ccd98fa12 |
children | 0e2d838cfad2 |
rev | line source |
---|---|
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1 ;;; idlw-help.el --- HTML Help code for IDLWAVE |
75347 | 2 |
79717 | 3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
75347 | 4 ;; Free Software Foundation, Inc. |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
5 ;; |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
6 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
7 ;; Carsten Dominik <dominik@science.uva.nl> |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
8 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
9 ;; Version: 6.1_em22 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
10 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
11 ;; This file is part of GNU Emacs. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
12 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
13 ;; This file is free software; you can redistribute it and/or modify |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
14 ;; it under the terms of the GNU General Public License as published by |
78234
c1ec1c8a8d2e
Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents:
76395
diff
changeset
|
15 ;; the Free Software Foundation; either version 3, or (at your option) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
16 ;; any later version. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
17 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
18 ;; This file is distributed in the hope that it will be useful, |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
21 ;; GNU General Public License for more details. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
22 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
23 ;; You should have received a copy of the GNU General Public License |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
26 ;; Boston, MA 02110-1301, USA. | |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
27 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
28 ;;; Commentary: |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
29 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
30 ;; The help link information for IDLWAVE's online help feature for |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
31 ;; system routines is extracted automatically from the IDL |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
32 ;; documentation, and is available, along with general routine |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
33 ;; information, in the file idlw-rinfo.el. The HTML help file |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
34 ;; themselves are not distributable with Emacs, but are available, |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
35 ;; along with new versions of IDLWAVE, documentation, and more |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
36 ;; information, at: |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
37 ;; |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
38 ;; http://idlwave.org |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
39 ;; |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
40 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
41 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
42 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
43 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
44 ;;; Code: |
86243
4d615a83cee2
* progmodes/idlw-help.el: Require browse-url unconditionally, it
Dan Nicolaescu <dann@ics.uci.edu>
parents:
85686
diff
changeset
|
45 (defvar idlwave-help-browse-url-available t |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
46 "Whether browse-url is available") |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
47 |
86243
4d615a83cee2
* progmodes/idlw-help.el: Require browse-url unconditionally, it
Dan Nicolaescu <dann@ics.uci.edu>
parents:
85686
diff
changeset
|
48 (require 'browse-url) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
49 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
50 (defgroup idlwave-online-help nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
51 "Online Help options for IDLWAVE mode." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
52 :group 'idlwave) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
53 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
54 (defcustom idlwave-html-help-pre-v6 nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
55 "Whether pre or post-v6.0 IDL help documents are being used." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
56 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
57 :type 'boolean) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
58 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
59 (defvar idlwave-html-link-sep |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
60 (if idlwave-html-help-pre-v6 "#" "#wp")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
61 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
62 (defcustom idlwave-html-system-help-location "help/online_help/" |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
63 "The directory, relative to idlwave-system-directory, where the idl |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
64 HTML help files live, for IDL 6.2 and later. This location, if found, |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
65 is used in preference to the old idlwave-html-help-location." |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
66 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
67 :type 'directory) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
68 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
69 (defcustom idlwave-html-help-location |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
70 (if (memq system-type '(ms-dos windows-nt)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
71 nil |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
72 "/usr/local/etc/") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
73 "The directory where the idl_html_help/ dir lives. Obsolete for IDL |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
74 6.2 or later (see idlwave-html-system-help-location)." |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
75 :group 'idlwave-online-help |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
76 :type 'directory) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
77 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
78 (defvar idlwave-help-use-hh nil |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
79 "Obsolete variable.") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
80 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
81 (defcustom idlwave-help-use-assistant t |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
82 "Whether to use the IDL Assistant as the help browser." |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
83 :group 'idlwave-online-help |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
84 :type 'boolean) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
85 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
86 (defcustom idlwave-help-browser-function browse-url-browser-function |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
87 "Function to use to display html help. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
88 Defaults to `browse-url-browser-function', which see." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
89 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
90 :type 'function) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
91 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
92 (defcustom idlwave-help-browser-generic-program browse-url-generic-program |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
93 "Program to run if using browse-url-generic-program." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
94 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
95 :type 'string) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
96 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
97 (defvar browse-url-generic-args) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
98 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
99 (defcustom idlwave-help-browser-generic-args |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
100 (if (boundp 'browse-url-generic-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
101 browse-url-generic-args "") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
102 "Program args to use if using browse-url-generic-program." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
103 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
104 :type 'string) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
105 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
106 (defcustom idlwave-help-browser-is-local nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
107 "Whether the browser will display locally in an Emacs window. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
108 Several browsers run and/or display inside Emacs windows, but most are |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
109 external programs. If the browser name contains \"-w3\", it is |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
110 assumed to be local to Emacs. For other local browsers, this variable |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
111 must be explicitly set non-nil in order for the variable |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
112 `idlwave-help-use-dedicated-frame' to function." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
113 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
114 :type 'boolean) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
115 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
116 (defvar idlwave-help-directory "" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
117 "Obsolete variable. See idlwave-html-help-location.") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
118 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
119 (defcustom idlwave-help-use-dedicated-frame t |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
120 "*Non-nil means, use a separate frame for Online Help if possible." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
121 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
122 :type 'boolean) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
123 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
124 (defcustom idlwave-help-frame-parameters |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
125 '((height . 32) (unsplittable . t)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
126 "The frame parameters for the special Online Help frame. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
127 See also `idlwave-help-use-dedicated-frame'. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
128 If you do not set the frame width here, the value specified in |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
129 `idlw-help.el' will be used." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
130 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
131 :type '(repeat |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
132 (cons symbol sexp))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
133 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
134 (defcustom idlwave-max-popup-menu-items 20 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
135 "Maximum number of items per pane in popup menus. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
136 Currently only used for class selection during completion help." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
137 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
138 :type 'integer) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
139 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
140 (defcustom idlwave-extra-help-function 'idlwave-help-with-source |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
141 "The function to call for online help if the normal help fails. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
142 Online help works only for system routines which are described in the |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
143 IDL manuals. A function may be specified to access help from other sources. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
144 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
145 The function must accept four arguments: NAME, TYPE, CLASS, KEYWORD. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
146 The Help buffer is current when this function is called, and the help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
147 text should be loaded into this buffer. If help is found, the |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
148 function should return the buffer position which should be used as |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
149 `window-start' in the help window. Also, the variable |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
150 `idlwave-help-mode-line-indicator' should be set to a useful string, |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
151 which will be displayed in the mode line of the help window. If |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
152 should also set the variable `idlwave-help-min-frame-width' to a |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
153 positive integer. IDLWAVE will ensure that the help frame is at least |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
154 that many columns wide. Failure to find help should be indicated by |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
155 throwing an error. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
156 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
157 When this variable is non-nil, IDLWAVE will allow the mouse-3 help click |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
158 for every routine and keyword, even though the item may not be highlighted |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
159 in blue (indicating the availability of system documentation). |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
160 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
161 The default value for this function is `idlwave-help-with-source' which |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
162 loads the routine source file into the help buffer. If you try to write |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
163 a different function which accesses a special help file or so, it is |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
164 probably a good idea to still call this function as a fallback." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
165 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
166 :type 'symbol) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
167 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
168 (defcustom idlwave-help-fontify-source-code nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
169 "*Non-nil means, fontify source code displayed as help like normal code." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
170 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
171 :type 'boolean) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
172 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
173 (defcustom idlwave-help-source-try-header t |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
174 "*Non-nil means, try to find help in routine header when displaying source. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
175 Routines which are not documented in the system manual use their source as |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
176 help text. When this variable is non-nil, we try to find a description of |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
177 the help item in the first routine doclib header above the routine definition. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
178 If the variable is nil, or if we cannot find/parse the header, the routine |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
179 definition is displayed instead." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
180 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
181 :type 'boolean) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
182 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
183 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
184 (defcustom idlwave-help-doclib-name "name" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
185 "*A regexp for the heading word to search for in doclib headers |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
186 which specifies the `name' section. Can be used for localization |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
187 support." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
188 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
189 :type 'string) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
190 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
191 (defcustom idlwave-help-doclib-keyword "KEYWORD" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
192 "*A regexp for the heading word to search for in doclib headers |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
193 which specifies the `keywords' section. Can be used for localization |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
194 support." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
195 :group 'idlwave-online-help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
196 :type 'string) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
197 |
63450
87216f91a211
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents:
62772
diff
changeset
|
198 (defface idlwave-help-link |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
199 '((((class color)) (:foreground "Blue")) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
200 (t (:weight bold))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
201 "Face for highlighting links into IDLWAVE online help." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
202 :group 'idlwave-online-help) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
203 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
204 (defvar idlwave-help-activate-links-aggressively nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
205 "Obsolete variable.") |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
206 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
207 (defvar idlwave-completion-help-info) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
208 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
209 (defvar idlwave-help-frame nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
210 "The frame for display of IDL online help.") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
211 (defvar idlwave-help-frame-width 102 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
212 "The default width of the help frame.") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
213 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
214 (defvar idlwave-html-help-is-available nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
215 "Is the system online help text avaiable?") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
216 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
217 (defvar idlwave-help-mode-line-indicator "" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
218 "Used for the special mode line in the idlwave-help-mode.") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
219 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
220 (defvar idlwave-help-window-configuration nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
221 (defvar idlwave-help-special-topic-words nil) ; defined by get_rinfo |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
222 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
223 ;; Define the key bindings for the Help application |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
224 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
225 (defvar idlwave-help-mode-map (make-sparse-keymap) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
226 "The keymap used in idlwave-help-mode.") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
227 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
228 (define-key idlwave-help-mode-map "q" 'idlwave-help-quit) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
229 (define-key idlwave-help-mode-map "w" 'widen) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
230 (define-key idlwave-help-mode-map "\C-m" (lambda (arg) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
231 (interactive "p") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
232 (scroll-up arg))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
233 (define-key idlwave-help-mode-map " " 'scroll-up) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
234 (define-key idlwave-help-mode-map [delete] 'scroll-down) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
235 (define-key idlwave-help-mode-map "h" 'idlwave-help-find-header) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
236 (define-key idlwave-help-mode-map "H" 'idlwave-help-find-first-header) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
237 (define-key idlwave-help-mode-map "." 'idlwave-help-toggle-header-match-and-def) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
238 (define-key idlwave-help-mode-map "F" 'idlwave-help-fontify) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
239 (define-key idlwave-help-mode-map "\M-?" 'idlwave-help-return-to-calling-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
240 (define-key idlwave-help-mode-map "x" 'idlwave-help-return-to-calling-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
241 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
242 ;; Define the menu for the Help application |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
243 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
244 (easy-menu-define |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
245 idlwave-help-menu idlwave-help-mode-map |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
246 "Menu for Help IDLWAVE system" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
247 '("IDLHelp" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
248 ["Definition <-> Help Text" idlwave-help-toggle-header-match-and-def t] |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
249 ["Find DocLib Header" idlwave-help-find-header t] |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
250 ["Find First DocLib Header" idlwave-help-find-first-header t] |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
251 ["Fontify help buffer" idlwave-help-fontify t] |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
252 "--" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
253 ["Quit" idlwave-help-quit t])) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
254 |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
255 (defvar idlwave-help-def-pos) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
256 (defvar idlwave-help-args) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
257 (defvar idlwave-help-in-header) |
86503
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
258 (declare-function idlwave-prepare-structure-tag-completion "idlw-complete-structtag") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
259 (declare-function idlwave-all-method-classes "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
260 (declare-function idlwave-all-method-keyword-classes "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
261 (declare-function idlwave-beginning-of-statement "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
262 (declare-function idlwave-best-rinfo-assoc "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
263 (declare-function idlwave-class-found-in "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
264 (declare-function idlwave-class-or-superclass-with-tag "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
265 (declare-function idlwave-completing-read "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
266 (declare-function idlwave-current-routine "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
267 (declare-function idlwave-downcase-safe "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
268 (declare-function idlwave-entry-find-keyword "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
269 (declare-function idlwave-expand-keyword "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
270 (declare-function idlwave-find-class-definition "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
271 (declare-function idlwave-find-inherited-class "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
272 (declare-function idlwave-find-struct-tag "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
273 (declare-function idlwave-get-buffer-visiting "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
274 (declare-function idlwave-in-quote "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
275 (declare-function idlwave-make-full-name "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
276 (declare-function idlwave-members-only "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
277 (declare-function idlwave-popup-select "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
278 (declare-function idlwave-routine-source-file "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
279 (declare-function idlwave-routines "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
280 (declare-function idlwave-sintern-class "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
281 (declare-function idlwave-sintern-keyword "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
282 (declare-function idlwave-sintern-method "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
283 (declare-function idlwave-sintern-routine-or-method "idlwave") |
86870 | 284 (declare-function idlwave-sintern-sysvar "idlwave" t t);idlwave-new-sintern-type |
285 (declare-function idlwave-sintern-sysvartag "idlwave" t t) | |
86503
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
286 (declare-function idlwave-substitute-link-target "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
287 (declare-function idlwave-sys-dir "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
288 (declare-function idlwave-this-word "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
289 (declare-function idlwave-what-module-find-class "idlwave") |
2c08ad76fc1f
* progmodes/cperl-mode.el (compilation-error-regexp-alist): Pacify
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86243
diff
changeset
|
290 (declare-function idlwave-where "idlwave") |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
291 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
292 (defun idlwave-help-mode () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
293 "Major mode for displaying IDL Help. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
294 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
295 This is a VIEW mode for the ASCII version of IDL Help files, |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
296 with some extras. Its main purpose is speed - so don't |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
297 expect a fully hyper-linked help. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
298 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
299 Scrolling: SPC DEL RET |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
300 Text Searches: Inside Topic: Use Emacs search functions |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
301 Exit: [q]uit or mouse button 3 will kill the frame |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
302 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
303 When the hep text is a source file, the following commands are available |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
304 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
305 Fontification: [F]ontify the buffer like source code |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
306 Jump: [h] to function doclib header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
307 [H] to file doclib header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
308 [.] back and forward between header and definition |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
309 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
310 Here are all keybindings. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
311 \\{idlwave-help-mode-map}" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
312 (kill-all-local-variables) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
313 (buffer-disable-undo) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
314 (setq major-mode 'idlwave-help-mode |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
315 mode-name "IDLWAVE Help") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
316 (use-local-map idlwave-help-mode-map) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
317 (easy-menu-add idlwave-help-menu idlwave-help-mode-map) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
318 (setq truncate-lines t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
319 (setq case-fold-search t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
320 (setq mode-line-format |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
321 (list "" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
322 'mode-line-modified |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
323 'mode-line-buffer-identification |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
324 ": " 'idlwave-help-mode-line-indicator |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
325 " -%-")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
326 (setq buffer-read-only t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
327 (set (make-local-variable 'idlwave-help-def-pos) nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
328 (set (make-local-variable 'idlwave-help-args) nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
329 (set (make-local-variable 'idlwave-help-in-header) nil) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
330 (run-hooks 'idlwave-help-mode-hook)) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
331 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
332 (defun idlwave-html-help-location () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
333 "Return the help directory where HTML files are, or nil if that is unknown." |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
334 (let ((syshelp-dir (expand-file-name |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
335 idlwave-html-system-help-location (idlwave-sys-dir))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
336 (help-dir (or (and (stringp idlwave-html-help-location) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
337 (> (length idlwave-html-help-location) 0) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
338 idlwave-html-help-location) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
339 (getenv "IDLWAVE_HELP_LOCATION")))) |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
340 (if (and syshelp-dir (file-directory-p syshelp-dir)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
341 syshelp-dir |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
342 (if help-dir |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
343 (progn |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
344 (setq help-dir (expand-file-name "idl_html_help" help-dir)) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
345 (if (file-directory-p help-dir) help-dir)))))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
346 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
347 (defvar idlwave-help-assistant-available nil) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
348 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
349 (defun idlwave-help-check-locations () |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
350 ;; Check help locations and assistant. |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
351 (let ((sys-dir (idlwave-sys-dir)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
352 (help-loc (idlwave-html-help-location))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
353 (if (or (not (file-directory-p sys-dir)) |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
354 (not help-loc) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
355 (not (file-directory-p help-loc))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
356 (message |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
357 "HTML help location not found: try setting `idlwave-system-directory' and/or `idlwave-html-help-location'.")) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
358 ;; see if we have the assistant |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
359 (when (and idlwave-help-use-assistant |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
360 (not (eq (idlwave-help-assistant-available) t))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
361 (message "Cannot locate IDL Assistant, enabling default browser.") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
362 (setq idlwave-help-use-assistant nil) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
363 (unless idlwave-help-browse-url-available |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
364 (error "browse-url is not available; install it or IDL Assistant to use HTML help."))))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
365 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
366 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
367 (defvar idlwave-current-obj_new-class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
368 (defvar idlwave-help-diagnostics) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
369 (defvar idlwave-experimental) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
370 (defvar idlwave-last-context-help-pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
371 (defun idlwave-do-context-help (&optional arg) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
372 "Wrapper around the call to idlwave-context-help1. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
373 It collects and prints the diagnostics messages." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
374 (let ((marker (list (current-buffer) (point))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
375 (idlwave-help-diagnostics nil)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
376 ;; Check for frame switching. When the command is invoked twice |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
377 ;; at the same position, we try to switch to the help frame |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
378 ;; FIXME: Frame switching works only on XEmacs |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
379 (if (and idlwave-experimental |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
380 (equal last-command this-command) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
381 (equal idlwave-last-context-help-pos marker)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
382 (idlwave-help-select-help-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
383 ;; Do the real thing. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
384 (setq idlwave-last-context-help-pos marker) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
385 (idlwave-do-context-help1 arg) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
386 (if idlwave-help-diagnostics |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
387 (message "%s" (mapconcat 'identity |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
388 (nreverse idlwave-help-diagnostics) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
389 "; ")))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
390 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
391 (defvar idlwave-help-do-class-struct-tag nil) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
392 (defvar idlwave-structtag-struct-location) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
393 (defvar idlwave-help-do-struct-tag nil) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
394 (defvar idlwave-system-variables-alist) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
395 (defvar idlwave-executive-commands-alist) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
396 (defvar idlwave-system-class-info) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
397 (defun idlwave-do-context-help1 (&optional arg) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
398 "The work-horse version of `idlwave-context-help', which see." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
399 (save-excursion |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
400 (if (equal (char-after) ?/) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
401 (forward-char 1) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
402 (if (equal (char-before) ?=) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
403 (backward-char 1))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
404 (let* ((idlwave-query-class nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
405 (idlwave-force-class-query (equal arg '(4))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
406 (chars "a-zA-Z0-9_$.!") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
407 (beg (save-excursion (skip-chars-backward chars) (point))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
408 (end (save-excursion (skip-chars-forward chars) (point))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
409 (this-word (buffer-substring-no-properties beg end)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
410 (st-ass (assoc-string this-word |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
411 idlwave-help-special-topic-words t)) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
412 (classtag (and (string-match "self\\." this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
413 (< beg (- end 4)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
414 (structtag (and (fboundp 'idlwave-complete-structure-tag) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
415 (string-match "\\`\\([^.]+\\)\\." this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
416 (< beg (- end 4)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
417 module keyword cw mod1 mod2 mod3) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
418 (if (or arg |
76395
144d0dd66d84
(idlwave-do-context-help1): Don't visit special help topics for
J.D. Smith <jdsmith@as.arizona.edu>
parents:
75347
diff
changeset
|
419 (and (not classtag) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
420 (not structtag) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
421 (not (member (string-to-char this-word) '(?! ?.))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
422 ;; Need the module information |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
423 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
424 ;; MODULE is (name type class), for this or any inheriting class |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
425 (setq module (idlwave-what-module-find-class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
426 cw (nth 2 (idlwave-where))) ;what would we complete here? |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
427 ;; Correct for OBJ_NEW, we may need an INIT method instead. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
428 (if (equal (idlwave-downcase-safe (car module)) "obj_new") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
429 (let* ((bos (save-excursion (idlwave-beginning-of-statement) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
430 (point))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
431 (str (buffer-substring bos (point)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
432 (if (string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z][a-zA-Z0-9$_]+\\)['\"]" str) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
433 (setq module (list "init" 'fun (match-string 1 str)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
434 idlwave-current-obj_new-class (match-string 1 str)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
435 ))))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
436 (cond |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
437 (arg (setq mod1 module)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
438 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
439 ;; A special topic -- only system help |
76395
144d0dd66d84
(idlwave-do-context-help1): Don't visit special help topics for
J.D. Smith <jdsmith@as.arizona.edu>
parents:
75347
diff
changeset
|
440 ((and st-ass (not (memq cw '(function-keyword procedure-keyword)))) |
144d0dd66d84
(idlwave-do-context-help1): Don't visit special help topics for
J.D. Smith <jdsmith@as.arizona.edu>
parents:
75347
diff
changeset
|
441 (setq mod1 (list (cdr st-ass)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
442 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
443 ;; A system variable -- only system help |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
444 ((string-match |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
445 "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?" |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
446 this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
447 (let* ((word (match-string-no-properties 1 this-word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
448 (entry (assq (idlwave-sintern-sysvar word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
449 idlwave-system-variables-alist)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
450 (tag (match-string-no-properties 3 this-word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
451 (tag-target (if tag |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
452 (cdr |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
453 (assq (idlwave-sintern-sysvartag tag) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
454 (cdr (assq 'tags entry)))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
455 (link (nth 1 (assq 'link entry)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
456 (if tag-target |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
457 (setq link (idlwave-substitute-link-target link |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
458 tag-target))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
459 (setq mod1 (list link)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
460 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
461 ;; An executive command -- only system help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
462 ((string-match "^\\.\\([A-Z_]+\\)" this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
463 (let* ((word (match-string 1 this-word)) |
62121
9d18baf82550
(idlwave-do-context-help1, idlwave-highlight-linked-completions): Replace
Juanma Barranquero <lekktu@gmail.com>
parents:
61394
diff
changeset
|
464 (link (cdr (assoc-string |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
465 word |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
466 idlwave-executive-commands-alist t)))) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
467 (setq mod1 (list link)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
468 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
469 ;; A class -- system OR in-text help (via class__define). |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
470 ((and (eq cw 'class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
471 (or (idlwave-in-quote) ; e.g. obj_new |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
472 (re-search-backward "\\<inherits[ \t]+[A-Za-z0-9_]*\\=" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
473 (max (point-min) (- (point) 40)) t))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
474 ;; Class completion inside string delimiters must be |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
475 ;; the class inside OBJ_NEW. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
476 (let* ((entry (assq |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
477 (idlwave-sintern-class this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
478 idlwave-system-class-info)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
479 (name (concat (downcase this-word) "__define")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
480 (link (nth 1 (assq 'link entry)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
481 (setq mod1 (list link name 'pro)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
482 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
483 ;; A class structure tag (self.BLAH) -- only in-text help available |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
484 (classtag |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
485 (let ((tag (substring this-word (match-end 0))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
486 class-with found-in) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
487 (when (setq class-with |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
488 (idlwave-class-or-superclass-with-tag |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
489 (nth 2 (idlwave-current-routine)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
490 tag)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
491 (setq found-in (idlwave-class-found-in class-with)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
492 (if (assq (idlwave-sintern-class class-with) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
493 idlwave-system-class-info) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
494 (error "No help available for system class tags")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
495 (setq idlwave-help-do-class-struct-tag t) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
496 (setq mod1 (list nil |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
497 (if found-in |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
498 (cons (concat found-in "__define") class-with) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
499 (concat class-with "__define")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
500 'pro |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
501 nil ; no class.... it's a procedure! |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
502 tag))))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
503 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
504 ;; A regular structure tag -- only in text, and if |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
505 ;; optional `complete-structtag' loaded. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
506 (structtag |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
507 (let ((var (match-string 1 this-word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
508 (tag (substring this-word (match-end 0)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
509 ;; Check if we need to update the "current" structure |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
510 (idlwave-prepare-structure-tag-completion var) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
511 (setq idlwave-help-do-struct-tag |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
512 idlwave-structtag-struct-location |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
513 mod1 (list nil nil nil nil tag)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
514 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
515 ;; A routine keyword -- in text or system help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
516 ((and (memq cw '(function-keyword procedure-keyword)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
517 (stringp this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
518 (string-match "\\S-" this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
519 (not (string-match "!" this-word))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
520 (cond ((or (= (char-before beg) ?/) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
521 (save-excursion (goto-char end) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
522 (looking-at "[ \t]*="))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
523 ;; Certainly a keyword. Check for abbreviation etc. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
524 (setq keyword (idlwave-expand-keyword this-word module)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
525 (cond |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
526 ((null keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
527 (idlwave-help-diagnostics |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
528 (format "%s does not accept `%s' kwd" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
529 (idlwave-make-full-name (nth 2 module) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
530 (car module)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
531 (upcase this-word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
532 'ding)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
533 ((consp keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
534 (idlwave-help-diagnostics |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
535 (format "%d matches for kwd abbrev `%s'" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
536 (length keyword) this-word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
537 'ding) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
538 ;; We continue anyway with the first match... |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
539 (setq keyword (car keyword)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
540 ;; Keyword, or just module |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
541 (setq mod1 (append (list t) module (list keyword))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
542 (setq mod2 (append (list t) module))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
543 ((equal (char-after end) ?\() |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
544 ;; A function - what-module will have caught this |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
545 (setq mod1 (append (list t) module))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
546 (t |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
547 ;; undecided - try function, keyword, then enclosing mod. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
548 ;; Check for keyword abbreviations, but do not report |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
549 ;; errors, because it might be something else. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
550 ;; FIXME: is this a good way to handle this? |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
551 (setq keyword (idlwave-expand-keyword this-word module)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
552 (if (consp keyword) (setq keyword (car keyword))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
553 (setq mod1 (append (list t) module (list keyword)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
554 mod2 (list t this-word 'fun nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
555 mod3 (append (list t) module))))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
556 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
557 ;; Everything else |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
558 (t |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
559 (setq mod1 (append (list t) module)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
560 (if mod3 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
561 (condition-case nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
562 (apply 'idlwave-online-help mod1) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
563 (error (condition-case nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
564 (apply 'idlwave-online-help mod2) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
565 (error (apply 'idlwave-online-help mod3))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
566 (if mod2 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
567 (condition-case nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
568 (apply 'idlwave-online-help mod1) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
569 (error (apply 'idlwave-online-help mod2))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
570 (if mod1 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
571 (apply 'idlwave-online-help mod1) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
572 (error "Don't know which item to show help for"))))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
573 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
574 (defun idlwave-do-mouse-completion-help (ev) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
575 "Display online help on an item in the *Completions* buffer. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
576 Needs additional info stored in global `idlwave-completion-help-info'." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
577 (let* ((cw (selected-window)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
578 (info idlwave-completion-help-info) ; global passed in |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
579 (what (nth 0 info)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
580 (name (nth 1 info)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
581 (type (nth 2 info)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
582 (class (nth 3 info)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
583 (need-class class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
584 (kwd (nth 4 info)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
585 (sclasses (nth 5 info)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
586 word link) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
587 (mouse-set-point ev) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
588 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
589 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
590 ;; See if we can also find help somewhere, e.g. for multiple classes |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
591 (setq word (idlwave-this-word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
592 (if (string= word "") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
593 (error "No help item selected")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
594 (setq link (get-text-property 0 'link word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
595 (select-window cw) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
596 (cond |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
597 ;; Routine name |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
598 ((memq what '(procedure function routine)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
599 (setq name word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
600 (if (or (eq class t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
601 (and (stringp class) sclasses)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
602 (let* ((classes (idlwave-all-method-classes |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
603 (idlwave-sintern-method name) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
604 type))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
605 (setq link t) ; No specific link valid yet |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
606 (if sclasses |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
607 (setq classes (idlwave-members-only |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
608 classes (cons class sclasses)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
609 (setq class (idlwave-popup-select ev classes |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
610 "Select Class" 'sort)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
611 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
612 ;; XXX is this necessary, given all-method-classes? |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
613 (if (stringp class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
614 (setq class (idlwave-find-inherited-class |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
615 (idlwave-sintern-routine-or-method name class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
616 type (idlwave-sintern-class class))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
617 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
618 ;; Keyword |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
619 ((eq what 'keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
620 (setq kwd word) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
621 (if (or (eq class t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
622 (and (stringp class) sclasses)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
623 (let ((classes (idlwave-all-method-keyword-classes |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
624 (idlwave-sintern-method name) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
625 (idlwave-sintern-keyword kwd) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
626 type))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
627 (setq link t) ; Link can't be correct yet |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
628 (if sclasses |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
629 (setq classes (idlwave-members-only |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
630 classes (cons class sclasses)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
631 (setq class (idlwave-popup-select ev classes |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
632 "Select Class" 'sort)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
633 ;; XXX is this necessary, given all-method-keyword-classes? |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
634 (if (stringp class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
635 (setq class (idlwave-find-inherited-class |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
636 (idlwave-sintern-routine-or-method name class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
637 type (idlwave-sintern-class class))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
638 (if (string= (downcase name) "obj_new") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
639 (setq class idlwave-current-obj_new-class |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
640 name "Init")))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
641 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
642 ;; Class name |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
643 ((eq what 'class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
644 (setq class word |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
645 word nil)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
646 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
647 ;; A special named function to call which sets some of our variables |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
648 ((and (symbolp what) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
649 (fboundp what)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
650 (funcall what 'set word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
651 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
652 (t (error "Cannot help with this item"))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
653 (if (and need-class (not class) (not (and link (not (eq link t))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
654 (error "Cannot help with this item")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
655 (idlwave-online-help link (or name word) type class kwd))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
656 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
657 (defvar idlwave-highlight-help-links-in-completion) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
658 (defvar idlwave-completion-help-links) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
659 (defun idlwave-highlight-linked-completions () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
660 "Highlight all completions for which help is available and attach link. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
661 Those words in `idlwave-completion-help-links' have links. The |
63450
87216f91a211
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents:
62772
diff
changeset
|
662 `idlwave-help-link' face is used for this." |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
663 (if idlwave-highlight-help-links-in-completion |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
664 (with-current-buffer (get-buffer "*Completions*") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
665 (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
666 (let* ((case-fold-search t) |
63450
87216f91a211
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Miles Bader <miles@gnu.org>
parents:
62772
diff
changeset
|
667 (props (list 'face 'idlwave-help-link)) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
668 (info idlwave-completion-help-info) ; global passed in |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
669 (what (nth 0 info)) ; what was completed, or a func |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
670 (class (nth 3 info)) ; any class |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
671 word beg end doit) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
672 (goto-char (point-min)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
673 (re-search-forward "possible completions are:" nil t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
674 (while (re-search-forward "\\s-\\([A-Za-z0-9_.]+\\)\\(\\s-\\|\\'\\)" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
675 nil t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
676 (setq beg (match-beginning 1) end (match-end 1) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
677 word (match-string 1) doit nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
678 ;; Call special completion function test |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
679 (if (and (symbolp what) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
680 (fboundp what)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
681 (setq doit (funcall what 'test word)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
682 ;; Look for special link property passed in help-links |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
683 (if idlwave-completion-help-links |
62121
9d18baf82550
(idlwave-do-context-help1, idlwave-highlight-linked-completions): Replace
Juanma Barranquero <lekktu@gmail.com>
parents:
61394
diff
changeset
|
684 (setq doit (assoc-string |
9d18baf82550
(idlwave-do-context-help1, idlwave-highlight-linked-completions): Replace
Juanma Barranquero <lekktu@gmail.com>
parents:
61394
diff
changeset
|
685 word idlwave-completion-help-links t)))) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
686 (when doit |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
687 (if (consp doit) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
688 (setq props (append props `(link ,(cdr doit))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
689 (let ((buffer-read-only nil)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
690 (add-text-properties beg end props))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
691 (goto-char end))))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
692 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
693 ;; Arrange for this function to be called after completion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
694 (add-hook 'idlwave-completion-setup-hook |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
695 'idlwave-highlight-linked-completions) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
696 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
697 (defvar idlwave-help-return-frame nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
698 "The frame to return to from the help frame.") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
699 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
700 (defun idlwave-help-quit () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
701 "Exit IDLWAVE Help buffer. Kill the dedicated frame if any." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
702 (interactive) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
703 (cond ((and idlwave-help-use-dedicated-frame |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
704 (eq (selected-frame) idlwave-help-frame)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
705 (if (and idlwave-experimental |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
706 (frame-live-p idlwave-help-return-frame)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
707 ;; Try to select the return frame. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
708 ;; This can crash on slow network connections, obviously when |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
709 ;; we kill the help frame before the return-frame is selected. |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
710 ;; To protect the workings, we wait for up to one second |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
711 ;; and check if the return-frame *is* now selected. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
712 ;; This is marked "eperimental" since we are not sure when its OK. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
713 (let ((maxtime 1.0) (time 0.) (step 0.1)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
714 (select-frame idlwave-help-return-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
715 (while (and (sit-for step) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
716 (not (eq (selected-frame) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
717 idlwave-help-return-frame)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
718 (< (setq time (+ time step)) maxtime))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
719 (delete-frame idlwave-help-frame)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
720 ((window-configuration-p idlwave-help-window-configuration) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
721 (set-window-configuration idlwave-help-window-configuration) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
722 (select-window (previous-window))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
723 (t (kill-buffer (idlwave-help-get-help-buffer))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
724 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
725 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
726 (defvar default-toolbar-visible-p) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
727 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
728 (defun idlwave-help-display-help-window (&optional pos-or-func) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
729 "Display the help window. |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
730 Move window start to POS-OR-FUNC, if passed as a position, or call it |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
731 if passed as a function. See `idlwave-help-use-dedicated-frame'." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
732 (let ((cw (selected-window)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
733 (buf (idlwave-help-get-help-buffer))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
734 (if (and window-system idlwave-help-use-dedicated-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
735 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
736 (idlwave-help-show-help-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
737 (switch-to-buffer buf)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
738 ;; Do it in this frame and save the window configuration |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
739 (if (not (get-buffer-window buf nil)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
740 (setq idlwave-help-window-configuration |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
741 (current-window-configuration))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
742 (display-buffer buf nil (selected-frame)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
743 (select-window (get-buffer-window buf))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
744 (raise-frame) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
745 (if pos-or-func |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
746 (if (functionp pos-or-func) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
747 (funcall pos-or-func) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
748 (goto-char pos-or-func) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
749 (recenter 0))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
750 (select-window cw))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
751 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
752 (defun idlwave-help-select-help-frame () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
753 "Select the help frame." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
754 (if (and (frame-live-p idlwave-help-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
755 (not (eq (selected-frame) idlwave-help-frame))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
756 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
757 (setq idlwave-help-return-frame (selected-frame)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
758 (select-frame idlwave-help-frame)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
759 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
760 (defun idlwave-help-return-to-calling-frame () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
761 "Select the frame from which the help frame was selected." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
762 (interactive) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
763 (if (and (frame-live-p idlwave-help-return-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
764 (not (eq (selected-frame) idlwave-help-return-frame))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
765 (select-frame idlwave-help-return-frame))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
766 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
767 (defun idlwave-online-help (link &optional name type class keyword) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
768 "Display HTML or other special help on a certain topic. |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
769 Either loads an HTML link, if LINK is non-nil, or gets special-help on |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
770 the optional arguments, if any special help is defined. If LINK is |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
771 `t', first look up the optional arguments in the routine info list to |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
772 see if a link is set for it. Try extra help functions if necessary." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
773 ;; Lookup link |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
774 (if (eq link t) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
775 (let ((entry (idlwave-best-rinfo-assoc name type class |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
776 (idlwave-routines) nil t))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
777 (if entry |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
778 (cond |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
779 ;; Try keyword link |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
780 ((and keyword |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
781 (setq link (cdr |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
782 (idlwave-entry-find-keyword entry keyword))))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
783 ;; Default, regular entry link |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
784 (t (setq link (idlwave-entry-has-help entry)))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
785 (if (and |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
786 class |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
787 ;; Check for system class help |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
788 (setq entry (assq (idlwave-sintern-class class) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
789 idlwave-system-class-info) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
790 link (nth 1 (assq 'link entry)))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
791 (message |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
792 (concat "No routine info for %s" |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
793 ", falling back on class help.") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
794 (idlwave-make-full-name class name)))))) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
795 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
796 (cond |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
797 ;; An explicit link |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
798 ((stringp link) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
799 (idlwave-help-html-link link)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
800 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
801 ;; Any extra help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
802 (idlwave-extra-help-function |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
803 (idlwave-help-get-special-help name type class keyword)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
804 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
805 ;; Nothing worked |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
806 (t (idlwave-help-error name type class keyword)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
807 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
808 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
809 (defun idlwave-help-get-special-help (name type class keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
810 "Call the function given by `idlwave-extra-help-function'." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
811 (let* ((cw (selected-window)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
812 (help-pos (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
813 (set-buffer (idlwave-help-get-help-buffer)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
814 (let ((buffer-read-only nil)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
815 (funcall idlwave-extra-help-function |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
816 name type class keyword))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
817 (if help-pos |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
818 (idlwave-help-display-help-window help-pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
819 (idlwave-help-error name type class keyword)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
820 (select-window cw))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
821 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
822 (defun idlwave-help-html-link (link) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
823 "Get html help on a given LINK." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
824 (let ((browse-url-browser-function idlwave-help-browser-function) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
825 (help-loc (idlwave-html-help-location)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
826 (browse-url-generic-program idlwave-help-browser-generic-program) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
827 ;(browse-url-generic-args idlwave-help-browser-generic-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
828 full-link) |
65235
115e36d1b11e
(browse-url-generic-args): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
64993
diff
changeset
|
829 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
830 ;; Just a regular file name (+ anchor name) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
831 (unless (and (stringp help-loc) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
832 (file-directory-p help-loc)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
833 (error "Invalid help location.")) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
834 (setq full-link (browse-url-file-url (expand-file-name link help-loc))) |
62121
9d18baf82550
(idlwave-do-context-help1, idlwave-highlight-linked-completions): Replace
Juanma Barranquero <lekktu@gmail.com>
parents:
61394
diff
changeset
|
835 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
836 ;; Select the browser |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
837 (cond |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
838 (idlwave-help-use-assistant |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
839 (idlwave-help-assistant-open-link link)) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
840 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
841 ((or idlwave-help-browser-is-local |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
842 (string-match "w3" (symbol-name idlwave-help-browser-function))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
843 (idlwave-help-display-help-window '(lambda () (browse-url full-link)))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
844 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
845 (t (browse-url full-link))))) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
846 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
847 ;; A special help routine for source-level syntax help in files. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
848 (defvar idlwave-help-fontify-source-code) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
849 (defvar idlwave-help-source-try-header) |
64001
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
850 (defvar idlwave-current-tags-buffer) |
82d080bf4f42
Updated to IDLWAVE v5.7 (see idlwave.org), and variable cleanup
J.D. Smith <jdsmith@as.arizona.edu>
parents:
63450
diff
changeset
|
851 (defvar idlwave-current-tags-class) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
852 (defun idlwave-help-with-source (name type class keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
853 "Provide help for routines not documented in the IDL manuals. Works |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
854 by loading the routine source file into the help buffer. Depending on |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
855 the value of `idlwave-help-source-try-header', it attempts to show the |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
856 routine definition or the header description. If |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
857 `idlwave-help-do-class-struct-tag' is non-nil, keyword is a tag to |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
858 show help on from the class definition structure. If |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
859 `idlwave-help-do-struct-tag' is non-nil, show help from the matching |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
860 structure tag definition. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
861 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
862 This function can be used as `idlwave-extra-help-function'." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
863 (let* ((class-struct-tag idlwave-help-do-class-struct-tag) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
864 (struct-tag idlwave-help-do-struct-tag) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
865 (case-fold-search t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
866 (real-class (if (consp name) (cdr name))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
867 (name (if (consp name) (car name) name)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
868 (class-only (and (stringp class) (not (stringp name)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
869 file header-pos def-pos in-buf) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
870 (if class-only ;Help with class? Using "Init" as source. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
871 (setq name "Init" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
872 type 'fun)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
873 (if (not struct-tag) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
874 (setq file |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
875 (idlwave-routine-source-file |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
876 (nth 3 (idlwave-best-rinfo-assoc |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
877 name (or type t) class (idlwave-routines)))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
878 (setq idlwave-help-def-pos nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
879 idlwave-help-args (list name type class keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
880 idlwave-help-in-header nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
881 idlwave-help-do-struct-tag nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
882 idlwave-help-do-class-struct-tag nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
883 (if (or struct-tag (stringp file)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
884 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
885 (setq in-buf ; structure-tag completion is always in current buffer |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
886 (if struct-tag |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
887 idlwave-current-tags-buffer |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
888 (idlwave-get-buffer-visiting file))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
889 ;; see if file is in a visited buffer, insert those contents |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
890 (if in-buf |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
891 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
892 (setq file (buffer-file-name in-buf)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
893 (erase-buffer) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
894 (insert-buffer-substring in-buf)) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
895 (if (file-exists-p file) ;; otherwise just load the file |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
896 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
897 (erase-buffer) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
898 (insert-file-contents file nil nil nil 'replace)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
899 (idlwave-help-error name type class keyword))) |
70137
49dd98fd173c
Ensure point at beginning of source help buffer, so class/tag finding works.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
69831
diff
changeset
|
900 (goto-char (point-min)) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
901 (if (and idlwave-help-fontify-source-code (not in-buf)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
902 (idlwave-help-fontify))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
903 (idlwave-help-error name type class keyword)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
904 (setq idlwave-help-mode-line-indicator file) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
905 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
906 ;; Try to find a good place to display |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
907 (setq def-pos |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
908 ;; Find the class structure tag if that's what we're after |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
909 (cond |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
910 ;; Class structure tags: find the class or named structure |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
911 ;; definition |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
912 (class-struct-tag |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
913 (save-excursion |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
914 (setq class |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
915 (if (string-match "[a-zA-Z0-9]\\(__\\)" name) |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
916 (substring name 0 (match-beginning 1)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
917 idlwave-current-tags-class)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
918 (and |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
919 (idlwave-find-class-definition class nil real-class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
920 (idlwave-find-struct-tag keyword)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
921 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
922 ;; Generic structure tags: the structure definition |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
923 ;; location within the file has been recorded in |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
924 ;; `struct-tag' |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
925 (struct-tag |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
926 (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
927 (and |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
928 (integerp struct-tag) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
929 (goto-char struct-tag) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
930 (idlwave-find-struct-tag keyword)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
931 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
932 ;; Just find the routine definition |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
933 (t |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
934 (if class-only (point-min) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
935 (idlwave-help-find-routine-definition name type class keyword)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
936 idlwave-help-def-pos def-pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
937 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
938 (if (and idlwave-help-source-try-header |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
939 (not (or struct-tag class-struct-tag))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
940 ;; Check if we can find the header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
941 (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
942 (goto-char (or def-pos (point-max))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
943 (setq header-pos (idlwave-help-find-in-doc-header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
944 name type class keyword 'exact) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
945 idlwave-help-in-header header-pos))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
946 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
947 (if (or header-pos def-pos) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
948 (progn |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
949 (if (boundp 'idlwave-help-min-frame-width) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
950 (setq idlwave-help-min-frame-width 80)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
951 (goto-char (or header-pos def-pos))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
952 (idlwave-help-error name type class keyword)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
953 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
954 (point))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
955 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
956 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
957 (defun idlwave-help-find-routine-definition (name type class keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
958 "Find the definition of routine CLASS::NAME in current buffer. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
959 KEYWORD is ignored. Returns the point of match if successful, nil otherwise." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
960 (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
961 (goto-char (point-max)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
962 (if (re-search-backward |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
963 (concat "^[ \t]*" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
964 (if (eq type 'pro) "pro" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
965 (if (eq type 'fun) "function" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
966 "\\(pro\\|function\\)")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
967 "[ \t]+" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
968 (regexp-quote (downcase (idlwave-make-full-name class name))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
969 "[, \t\r\n]") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
970 nil t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
971 (match-beginning 0) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
972 nil))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
973 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
974 (defvar idlwave-doclib-start) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
975 (defvar idlwave-doclib-end) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
976 (defun idlwave-help-find-in-doc-header (name type class keyword |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
977 &optional exact) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
978 "Find the requested help in the doc-header above point. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
979 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
980 First checks if there is a doc-lib header which describes the correct |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
981 routine. Then tries to find the KEYWORDS section and the KEYWORD, if |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
982 given. Returns the point which should be window start of the help |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
983 window. If EXACT is non-nil, the full help position must be found - |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
984 down to the keyword requested. This setting is for context help, if |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
985 the exact spot is needed. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
986 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
987 If EXACT is nil, the position of the header is returned if it |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
988 describes the correct routine - even if the keyword description cannot |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
989 be found. TYPE is ignored. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
990 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
991 This function expects a more or less standard routine header. In |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
992 particlar it looks for the `NAME:' tag, either with a colon, or alone |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
993 on a line. Then `NAME:' must be followed by the routine name on the |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
994 same or the next line. When KEYWORD is non-nil, looks first for a |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
995 `KEYWORDS' section. It is amazing how inconsisten this is through |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
996 some IDL libraries I have seen. We settle for a line containing an |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
997 upper case \"KEYWORD\" string. If this line is not fould we search |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
998 for the keyword anyway to increase the hit-rate |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
999 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1000 When one of these sections exists we check for a line starting with any of |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1001 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1002 /KEYWORD KEYWORD- KEYWORD= KEYWORD |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1003 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1004 with spaces allowed between the keyword and the following dash or equal sign. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1005 If there is a match, we assume it is the keyword description." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1006 (let* ((case-fold-search t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1007 (rname (if (stringp class) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1008 (concat |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1009 "\\(" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1010 ;; Traditional name or class::name |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1011 "\\(" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1012 "\\(" (regexp-quote (downcase class)) "::\\)?" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1013 (regexp-quote (downcase name)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1014 "\\>\\)" |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1015 (concat |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1016 "\\|" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1017 ;; class__define or just class |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1018 (regexp-quote (downcase class)) "\\(__define\\)?") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1019 "\\)") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1020 (regexp-quote (downcase name)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1021 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1022 ;; NAME tag plus the routine name. The new version is from JD. |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1023 (name-re (concat |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1024 "\\(^;+\\*?[ \t]*" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1025 idlwave-help-doclib-name |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1026 "\\([ \t]*:\\|[ \t]*$\\)[ \t]*\\(\n;+[ \t]*\\)*" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1027 rname |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1028 "\\|" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1029 "^;+[ \t]*" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1030 rname |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1031 ":[ \t]*$\\)")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1032 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1033 ;; Header start plus name |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1034 (header-re (concat "\\(" idlwave-doclib-start "\\).*\n" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1035 "\\(^;+.*\n\\)*" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1036 "\\(" name-re "\\)")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1037 ;; A keywords section |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1038 (kwds-re (concat ; forgiving |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1039 "^;+\\*?[ \t]*" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1040 "\\([-A-Z_ ]*" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1041 idlwave-help-doclib-keyword |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1042 "[-A-Z_ ]*\\)" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1043 "\\(:\\|[ \t]*\n\\)")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1044 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1045 ;; The individual keyword description line. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1046 (kwd-re (if keyword ; hard (well...) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1047 (concat |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1048 "^;+[ \t]+" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1049 "\\(/" (regexp-quote (upcase keyword)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1050 "\\|" (regexp-quote (upcase keyword)) "[ \t]*[-=:\n]" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1051 "\\)"))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1052 (kwd-re2 (if keyword ; forgiving |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1053 (concat |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1054 "^;+[ \t]+" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1055 (regexp-quote (upcase keyword)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1056 "\\>"))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1057 dstart dend name-pos kwds-pos kwd-pos) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1058 (catch 'exit |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1059 (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1060 (goto-char (point-min)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1061 (while (and (setq dstart (re-search-forward idlwave-doclib-start nil t)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1062 (setq dend (re-search-forward idlwave-doclib-end nil t))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1063 ;; found a routine header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1064 (goto-char dstart) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1065 (if (setq name-pos (re-search-forward name-re dend t)) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1066 (progn |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1067 (if keyword |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1068 ;; We do need a keyword |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1069 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1070 ;; Try to find a keyword section, but don't force it. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1071 (goto-char name-pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1072 (if (let ((case-fold-search nil)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1073 (re-search-forward kwds-re dend t)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1074 (setq kwds-pos (match-beginning 0))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1075 ;; Find the keyword description |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1076 (if (or (let ((case-fold-search nil)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1077 (re-search-forward kwd-re dend t)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1078 (re-search-forward kwd-re dend t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1079 (let ((case-fold-search nil)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1080 (re-search-forward kwd-re2 dend t)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1081 (re-search-forward kwd-re2 dend t)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1082 (setq kwd-pos (match-beginning 0)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1083 (if exact |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1084 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1085 (idlwave-help-diagnostics |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1086 (format "Could not find description of kwd %s" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1087 (upcase keyword))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1088 (throw 'exit nil)))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1089 ;; Return the best position we got |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1090 (throw 'exit (or kwd-pos kwds-pos name-pos dstart))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1091 (goto-char dend)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1092 (idlwave-help-diagnostics "Could not find doclib header") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1093 (throw 'exit nil)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1094 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1095 (defun idlwave-help-diagnostics (string &optional ding) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1096 "Add a diagnostics string to the list. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1097 When DING is non-nil, ring the bell as well." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1098 (if (boundp 'idlwave-help-diagnostics) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1099 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1100 (setq idlwave-help-diagnostics |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1101 (cons string idlwave-help-diagnostics)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1102 (if ding (ding))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1103 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1104 (defun idlwave-help-toggle-header-top-and-def (arg) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1105 (interactive "P") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1106 (let (pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1107 (if idlwave-help-in-header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1108 ;; Header was the last thing displayed |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1109 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1110 (setq idlwave-help-in-header nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1111 (setq pos idlwave-help-def-pos)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1112 ;; Try to display header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1113 (setq pos (idlwave-help-find-in-doc-header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1114 (nth 0 idlwave-help-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1115 (nth 1 idlwave-help-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1116 (nth 2 idlwave-help-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1117 nil)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1118 (if pos |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1119 (setq idlwave-help-in-header t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1120 (error "Cannot find doclib header for routine %s" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1121 (idlwave-make-full-name (nth 2 idlwave-help-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1122 (nth 0 idlwave-help-args))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1123 (if pos |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1124 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1125 (goto-char pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1126 (recenter 0))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1127 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1128 (defun idlwave-help-find-first-header (arg) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1129 (interactive "P") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1130 (let (pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1131 (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1132 (goto-char (point-min)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1133 (if (re-search-forward idlwave-doclib-start nil t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1134 (setq pos (match-beginning 0)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1135 (if pos |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1136 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1137 (goto-char pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1138 (recenter 0)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1139 (error "No DocLib Header in current file")))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1140 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1141 (defun idlwave-help-find-header (arg) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1142 "Jump to the DocLib Header." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1143 (interactive "P") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1144 (if arg |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1145 (idlwave-help-find-first-header nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1146 (setq idlwave-help-in-header nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1147 (idlwave-help-toggle-header-match-and-def arg 'top))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1148 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1149 (defun idlwave-help-toggle-header-match-and-def (arg &optional top) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1150 (interactive "P") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1151 (let ((args idlwave-help-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1152 pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1153 (if idlwave-help-in-header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1154 ;; Header was the last thing displayed |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1155 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1156 (setq idlwave-help-in-header nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1157 (setq pos idlwave-help-def-pos)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1158 ;; Try to display header |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1159 (setq pos (apply 'idlwave-help-find-in-doc-header |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1160 (if top |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1161 (list (car args) (nth 1 args) (nth 2 args) nil) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1162 args))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1163 (if pos |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1164 (setq idlwave-help-in-header t) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1165 (error "Cannot find doclib header for routine %s" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1166 (idlwave-make-full-name (nth 2 idlwave-help-args) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1167 (nth 0 idlwave-help-args))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1168 (if pos |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1169 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1170 (goto-char pos) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1171 (recenter 0))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1172 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1173 (defvar font-lock-verbose) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1174 (defvar idlwave-mode-syntax-table) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1175 (defvar idlwave-font-lock-defaults) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1176 (defun idlwave-help-fontify () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1177 "Fontify the Help buffer as source code. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1178 Useful when source code is displayed as help. See the option |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1179 `idlwave-help-fontify-source-code'." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1180 (interactive) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1181 (if (featurep 'font-lock) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1182 (let ((major-mode 'idlwave-mode) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1183 (font-lock-verbose |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1184 (if (interactive-p) font-lock-verbose nil)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1185 (syntax-table (syntax-table))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1186 (unwind-protect |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1187 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1188 (set-syntax-table idlwave-mode-syntax-table) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1189 (set (make-local-variable 'font-lock-defaults) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1190 idlwave-font-lock-defaults) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1191 (font-lock-fontify-buffer)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1192 (set-syntax-table syntax-table))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1193 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1194 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1195 (defun idlwave-help-error (name type class keyword) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1196 (error "Can't find help on %s%s %s" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1197 (or (and (or class name) (idlwave-make-full-name class name)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1198 "<unknown>") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1199 (if keyword (format ", keyword %s" (upcase keyword)) "") |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1200 (if idlwave-html-help-location |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1201 "" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1202 "(help location unknown)"))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1203 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1204 (defun idlwave-help-show-help-frame () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1205 "Show the help frame, creating it if necessary" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1206 ;; Use a special frame for this |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1207 (unless (frame-live-p idlwave-help-frame) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1208 (setq idlwave-help-frame |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1209 (make-frame idlwave-help-frame-parameters)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1210 ;; Strip menubar (?) and toolbar from the Help frame. |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1211 (if (fboundp 'set-specifier) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1212 (progn |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1213 ;; XEmacs |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1214 (let ((sval (cons idlwave-help-frame nil))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1215 ;; (set-specifier menubar-visible-p sval) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1216 (set-specifier default-toolbar-visible-p sval))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1217 ;; Emacs |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1218 (modify-frame-parameters idlwave-help-frame |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1219 '(;;(menu-bar-lines . 0) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1220 (tool-bar-lines . 0))))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1221 (select-frame idlwave-help-frame)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1222 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1223 (defun idlwave-help-get-help-buffer () |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1224 "Return the IDLWAVE Help buffer. Make it first if necessary." |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1225 (let ((buf (get-buffer "*IDLWAVE Help*"))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1226 (if buf |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1227 nil |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1228 (setq buf (get-buffer-create "*IDLWAVE Help*")) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1229 (save-excursion |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1230 (set-buffer buf) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1231 (idlwave-help-mode))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1232 buf)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1233 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1234 (defun idlwave-grep (regexp list) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1235 (let (rtn) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1236 (while list |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1237 (if (string-match regexp (car list)) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1238 (setq rtn (cons (car list) rtn))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1239 (setq list (cdr list))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1240 (nreverse rtn))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1241 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1242 (defun idlwave-entry-has-help (entry) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1243 (and entry (car (nth 5 entry)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1244 |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1245 (defun idlwave-has-help (name type class) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1246 "Does this have help associated with it?" |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1247 (let ((entry (idlwave-best-rinfo-assoc name type class (idlwave-routines)))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1248 (idlwave-entry-has-help entry))) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1249 |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1250 ;;----- Control the IDL Assistant, which shipped with IDL v6.2 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1251 (defvar idlwave-help-assistant-process nil) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1252 (defvar idlwave-help-assistant-socket nil) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1253 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1254 ;; The Windows version does not have a !DIR/bin/* set of front-end |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1255 ;; scripts, but instead only links directly to bin.x86. As a result, |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1256 ;; we must pass the -profile argument as well. |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1257 (defvar idlwave-help-assistant-command |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1258 (if (memq system-type '(ms-dos windows-nt)) |
76395
144d0dd66d84
(idlwave-do-context-help1): Don't visit special help topics for
J.D. Smith <jdsmith@as.arizona.edu>
parents:
75347
diff
changeset
|
1259 "bin/bin.x86/idl_assistant.exe" |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1260 "bin/idl_assistant") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1261 "The command, rooted at idlwave-system-directory, which invokes the |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1262 IDL assistant.") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1263 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1264 (defun idlwave-help-assistant-available () |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1265 (if idlwave-help-assistant-available |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1266 (eq idlwave-help-assistant-available t) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1267 (setq idlwave-help-assistant-available |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1268 (if (file-executable-p (idlwave-help-assistant-command)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1269 t |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1270 'not-available)))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1271 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1272 (defun idlwave-help-assistant-command () |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1273 (expand-file-name idlwave-help-assistant-command (idlwave-sys-dir))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1274 |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1275 (defun idlwave-help-assistant-start (&optional full-link) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1276 "Start the IDL Assistant, loading link FULL-LINK, if passed." |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1277 (when (or (not idlwave-help-assistant-socket) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1278 (not (eq (process-status idlwave-help-assistant-socket) 'open))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1279 (let* ((help-loc (idlwave-html-help-location)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1280 (command (idlwave-help-assistant-command)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1281 (extra-args |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1282 (nconc |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1283 (if (memq system-type '(ms-dos windows-nt)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1284 `("-profile" ,(expand-file-name "idl.adp" help-loc))) |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1285 (if full-link `("-file" ,full-link)))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1286 port) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1287 (if idlwave-help-assistant-socket |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1288 (delete-process idlwave-help-assistant-socket)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1289 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1290 (setq idlwave-help-assistant-process |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1291 (apply 'start-process |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1292 "IDL_ASSISTANT_PROC" nil command "-server" extra-args)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1293 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1294 (set-process-filter idlwave-help-assistant-process |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1295 (lambda (proc string) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1296 (setq port (string-to-number string)))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1297 (unless (accept-process-output idlwave-help-assistant-process 15) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1298 (error "Failed binding IDL_ASSISTANT socket")) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1299 (if (not port) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1300 (error "Unable to open IDL_ASSISTANT.") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1301 (set-process-filter idlwave-help-assistant-process nil) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1302 (setq idlwave-help-assistant-socket |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1303 (open-network-stream "IDL_ASSISTANT_SOCK" |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1304 nil "localhost" port)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1305 (if (eq (process-status idlwave-help-assistant-socket) 'open) |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1306 (progn |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1307 (process-send-string idlwave-help-assistant-socket |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1308 (concat "setHelpPath " help-loc "\n")) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1309 t) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1310 (idlwave-help-assistant-close) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1311 (error "Cannot communicate with IDL_ASSISTANT")))))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1312 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1313 (defun idlwave-help-assistant-raise () |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1314 (idlwave-help-assistant-start) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1315 (process-send-string idlwave-help-assistant-socket "raise\n")) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1316 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1317 (defun idlwave-help-assistant-open-link (&optional link) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1318 ;; Open a link (file name with anchor, no leading path) in the assistant. |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1319 (let ((help-loc (idlwave-html-help-location)) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1320 topic anchor file just-started exists full-link) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1321 |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1322 (if (string-match "\.html" link) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1323 (setq topic (substring link 0 (match-beginning 0)) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1324 anchor (substring link (match-end 0))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1325 (error "Malformed help link.")) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1326 |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1327 (setq file (expand-file-name (concat topic ".html") help-loc)) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1328 (if (file-exists-p file) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1329 (setq exists t) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1330 (setq file (expand-file-name |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1331 (concat (upcase topic) ".html") help-loc)) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1332 (setq exists (file-exists-p file))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1333 |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1334 (setq full-link (concat file anchor) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1335 just-started (idlwave-help-assistant-start (if exists full-link))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1336 (if exists |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1337 (progn |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1338 (if (not just-started) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1339 (process-send-string idlwave-help-assistant-socket |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1340 (concat "openLink " full-link "\n"))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1341 (process-send-string idlwave-help-assistant-socket |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1342 (concat "searchIndexNoOpen " topic "\n"))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1343 (process-send-string idlwave-help-assistant-socket |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1344 (concat "searchIndexAndOpen " topic "\n")))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1345 (idlwave-help-assistant-raise)) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1346 |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1347 (defvar idlwave-help-assistant-help-with-topic-history nil |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1348 "The history of help topics selected with the minibuffer.") |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1349 |
85686
a55a536ce0db
* emulation/pc-select.el (next-line-mark, next-line-nomark)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78234
diff
changeset
|
1350 (defvar idlwave-system-routines) |
a55a536ce0db
* emulation/pc-select.el (next-line-mark, next-line-nomark)
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78234
diff
changeset
|
1351 |
74105
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1352 (defun idlwave-help-assistant-help-with-topic (&optional topic) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1353 "Prompt for and provide help with TOPIC." |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1354 (interactive) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1355 (let (list) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1356 (unless topic |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1357 (idlwave-routines) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1358 (setq list (append (mapcar (lambda (x) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1359 (concat (nth 2 x) (car x))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1360 idlwave-system-routines) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1361 (mapcar (lambda (x) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1362 (concat "." (car x))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1363 idlwave-executive-commands-alist) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1364 idlwave-system-class-info)) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1365 (setq topic |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1366 (idlwave-completing-read |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1367 "Help Topic: " list |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1368 nil nil nil |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1369 'idlwave-help-assistant-help-with-topic-history))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1370 (if (and topic (not (string= topic ""))) |
280766a0721d
(idlwave-html-help-location): Fail gracefully for missing help packages.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
70137
diff
changeset
|
1371 (idlwave-help-assistant-open-link (concat topic ".html"))))) |
69821
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1372 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1373 (defun idlwave-help-assistant-close () |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1374 (when (and idlwave-help-assistant-process |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1375 (eq (process-status idlwave-help-assistant-process) 'run)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1376 (when idlwave-help-assistant-socket |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1377 (process-send-string idlwave-help-assistant-socket "quit\n") |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1378 (delete-process idlwave-help-assistant-socket)) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1379 (stop-process idlwave-help-assistant-process) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1380 (delete-process idlwave-help-assistant-process) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1381 (setq idlwave-help-assistant-socket nil |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1382 idlwave-help-assistant-process nil))) |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1383 |
5baeec79c0cd
Update to IDLWAVE version 6.0; see idlwave.org.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
68773
diff
changeset
|
1384 |
58295
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1385 (provide 'idlw-help) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1386 (provide 'idlwave-help) |
fda404732a9a
Initial checkin of HTML help support module.
J.D. Smith <jdsmith@as.arizona.edu>
parents:
diff
changeset
|
1387 |
58296 | 1388 ;; arch-tag: d27b5505-59de-497f-ba3f-f199fd4fb911 |
1389 ;;; idlw-help.el ends here |