;;; idlw-help.el --- HTML Help code for IDLWAVE
-;; Copyright (C) 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2015 Free Software Foundation, Inc.
;;
;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
;; Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
-;; Version: 6.1.22
;; Package: idlwave
;; This file is part of GNU Emacs.
;; along with new versions of IDLWAVE, documentation, and more
;; information, at:
;;
-;; http://idlwave.org
+;; http://github.com/jdtsmith/idlwave
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\f
(defcustom idlwave-help-browser-generic-program browse-url-generic-program
"Program to run if using `browse-url-generic-program'."
:group 'idlwave-online-help
- :type 'string)
-
-(defvar browse-url-generic-args)
+ :type '(choice (const nil) string))
+;; AFAICS, never used since it was introduced in 2004.
(defcustom idlwave-help-browser-generic-args
(if (boundp 'browse-url-generic-args)
browse-url-generic-args "")
"Program args to use if using `browse-url-generic-program'."
:group 'idlwave-online-help
- :type 'string)
+ :type '(repeat string))
(defcustom idlwave-help-browser-is-local nil
"Whether the browser will display locally in an Emacs window.
"Obsolete variable. See `idlwave-html-help-location'.")
(defcustom idlwave-help-use-dedicated-frame t
- "*Non-nil means, use a separate frame for Online Help if possible."
+ "Non-nil means, use a separate frame for Online Help if possible."
:group 'idlwave-online-help
:type 'boolean)
:type 'symbol)
(defcustom idlwave-help-fontify-source-code nil
- "*Non-nil means, fontify source code displayed as help like normal code."
+ "Non-nil means, fontify source code displayed as help like normal code."
:group 'idlwave-online-help
:type 'boolean)
(defcustom idlwave-help-source-try-header t
- "*Non-nil means, try to find help in routine header when displaying source.
+ "Non-nil means, try to find help in routine header when displaying source.
Routines which are not documented in the system manual use their source as
help text. When this variable is non-nil, we try to find a description of
the help item in the first routine doclib header above the routine definition.
(defcustom idlwave-help-doclib-name "name"
- "*A regexp for the heading word to search for in doclib headers
+ "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
+ "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
(define-key map "\C-m" (lambda (arg)
(interactive "p")
(scroll-up arg)))
- (define-key map " " 'scroll-up)
- (define-key map [delete] 'scroll-down)
+ (define-key map " " 'scroll-up-command)
+ (define-key map [?\S-\ ] 'scroll-down-command)
+ (define-key map [delete] 'scroll-down-command)
(define-key map "h" 'idlwave-help-find-header)
(define-key map "H" 'idlwave-help-find-first-header)
(define-key map "." 'idlwave-help-toggle-header-match-and-def)
;; we kill the help frame before the return-frame is selected.
;; To protect the workings, we wait for up to one second
;; and check if the return-frame *is* now selected.
- ;; This is marked "eperimental" since we are not sure when its OK.
+ ;; This is marked "experimental" since we are not sure when
+ ;; it's OK.
(let ((maxtime 1.0) (time 0.) (step 0.1))
(select-frame idlwave-help-return-frame)
(while (and (sit-for step)
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
+particular 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
+`KEYWORDS' section. It is amazing how inconsistent 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
+upper case \"KEYWORD\" string. If this line is not found 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
(if (featurep 'font-lock)
(let ((major-mode 'idlwave-mode)
(font-lock-verbose
- (if (interactive-p) font-lock-verbose nil))
- (syntax-table (syntax-table)))
- (unwind-protect
- (progn
- (set-syntax-table idlwave-mode-syntax-table)
- (set (make-local-variable 'font-lock-defaults)
- idlwave-font-lock-defaults)
- (font-lock-fontify-buffer))
- (set-syntax-table syntax-table)))))
+ (if (called-interactively-p 'interactive) font-lock-verbose nil)))
+ (with-syntax-table idlwave-mode-syntax-table
+ (set (make-local-variable 'font-lock-defaults)
+ idlwave-font-lock-defaults)
+ (if (fboundp 'font-lock-ensure)
+ (font-lock-ensure)
+ (font-lock-fontify-buffer))))))
(defun idlwave-help-error (name type class keyword)