]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/idlw-help.el
C++ Mode: attribute in class declaration fouls up indentation. Fix!
[gnu-emacs] / lisp / progmodes / idlw-help.el
index 0e44e5366ca4a9a35e57fb15f2e0208700014301..9a3199fedaad4932ae979c04b43483c2847fbb42 100644 (file)
@@ -1,11 +1,10 @@
 ;;; idlw-help.el --- HTML Help code for IDLWAVE
 
-;; Copyright (C) 2000-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2016 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.
@@ -33,7 +32,7 @@
 ;; along with new versions of IDLWAVE, documentation, and more
 ;; information, at:
 ;;
-;;           http://idlwave.org
+;;           http://github.com/jdtsmith/idlwave
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 \f
@@ -90,16 +89,15 @@ Defaults to `browse-url-browser-function', which see."
 (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.
@@ -227,6 +225,7 @@ support."
                              (interactive "p")
                              (scroll-up arg)))
     (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)
@@ -435,7 +434,7 @@ It collects and prints the diagnostics messages."
 
        ;; A system variable -- only system help
        ((string-match
-        "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?"
+        "\\`!\\([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)
@@ -1178,15 +1177,13 @@ Useful when source code is displayed as help.  See the option
   (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)
@@ -1315,7 +1312,7 @@ IDL assistant.")
   (let ((help-loc (idlwave-html-help-location))
        topic anchor file just-started exists full-link)
 
-    (if (string-match "\.html" link)
+    (if (string-match "\\.html" link)
        (setq topic (substring link 0 (match-beginning 0))
              anchor (substring link (match-end 0)))
       (error "Malformed help link"))