[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/idlwave 28e40c7183 088/360: - Added localized doclib su
From: |
ELPA Syncer |
Subject: |
[elpa] externals/idlwave 28e40c7183 088/360: - Added localized doclib support |
Date: |
Sun, 28 Apr 2024 00:59:11 -0400 (EDT) |
branch: externals/idlwave
commit 28e40c718365eaf2c3c5fd7dc23a9e5cc2530e01
Author: jdsmith <jdsmith>
Commit: jdsmith <jdsmith>
- Added localized doclib support
- Give context help on sysvar tags
---
idlw-help.el | 81 +++++++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 55 insertions(+), 26 deletions(-)
diff --git a/idlw-help.el b/idlw-help.el
index c2bea12763..c51092a485 100644
--- a/idlw-help.el
+++ b/idlw-help.el
@@ -148,6 +148,21 @@ definition is displayed instead."
:group 'idlwave-online-help
:type 'boolean)
+
+(defcustom idlwave-help-doclib-name "name"
+ "*A regexp for the heading word to search for in doclib headers
+which specifies the `name' section. Can be used for localization
+support."
+ :group 'idlwave-online-help
+ :type 'string)
+
+(defcustom idlwave-help-doclib-keyword "KEYWORD"
+ "*A regexp for the heading word to search for in doclib headers
+which specifies the `keywords' section. Can be used for localization
+support."
+ :group 'idlwave-online-help
+ :type 'string)
+
(defface idlwave-help-link-face
'((((class color)) (:foreground "Blue"))
(t (:weight bold)))
@@ -331,12 +346,22 @@ It collects and prints the diagnostics messages."
(st-ass (setq mod1 (list (cdr st-ass))))
;; A system variable -- only system help
- ((string-match "\\`!\\([a-zA-Z0-9_]+\\)" this-word)
+ ((string-match
+ "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?"
+ this-word)
(let* ((word (match-string-no-properties 1 this-word))
(entry (assq (idlwave-sintern-sysvar word)
idlwave-system-variables-alist))
+ (tag (match-string-no-properties 3 this-word))
+ (tag-target (if tag
+ (cdr
+ (assq (idlwave-sintern-sysvartag tag)
+ (cdr (assq 'tags entry))))))
(link (nth 1 (assq 'link entry))))
- (setq mod1 link)))
+ (if tag-target
+ (setq link (idlwave-substitute-link-target link
+ tag-target)))
+ (setq mod1 (list link))))
;; An executive command -- only system help
((string-match "^\\.[A-Z]+" this-word)
@@ -850,26 +875,26 @@ KEYWORD is ignored. Returns the point of match if
successful, nil otherwise."
(defun idlwave-help-find-in-doc-header (name type class keyword
&optional exact)
"Find the requested help in the doc-header above point.
-First checks if there is a doc-lib header which describes the correct routine.
-Then tries to find the KEYWORDS section and the KEYWORD, if given.
-Returns the point which should be window start of the help window.
-If EXACT is non-nil, the full help position must be found - down to the
-keyword requested. This setting is for context help, if the exact
-spot is needed.
+
+First checks if there is a doc-lib header which describes the correct
+routine. Then tries to find the KEYWORDS section and the KEYWORD, if
+given. Returns the point which should be window start of the help
+window. If EXACT is non-nil, the full help position must be found -
+down to the keyword requested. This setting is for context help, if
+the exact spot is needed.
+
If EXACT is nil, the position of the header is returned if it
describes the correct routine - even if the keyword description cannot
-be found.
-TYPE is ignored.
+be found. TYPE is ignored.
This function expects a more or less standard routine header. In
particlar it looks for the `NAME:' tag, either with a colon, or alone
on a line. Then `NAME:' must be followed by the routine name on the
-same or the next line.
-When KEYWORD is non-nil, looks first for a `KEYWORDS' section. It is
-amazing how inconsisten this is through some IDL libraries I have
-seen. We settle for a line containing an upper case \"KEYWORD\"
-string. If this line is not fould we search for the keyword anyway to
-increase the hit-rate
+same or the next line. When KEYWORD is non-nil, looks first for a
+`KEYWORDS' section. It is amazing how inconsisten this is through
+some IDL libraries I have seen. We settle for a line containing an
+upper case \"KEYWORD\" string. If this line is not fould we search
+for the keyword anyway to increase the hit-rate
When one of these sections exists we check for a line starting with any of
@@ -895,7 +920,9 @@ If there is a match, we assume it is the keyword
description."
;; NAME tag plus the routine name. The new version is from JD.
(name-re (concat
- "\\(^;+\\*?[ \t]*name\\([ \t]*:\\|[ \t]*$\\)[ \t]*\\(\n;+[
\t]*\\)*"
+ "\\(^;+\\*?[ \t]*"
+ idlwave-help-doclib-name
+ "\\([ \t]*:\\|[ \t]*$\\)[ \t]*\\(\n;+[ \t]*\\)*"
rname
"\\|"
"^;+[ \t]*"
@@ -907,12 +934,14 @@ If there is a match, we assume it is the keyword
description."
"\\(^;+.*\n\\)*"
"\\(" name-re "\\)"))
;; A keywords section
- (kwds-re "^;+[ \t]+KEYWORD PARAMETERS:[ \t]*$") ; hard
- (kwds-re2 (concat ; forgiving
- "^;+\\*?[ \t]*"
- "\\([-A-Z_ ]*KEYWORD[-A-Z_ ]*\\)"
- "\\(:\\|[ \t]*\n\\)"))
- ;; The keyword description line.
+ (kwds-re (concat ; forgiving
+ "^;+\\*?[ \t]*"
+ "\\([-A-Z_ ]*"
+ idlwave-help-doclib-keyword
+ "[-A-Z_ ]*\\)"
+ "\\(:\\|[ \t]*\n\\)"))
+
+ ;; The individual keyword description line.
(kwd-re (if keyword ; hard (well...)
(concat
"^;+[ \t]+"
@@ -940,8 +969,7 @@ If there is a match, we assume it is the keyword
description."
;; Try to find a keyword section, but don't force it.
(goto-char name-pos)
(if (let ((case-fold-search nil))
- (or (re-search-forward kwds-re dend t)
- (re-search-forward kwds-re2 dend t)))
+ (re-search-forward kwds-re dend t))
(setq kwds-pos (match-beginning 0)))
;; Find the keyword description
(if (or (let ((case-fold-search nil))
@@ -1065,7 +1093,8 @@ Useful when source code is displayed as help. See the
option
(defun idlwave-help-error (name type class keyword)
(error "Can't find help on %s%s %s"
- (idlwave-make-full-name class name)
+ (or (and (or class name) (idlwave-make-full-name class name))
+ "<unknown>")
(if keyword (format ", keyword %s" (upcase keyword)) "")
(if idlwave-html-help-location
""
- [elpa] externals/idlwave 177b0e4547 042/360: minor doc updates., (continued)
- [elpa] externals/idlwave 177b0e4547 042/360: minor doc updates., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 6cd69cfb75 054/360: XEmacs Package bundling code included., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave e079639d57 073/360: *** empty log message ***, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 1a8845034c 070/360:, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 40b446a90e 078/360: - Slight update for XEmacs, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 00f3758733 083/360: - Initial check-in., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 1ecae9e4c5 080/360: - Fixed non-edebug entering when stepping to new routines after a, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave cbc2128b09 081/360: - Follow savannah fix, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 629d2ce5ae 085/360: - Make beg- and end- unit-reg use definitions starting on a line., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 95e6d9030e 087/360: *** empty log message ***, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 28e40c7183 088/360: - Added localized doclib support,
ELPA Syncer <=
- [elpa] externals/idlwave 4ca15bc9d7 098/360: - Query new path info to save when using the menu item., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 9af997eaf9 131/360: - Query shell for structure tag completion if in the shell., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 3c675c9837 099/360: - New selection for new or old help link format ("#" vs "#wp")., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave af15d2b430 102/360: - Initial checkin for IDLv5.6 rinfo scanner, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 730fb31d4c 104/360: - Removed in favor of get_html_rinfo, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 15f070f9a9 107/360: - Executive command completion and help., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 69eacaa9a0 105/360: - Add option to skip certain catalogs (like CVS)., ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave f9fe85b7c8 124/360: - Support the new found-in property for supporting structure definitions, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 989e453a61 126/360: *** empty log message ***, ELPA Syncer, 2024/04/28
- [elpa] externals/idlwave 88c175cb50 132/360: - Check for browse-url., ELPA Syncer, 2024/04/28