emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/idlwave.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/idlwave.el
Date: Fri, 18 Oct 2002 04:13:01 -0400

Index: emacs/lisp/progmodes/idlwave.el
diff -c emacs/lisp/progmodes/idlwave.el:3.22 
emacs/lisp/progmodes/idlwave.el:3.23
*** emacs/lisp/progmodes/idlwave.el:3.22        Fri Sep 13 18:19:48 2002
--- emacs/lisp/progmodes/idlwave.el     Fri Oct 18 04:12:35 2002
***************
*** 5,11 ****
  ;;         Chris Chase <address@hidden>
  ;; Maintainer: J.D. Smith <address@hidden>
  ;; Version: 4.15
! ;; Date: $Date: 2002/09/13 22:19:48 $
  ;; Keywords: languages
  
  ;; This file is part of GNU Emacs.
--- 5,11 ----
  ;;         Chris Chase <address@hidden>
  ;; Maintainer: J.D. Smith <address@hidden>
  ;; Version: 4.15
! ;; Date: $Date: 2002/10/18 08:12:35 $
  ;; Keywords: languages
  
  ;; This file is part of GNU Emacs.
***************
*** 69,75 ****
  ;; A printable version of the documentation is available from the
  ;; maintainers webpage (see under SOURCE)
  ;;
! ;; 
  ;; ACKNOWLEDGMENTS
  ;; ===============
  ;;
--- 69,75 ----
  ;; A printable version of the documentation is available from the
  ;; maintainers webpage (see under SOURCE)
  ;;
! ;;
  ;; ACKNOWLEDGMENTS
  ;; ===============
  ;;
***************
*** 117,123 ****
  ;;   up inserting the character that expanded the abbrev after moving
  ;;   point backward, e.g., "\cl" expanded with a space becomes
  ;;   "LONG( )" with point before the close paren.  This is solved by
! ;;   using a temporary function in `post-command-hook' - not pretty, 
  ;;   but it works.
  ;;
  ;;   Tabs and spaces are treated equally as whitespace when filling a
--- 117,123 ----
  ;;   up inserting the character that expanded the abbrev after moving
  ;;   point backward, e.g., "\cl" expanded with a space becomes
  ;;   "LONG( )" with point before the close paren.  This is solved by
! ;;   using a temporary function in `post-command-hook' - not pretty,
  ;;   but it works.
  ;;
  ;;   Tabs and spaces are treated equally as whitespace when filling a
***************
*** 153,165 ****
        nil ;; We've got what we needed
      ;; We have the old or no custom-library, hack around it!
      (defmacro defgroup (&rest args) nil)
!     (defmacro defcustom (var value doc &rest args) 
        `(defvar ,var ,value ,doc))))
  
  (defgroup idlwave nil
    "Major mode for editing IDL .pro files"
    :tag "IDLWAVE"
!   :link '(url-link :tag "Home Page" 
                   "http://idlwave.org";)
    :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el"
                                "idlw-shell.el")
--- 153,165 ----
        nil ;; We've got what we needed
      ;; We have the old or no custom-library, hack around it!
      (defmacro defgroup (&rest args) nil)
!     (defmacro defcustom (var value doc &rest args)
        `(defvar ,var ,value ,doc))))
  
  (defgroup idlwave nil
    "Major mode for editing IDL .pro files"
    :tag "IDLWAVE"
!   :link '(url-link :tag "Home Page"
                   "http://idlwave.org";)
    :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el"
                                "idlw-shell.el")
***************
*** 265,272 ****
  
  (defcustom idlwave-auto-fill-split-string t
    "*If non-nil then auto fill will split strings with the IDL `+' operator.
! When the line end falls within a string, string concatenation with the 
! '+' operator will be used to distribute a long string over lines.  
  If nil and a string is split then a terminal beep and warning are issued.
  
  This variable is ignored when `idlwave-fill-comment-line-only' is
--- 265,272 ----
  
  (defcustom idlwave-auto-fill-split-string t
    "*If non-nil then auto fill will split strings with the IDL `+' operator.
! When the line end falls within a string, string concatenation with the
! '+' operator will be used to distribute a long string over lines.
  If nil and a string is split then a terminal beep and warning are issued.
  
  This variable is ignored when `idlwave-fill-comment-line-only' is
***************
*** 322,328 ****
  Initializing the routine info can take long, in particular if a large
  library catalog is involved.  When Emacs is idle for more than the number
  of seconds specified by this variable, it starts the initialization.
! The process is split into five steps, in order to keep possible work 
  interruption as short as possible.  If one of the steps finishes, and no
  user input has arrived in the mean time, initialization proceeds immediately
  to the next step.
--- 322,328 ----
  Initializing the routine info can take long, in particular if a large
  library catalog is involved.  When Emacs is idle for more than the number
  of seconds specified by this variable, it starts the initialization.
! The process is split into five steps, in order to keep possible work
  interruption as short as possible.  If one of the steps finishes, and no
  user input has arrived in the mean time, initialization proceeds immediately
  to the next step.
***************
*** 374,380 ****
               (const :tag "When saving a buffer" save-buffer)
               (const :tag "After a buffer was killed" kill-buffer)
               (const :tag "After a buffer was compiled successfully, update 
shell info" compile-buffer))))
!              
  (defcustom idlwave-rinfo-max-source-lines 5
    "*Maximum number of source files displayed in the Routine Info window.
  When an integer, it is the maximum number of source files displayed.
--- 374,380 ----
               (const :tag "When saving a buffer" save-buffer)
               (const :tag "After a buffer was killed" kill-buffer)
               (const :tag "After a buffer was compiled successfully, update 
shell info" compile-buffer))))
! 
  (defcustom idlwave-rinfo-max-source-lines 5
    "*Maximum number of source files displayed in the Routine Info window.
  When an integer, it is the maximum number of source files displayed.
***************
*** 419,425 ****
  (defcustom idlwave-special-lib-alist nil
    "Alist of regular expressions matching special library directories.
  When listing routine source locations, IDLWAVE gives a short hint where
! the file defining the routine is located.  By default it lists `SystemLib' 
  for routines in the system library `!DIR/lib' and `Library' for anything
  else.  This variable can define additional types.  The car of each entry
  is a regular expression matching the file name (they normally will match
--- 419,425 ----
  (defcustom idlwave-special-lib-alist nil
    "Alist of regular expressions matching special library directories.
  When listing routine source locations, IDLWAVE gives a short hint where
! the file defining the routine is located.  By default it lists `SystemLib'
  for routines in the system library `!DIR/lib' and `Library' for anything
  else.  This variable can define additional types.  The car of each entry
  is a regular expression matching the file name (they normally will match
***************
*** 513,519 ****
  be misleading."
    :group 'idlwave-online-help
    :type 'boolean)
!   
  
  (defgroup idlwave-completion nil
    "Completion options for IDLWAVE mode."
--- 513,519 ----
  be misleading."
    :group 'idlwave-online-help
    :type 'boolean)
! 
  
  (defgroup idlwave-completion nil
    "Completion options for IDLWAVE mode."
***************
*** 538,544 ****
  This variable determines the case (UPPER/lower/Capitalized...) of
  words inserted into the buffer by completion.  The preferred case can
  be specified separately for routine names, keywords, classes and
! methods. 
  This alist should therefore have entries for `routine' (normal
  functions and procedures, i.e. non-methods), `keyword', `class', and
  `method'.  Plausible values are
--- 538,544 ----
  This variable determines the case (UPPER/lower/Capitalized...) of
  words inserted into the buffer by completion.  The preferred case can
  be specified separately for routine names, keywords, classes and
! methods.
  This alist should therefore have entries for `routine' (normal
  functions and procedures, i.e. non-methods), `keyword', `class', and
  `method'.  Plausible values are
***************
*** 625,631 ****
  for which to assume this can be set here."
    :group 'idlwave-routine-info
    :type '(repeat (regexp :tag "Match method:")))
!   
  
  (defcustom idlwave-completion-show-classes 1
    "*Number of classes to show when completing object methods and keywords.
--- 625,631 ----
  for which to assume this can be set here."
    :group 'idlwave-routine-info
    :type '(repeat (regexp :tag "Match method:")))
! 
  
  (defcustom idlwave-completion-show-classes 1
    "*Number of classes to show when completing object methods and keywords.
***************
*** 690,696 ****
  specify if the class should be found during method and keyword
  completion, respectively.
  
! The alist may have additional entries specifying exceptions from the 
  keyword completion rule for specific methods, like INIT or
  GETPROPERTY.  In order to turn on class specification for the INIT
  method, add an entry (\"INIT\" . t).  The method name must be ALL-CAPS."
--- 690,696 ----
  specify if the class should be found during method and keyword
  completion, respectively.
  
! The alist may have additional entries specifying exceptions from the
  keyword completion rule for specific methods, like INIT or
  GETPROPERTY.  In order to turn on class specification for the INIT
  method, add an entry (\"INIT\" . t).  The method name must be ALL-CAPS."
***************
*** 714,720 ****
  value of the variable `idlwave-query-class'.
  
  When you specify a class, this information can be stored as a text
! property on the `->' arrow in the source code, so that during the same 
  editing session, IDLWAVE will not have to ask again.  When this
  variable is non-nil, IDLWAVE will store and reuse the class information.
  The class stored can be checked and removed with `\\[idlwave-routine-info]'
--- 714,720 ----
  value of the variable `idlwave-query-class'.
  
  When you specify a class, this information can be stored as a text
! property on the `->' arrow in the source code, so that during the same
  editing session, IDLWAVE will not have to ask again.  When this
  variable is non-nil, IDLWAVE will store and reuse the class information.
  The class stored can be checked and removed with `\\[idlwave-routine-info]'
***************
*** 1094,1100 ****
    :group 'idlwave-misc
    :type 'boolean)
  
! (defcustom idlwave-default-font-lock-items 
    '(pros-and-functions batch-files idlwave-idl-keywords label goto
                       common-blocks class-arrows)
    "Items which should be fontified on the default fontification level 2.
--- 1094,1100 ----
    :group 'idlwave-misc
    :type 'boolean)
  
! (defcustom idlwave-default-font-lock-items
    '(pros-and-functions batch-files idlwave-idl-keywords label goto
                       common-blocks class-arrows)
    "Items which should be fontified on the default fontification level 2.
***************
*** 1156,1180 ****
  ;;; and Carsten Dominik...
  
  ;; The following are the reserved words in IDL.  Maybe we should
! ;; highlight some more stuff as well?       
  ;; Procedure declarations.  Fontify keyword plus procedure name.
  (defvar idlwave-idl-keywords
!   ;; To update this regexp, update the list of keywords and 
    ;; evaluate the form.
!   ;;  (insert 
    ;;   (prin1-to-string
!   ;;    (concat 
    ;;     "\\<\\("
!   ;;     (regexp-opt 
    ;;      '("and" "or" "xor" "not"
!   ;;        "eq" "ge" "gt" "le" "lt" "ne" 
    ;;        "for" "do" "endfor"
!   ;;        "if" "then" "endif" "else" "endelse" 
    ;;        "case" "of" "endcase"
    ;;        "switch" "break" "continue" "endswitch"
    ;;        "begin" "end"
    ;;        "repeat" "until" "endrep"
!   ;;        "while" "endwhile" 
    ;;        "goto" "return"
    ;;        "inherits" "mod"
    ;;        "compile_opt" "forward_function"
--- 1156,1180 ----
  ;;; and Carsten Dominik...
  
  ;; The following are the reserved words in IDL.  Maybe we should
! ;; highlight some more stuff as well?
  ;; Procedure declarations.  Fontify keyword plus procedure name.
  (defvar idlwave-idl-keywords
!   ;; To update this regexp, update the list of keywords and
    ;; evaluate the form.
!   ;;  (insert
    ;;   (prin1-to-string
!   ;;    (concat
    ;;     "\\<\\("
!   ;;     (regexp-opt
    ;;      '("and" "or" "xor" "not"
!   ;;        "eq" "ge" "gt" "le" "lt" "ne"
    ;;        "for" "do" "endfor"
!   ;;        "if" "then" "endif" "else" "endelse"
    ;;        "case" "of" "endcase"
    ;;        "switch" "break" "continue" "endswitch"
    ;;        "begin" "end"
    ;;        "repeat" "until" "endrep"
!   ;;        "while" "endwhile"
    ;;        "goto" "return"
    ;;        "inherits" "mod"
    ;;        "compile_opt" "forward_function"
***************
*** 1196,1202 ****
          (2 font-lock-reference-face nil t)      ; block name
          (font-lock-match-c++-style-declaration-item-and-skip-to-next
           ;; Start with point after block name and comma
!          (goto-char (match-end 0))  ; needed for XEmacs, could be nil 
           nil
           (1 font-lock-variable-name-face)       ; variable names
           )))
--- 1196,1202 ----
          (2 font-lock-reference-face nil t)      ; block name
          (font-lock-match-c++-style-declaration-item-and-skip-to-next
           ;; Start with point after block name and comma
!          (goto-char (match-end 0))  ; needed for XEmacs, could be nil
           nil
           (1 font-lock-variable-name-face)       ; variable names
           )))
***************
*** 1249,1255 ****
         ;; All operators (not used because too noisy)
         (all-operators
        '("[-*^#+<>/]" (0 font-lock-keyword-face)))
!       
         ;; Arrows with text property `idlwave-class'
         (class-arrows
        '(idlwave-match-class-arrows (0 idlwave-class-arrow-face))))
--- 1249,1255 ----
         ;; All operators (not used because too noisy)
         (all-operators
        '("[-*^#+<>/]" (0 font-lock-keyword-face)))
! 
         ;; Arrows with text property `idlwave-class'
         (class-arrows
        '(idlwave-match-class-arrows (0 idlwave-class-arrow-face))))
***************
*** 1286,1299 ****
  
  (defvar idlwave-font-lock-defaults
    '((idlwave-font-lock-keywords
!      idlwave-font-lock-keywords-1 
       idlwave-font-lock-keywords-2
       idlwave-font-lock-keywords-3)
!     nil t 
!     ((?$ . "w") (?_ . "w") (?. . "w")) 
      beginning-of-line))
  
! (put 'idlwave-mode 'font-lock-defaults 
       idlwave-font-lock-defaults) ; XEmacs
  
  (defconst idlwave-comment-line-start-skip "^[ \t]*;"
--- 1286,1299 ----
  
  (defvar idlwave-font-lock-defaults
    '((idlwave-font-lock-keywords
!      idlwave-font-lock-keywords-1
       idlwave-font-lock-keywords-2
       idlwave-font-lock-keywords-3)
!     nil t
!     ((?$ . "w") (?_ . "w") (?. . "w"))
      beginning-of-line))
  
! (put 'idlwave-mode 'font-lock-defaults
       idlwave-font-lock-defaults) ; XEmacs
  
  (defconst idlwave-comment-line-start-skip "^[ \t]*;"
***************
*** 1301,1307 ****
  That is the _beginning_ of a line containing a comment delimiter `;' preceded
  only by whitespace.")
  
! (defconst idlwave-begin-block-reg 
    "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>"
    "Regular expression to find the beginning of a block. The case does
  not matter. The search skips matches in comments.")
--- 1301,1307 ----
  That is the _beginning_ of a line containing a comment delimiter `;' preceded
  only by whitespace.")
  
! (defconst idlwave-begin-block-reg
    "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>"
    "Regular expression to find the beginning of a block. The case does
  not matter. The search skips matches in comments.")
***************
*** 1376,1382 ****
     '(switch . ("switch\\>" nil))
     (cons 'call (list (concat idlwave-identifier "\\(\\s *$\\|\\s *,\\)") nil))
     '(assign . ("[^=>\n]*=" nil)))
!   
    "Associated list of statement matching regular expressions.
  Each regular expression matches the start of an IDL statement.  The
  first element of each association is a symbol giving the statement
--- 1376,1382 ----
     '(switch . ("switch\\>" nil))
     (cons 'call (list (concat idlwave-identifier "\\(\\s *$\\|\\s *,\\)") nil))
     '(assign . ("[^=>\n]*=" nil)))
! 
    "Associated list of statement matching regular expressions.
  Each regular expression matches the start of an IDL statement.  The
  first element of each association is a symbol giving the statement
***************
*** 1399,1405 ****
  ;; Note that this is documented in the v18 manuals as being a string
  ;; of length one rather than a single character.
  ;; The code in this file accepts either format for compatibility.
! (defvar idlwave-comment-indent-char ?\ 
    "Character to be inserted for IDL comment indentation.
  Normally a space.")
  
--- 1399,1405 ----
  ;; Note that this is documented in the v18 manuals as being a string
  ;; of length one rather than a single character.
  ;; The code in this file accepts either format for compatibility.
! (defvar idlwave-comment-indent-char ?\
    "Character to be inserted for IDL comment indentation.
  Normally a space.")
  
***************
*** 1572,1583 ****
         (not (equal idlwave-shell-debug-modifiers '())))
    ;; Bind the debug commands also with the special modifiers.
    (let ((shift (memq 'shift idlwave-shell-debug-modifiers))
!       (mods-noshift (delq 'shift 
                            (copy-sequence idlwave-shell-debug-modifiers))))
!     (define-key idlwave-mode-map 
        (vector (append mods-noshift (list (if shift ?C ?c))))
        'idlwave-shell-save-and-run)
!     (define-key idlwave-mode-map 
        (vector (append mods-noshift (list (if shift ?B ?b))))
        'idlwave-shell-break-here)))
  (define-key idlwave-mode-map "\C-c\C-f" 'idlwave-for)
--- 1572,1583 ----
         (not (equal idlwave-shell-debug-modifiers '())))
    ;; Bind the debug commands also with the special modifiers.
    (let ((shift (memq 'shift idlwave-shell-debug-modifiers))
!       (mods-noshift (delq 'shift
                            (copy-sequence idlwave-shell-debug-modifiers))))
!     (define-key idlwave-mode-map
        (vector (append mods-noshift (list (if shift ?C ?c))))
        'idlwave-shell-save-and-run)
!     (define-key idlwave-mode-map
        (vector (append mods-noshift (list (if shift ?B ?b))))
        'idlwave-shell-break-here)))
  (define-key idlwave-mode-map "\C-c\C-f" 'idlwave-for)
***************
*** 1605,1611 ****
  (define-key idlwave-mode-map [(meta tab)] 'idlwave-complete)
  (define-key idlwave-mode-map "\C-c\C-i"   'idlwave-update-routine-info)
  (define-key idlwave-mode-map "\C-c="      'idlwave-resolve)
! (define-key idlwave-mode-map 
    (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)])
    'idlwave-mouse-context-help)
  
--- 1605,1611 ----
  (define-key idlwave-mode-map [(meta tab)] 'idlwave-complete)
  (define-key idlwave-mode-map "\C-c\C-i"   'idlwave-update-routine-info)
  (define-key idlwave-mode-map "\C-c="      'idlwave-resolve)
! (define-key idlwave-mode-map
    (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)])
    'idlwave-mouse-context-help)
  
***************
*** 1615,1621 ****
  (idlwave-action-and-binding "&"  '(idlwave-surround -1 -1))
  (idlwave-action-and-binding "<"  '(idlwave-surround -1 -1))
  ;; Binding works for both > and ->, by changing the length of the token.
! (idlwave-action-and-binding ">"  '(idlwave-surround -1 -1 '(?-) 1 
                                                    'idlwave-gtr-pad-hook))
  (idlwave-action-and-binding "->" '(idlwave-surround -1 -1 nil 2) t)
  (idlwave-action-and-binding ","  '(idlwave-surround 0 -1))
--- 1615,1621 ----
  (idlwave-action-and-binding "&"  '(idlwave-surround -1 -1))
  (idlwave-action-and-binding "<"  '(idlwave-surround -1 -1))
  ;; Binding works for both > and ->, by changing the length of the token.
! (idlwave-action-and-binding ">"  '(idlwave-surround -1 -1 '(?-) 1
                                                    'idlwave-gtr-pad-hook))
  (idlwave-action-and-binding "->" '(idlwave-surround -1 -1 nil 2) t)
  (idlwave-action-and-binding ","  '(idlwave-surround 0 -1))
***************
*** 1648,1654 ****
        (error (apply 'define-abbrev args)))))
  
  (condition-case nil
!     (modify-syntax-entry (string-to-char idlwave-abbrev-start-char) 
                         "w" idlwave-mode-syntax-table)
    (error nil))
  
--- 1648,1654 ----
        (error (apply 'define-abbrev args)))))
  
  (condition-case nil
!     (modify-syntax-entry (string-to-char idlwave-abbrev-start-char)
                         "w" idlwave-mode-syntax-table)
    (error nil))
  
***************
*** 1721,1727 ****
  (idlwave-define-abbrev "s"  "size()"       (idlwave-keyword-abbrev 1))
  (idlwave-define-abbrev "wi" "widget_info()" (idlwave-keyword-abbrev 1))
  (idlwave-define-abbrev "wc" "widget_control," (idlwave-keyword-abbrev 0))
!   
  ;; This section is reserved words only. (From IDL user manual)
  ;;
  (idlwave-define-abbrev "and"        "and"       (idlwave-keyword-abbrev 0 t) 
t)
--- 1721,1727 ----
  (idlwave-define-abbrev "s"  "size()"       (idlwave-keyword-abbrev 1))
  (idlwave-define-abbrev "wi" "widget_info()" (idlwave-keyword-abbrev 1))
  (idlwave-define-abbrev "wc" "widget_control," (idlwave-keyword-abbrev 0))
! 
  ;; This section is reserved words only. (From IDL user manual)
  ;;
  (idlwave-define-abbrev "and"        "and"       (idlwave-keyword-abbrev 0 t) 
t)
***************
*** 1770,1776 ****
  (defvar imenu-extract-index-name-function)
  (defvar imenu-prev-index-position-function)
  ;; defined later - so just make the compiler hush
! (defvar idlwave-mode-menu)  
  (defvar idlwave-mode-debug-menu)
  
  ;;;###autoload
--- 1770,1776 ----
  (defvar imenu-extract-index-name-function)
  (defvar imenu-prev-index-position-function)
  ;; defined later - so just make the compiler hush
! (defvar idlwave-mode-menu)
  (defvar idlwave-mode-debug-menu)
  
  ;;;###autoload
***************
*** 1852,1858 ****
     \\i         IF statement template
     \\elif      IF-ELSE statement template
     \\b         BEGIN
!    
     For a full list, use \\[idlwave-list-abbrevs].  Some templates also have
     direct keybindings - see the list of keybindings below.
  
--- 1852,1858 ----
     \\i         IF statement template
     \\elif      IF-ELSE statement template
     \\b         BEGIN
! 
     For a full list, use \\[idlwave-list-abbrevs].  Some templates also have
     direct keybindings - see the list of keybindings below.
  
***************
*** 1893,1918 ****
  
    (interactive)
    (kill-all-local-variables)
!   
    (if idlwave-startup-message
        (message "Emacs IDLWAVE mode version %s." idlwave-mode-version))
    (setq idlwave-startup-message nil)
!   
    (setq local-abbrev-table idlwave-mode-abbrev-table)
    (set-syntax-table idlwave-mode-syntax-table)
!   
    (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action)
!   
    (make-local-variable idlwave-comment-indent-function)
    (set idlwave-comment-indent-function 'idlwave-comment-hook)
!   
    (set (make-local-variable 'comment-start-skip) ";+[ \t]*")
    (set (make-local-variable 'comment-start) ";")
    (set (make-local-variable 'require-final-newline) t)
    (set (make-local-variable 'abbrev-all-caps) t)
    (set (make-local-variable 'indent-tabs-mode) nil)
    (set (make-local-variable 'completion-ignore-case) t)
!   
    (use-local-map idlwave-mode-map)
  
    (when (featurep 'easymenu)
--- 1893,1918 ----
  
    (interactive)
    (kill-all-local-variables)
! 
    (if idlwave-startup-message
        (message "Emacs IDLWAVE mode version %s." idlwave-mode-version))
    (setq idlwave-startup-message nil)
! 
    (setq local-abbrev-table idlwave-mode-abbrev-table)
    (set-syntax-table idlwave-mode-syntax-table)
! 
    (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action)
! 
    (make-local-variable idlwave-comment-indent-function)
    (set idlwave-comment-indent-function 'idlwave-comment-hook)
! 
    (set (make-local-variable 'comment-start-skip) ";+[ \t]*")
    (set (make-local-variable 'comment-start) ";")
    (set (make-local-variable 'require-final-newline) t)
    (set (make-local-variable 'abbrev-all-caps) t)
    (set (make-local-variable 'indent-tabs-mode) nil)
    (set (make-local-variable 'completion-ignore-case) t)
! 
    (use-local-map idlwave-mode-map)
  
    (when (featurep 'easymenu)
***************
*** 1922,1941 ****
    (setq mode-name "IDLWAVE")
    (setq major-mode 'idlwave-mode)
    (setq abbrev-mode t)
!   
    (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill)
    (setq comment-end "")
    (set (make-local-variable 'comment-multi-line) nil)
!   (set (make-local-variable 'paragraph-separate) 
         "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$")
    (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]")
    (set (make-local-variable 'paragraph-ignore-fill-prefix) nil)
    (set (make-local-variable 'parse-sexp-ignore-comments) t)
!   
    ;; Set tag table list to use IDLTAGS as file name.
    (if (boundp 'tag-table-alist)
        (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS")))
!   
    ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow
    ;; Following line is for Emacs - XEmacs uses the corresponding porperty
    ;; on the `idlwave-mode' symbol.
--- 1922,1941 ----
    (setq mode-name "IDLWAVE")
    (setq major-mode 'idlwave-mode)
    (setq abbrev-mode t)
! 
    (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill)
    (setq comment-end "")
    (set (make-local-variable 'comment-multi-line) nil)
!   (set (make-local-variable 'paragraph-separate)
         "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$")
    (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]")
    (set (make-local-variable 'paragraph-ignore-fill-prefix) nil)
    (set (make-local-variable 'parse-sexp-ignore-comments) t)
! 
    ;; Set tag table list to use IDLTAGS as file name.
    (if (boundp 'tag-table-alist)
        (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS")))
! 
    ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow
    ;; Following line is for Emacs - XEmacs uses the corresponding porperty
    ;; on the `idlwave-mode' symbol.
***************
*** 2063,2069 ****
  (defvar zmacs-regions)
  (defvar mark-active)
  (defun idlwave-region-active-p ()
!   "Is transien-mark-mode on an the region active?
  Works on both Emacs and XEmacs."
    (if (featurep 'xemacs)
        (and zmacs-regions (region-active-p))
--- 2063,2069 ----
  (defvar zmacs-regions)
  (defvar mark-active)
  (defun idlwave-region-active-p ()
!   "Is transien-mark-mode on and the region active?
  Works on both Emacs and XEmacs."
    (if (featurep 'xemacs)
        (and zmacs-regions (region-active-p))
***************
*** 2107,2113 ****
         (eol-pos (save-excursion (end-of-line) (point)))
         begin-pos end-pos end end1 )
      (if idlwave-reindent-end  (idlwave-indent-line))
!     
      (when (and (idlwave-check-abbrev 0 t)
               idlwave-show-block)
        (save-excursion
--- 2107,2113 ----
         (eol-pos (save-excursion (end-of-line) (point)))
         begin-pos end-pos end end1 )
      (if idlwave-reindent-end  (idlwave-indent-line))
! 
      (when (and (idlwave-check-abbrev 0 t)
               idlwave-show-block)
        (save-excursion
***************
*** 2120,2126 ****
        (if (> end-pos eol-pos)
            (setq end-pos pos))
        (goto-char end-pos)
!       (setq end (buffer-substring 
                   (progn
                     (skip-chars-backward "a-zA-Z")
                     (point))
--- 2120,2126 ----
        (if (> end-pos eol-pos)
            (setq end-pos pos))
        (goto-char end-pos)
!       (setq end (buffer-substring
                   (progn
                     (skip-chars-backward "a-zA-Z")
                     (point))
***************
*** 2142,2148 ****
            (sit-for 1))
           (t
            (beep)
!           (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" 
                     end1 end)
            (sit-for 1)))))))
    (delete-char 1))
--- 2142,2148 ----
            (sit-for 1))
           (t
            (beep)
!           (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?"
                     end1 end)
            (sit-for 1)))))))
    (delete-char 1))
***************
*** 2154,2161 ****
         ((looking-at "pro\\|case\\|switch\\|function\\>")
        (assoc (downcase (match-string 0)) idlwave-block-matches))
         ((looking-at "begin\\>")
!       (let ((limit (save-excursion 
!                      (idlwave-beginning-of-statement) 
                       (point))))
          (cond
           ((re-search-backward idlwave-block-match-regexp limit t)
--- 2154,2161 ----
         ((looking-at "pro\\|case\\|switch\\|function\\>")
        (assoc (downcase (match-string 0)) idlwave-block-matches))
         ((looking-at "begin\\>")
!       (let ((limit (save-excursion
!                      (idlwave-beginning-of-statement)
                       (point))))
          (cond
           ((re-search-backward idlwave-block-match-regexp limit t)
***************
*** 2183,2191 ****
      (insert "end")
      (idlwave-show-begin)))
  
! (defun idlwave-gtr-pad-hook (char) 
    "Let the > symbol expand around -> if present.  The new token length
! is returned."  
    2)
  
  (defun idlwave-surround (&optional before after escape-chars length ec-hook)
--- 2183,2191 ----
      (insert "end")
      (idlwave-show-begin)))
  
! (defun idlwave-gtr-pad-hook (char)
    "Let the > symbol expand around -> if present.  The new token length
! is returned."
    2)
  
  (defun idlwave-surround (&optional before after escape-chars length ec-hook)
***************
*** 2215,2222 ****
      (let* ((length (or length 1)) ; establish a default for LENGTH
           (prev-char (char-after (- (point) (1+ length)))))
        (when (or (not (memq prev-char escape-chars))
!               (and (fboundp ec-hook) 
!                    (setq length 
                           (save-excursion (funcall ec-hook prev-char)))))
        (backward-char length)
        (save-restriction
--- 2215,2222 ----
      (let* ((length (or length 1)) ; establish a default for LENGTH
           (prev-char (char-after (- (point) (1+ length)))))
        (when (or (not (memq prev-char escape-chars))
!               (and (fboundp ec-hook)
!                    (setq length
                           (save-excursion (funcall ec-hook prev-char)))))
        (backward-char length)
        (save-restriction
***************
*** 2438,2444 ****
          (let ((eos (save-excursion
                       (idlwave-block-jump-out -1 'nomark)
                       (point))))
!           (if (setq status (idlwave-find-key 
                            idlwave-end-block-reg -1 'nomark eos))
                (idlwave-beginning-of-statement)
              (message "No nested block before beginning of containing 
block.")))
--- 2438,2444 ----
          (let ((eos (save-excursion
                       (idlwave-block-jump-out -1 'nomark)
                       (point))))
!           (if (setq status (idlwave-find-key
                            idlwave-end-block-reg -1 'nomark eos))
                (idlwave-beginning-of-statement)
              (message "No nested block before beginning of containing 
block.")))
***************
*** 2446,2452 ****
        (let ((eos (save-excursion
                     (idlwave-block-jump-out 1 'nomark)
                     (point))))
!         (if (setq status (idlwave-find-key 
                          idlwave-begin-block-reg 1 'nomark eos))
              (idlwave-end-of-statement)
            (message "No nested block before end of containing block."))))
--- 2446,2452 ----
        (let ((eos (save-excursion
                     (idlwave-block-jump-out 1 'nomark)
                     (point))))
!         (if (setq status (idlwave-find-key
                          idlwave-begin-block-reg 1 'nomark eos))
              (idlwave-end-of-statement)
            (message "No nested block before end of containing block."))))
***************
*** 2460,2466 ****
          (here (point)))
      (goto-char (point-max))
      (if (re-search-backward idlwave-doclib-start nil t)
!         (progn 
          (setq beg (progn (beginning-of-line) (point)))
          (if (re-search-forward idlwave-doclib-end nil t)
              (progn
--- 2460,2466 ----
          (here (point)))
      (goto-char (point-max))
      (if (re-search-backward idlwave-doclib-start nil t)
!         (progn
          (setq beg (progn (beginning-of-line) (point)))
          (if (re-search-forward idlwave-doclib-end nil t)
              (progn
***************
*** 2494,2500 ****
     ((eq major-mode 'idlwave-shell-mode)
      (if (re-search-backward idlwave-shell-prompt-pattern nil t)
        (goto-char (match-end 0))))
!    (t 
      (if (save-excursion (forward-line -1) (idlwave-is-continuation-line))
        (idlwave-previous-statement)
        (beginning-of-line)))))
--- 2494,2500 ----
     ((eq major-mode 'idlwave-shell-mode)
      (if (re-search-backward idlwave-shell-prompt-pattern nil t)
        (goto-char (match-end 0))))
!    (t
      (if (save-excursion (forward-line -1) (idlwave-is-continuation-line))
        (idlwave-previous-statement)
        (beginning-of-line)))))
***************
*** 2586,2592 ****
    ;; - not in parenthesis (like a[0:3])
    ;; - not followed by another ":" in explicit class, ala a->b::c
    ;; As many in this mode, this function is heuristic and not an exact
!   ;; parser. 
    (let* ((start (point))
         (eos (save-excursion (idlwave-end-of-statement) (point)))
         (end (idlwave-find-key ":" 1 'nomark eos)))
--- 2586,2592 ----
    ;; - not in parenthesis (like a[0:3])
    ;; - not followed by another ":" in explicit class, ala a->b::c
    ;; As many in this mode, this function is heuristic and not an exact
!   ;; parser.
    (let* ((start (point))
         (eos (save-excursion (idlwave-end-of-statement) (point)))
         (end (idlwave-find-key ":" 1 'nomark eos)))
***************
*** 2680,2701 ****
              ((null idlwave-pad-keyword)
               ;; Spaces should be removed at a keyword
               (idlwave-surround 0 0))
!             (t)))))          
  
  (defun idlwave-indent-and-action (&optional arg)
    "Call `idlwave-indent-line' and do expand actions.
  With prefix ARG non-nil, indent the entire sub-statement."
    (interactive "p")
    (save-excursion
!     (if       (and idlwave-expand-generic-end 
!            (re-search-backward "\\<\\(end\\)\\s-*\\=" 
                                 (max 0 (- (point) 10)) t)
             (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)"))
        (progn (goto-char (match-end 1))
               ;;Expand the END abbreviation, just as RET or Space would have.
               (if abbrev-mode (expand-abbrev)
                 (idlwave-show-begin)))))
!   (if arg 
        (idlwave-indent-statement)
      (idlwave-indent-line t)))
  
--- 2680,2701 ----
              ((null idlwave-pad-keyword)
               ;; Spaces should be removed at a keyword
               (idlwave-surround 0 0))
!             (t)))))
  
  (defun idlwave-indent-and-action (&optional arg)
    "Call `idlwave-indent-line' and do expand actions.
  With prefix ARG non-nil, indent the entire sub-statement."
    (interactive "p")
    (save-excursion
!     (if       (and idlwave-expand-generic-end
!            (re-search-backward "\\<\\(end\\)\\s-*\\="
                                 (max 0 (- (point) 10)) t)
             (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)"))
        (progn (goto-char (match-end 1))
               ;;Expand the END abbreviation, just as RET or Space would have.
               (if abbrev-mode (expand-abbrev)
                 (idlwave-show-begin)))))
!   (if arg
        (idlwave-indent-statement)
      (idlwave-indent-line t)))
  
***************
*** 2854,2860 ****
  
  (defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp)
    "Calculate the continuation indent inside a paren group.
! Returns a cons-cell with (open . indent), where open is the 
  location of the open paren"
    (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg))))
      ;; Found an innermost open paren.
--- 2854,2860 ----
  
  (defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp)
    "Calculate the continuation indent inside a paren group.
! Returns a cons-cell with (open . indent), where open is the
  location of the open paren"
    (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg))))
      ;; Found an innermost open paren.
***************
*** 2888,2894 ****
             (close-exp (progn (skip-chars-forward " \t") (looking-at "\\s)")))
  ;           (beg-reg (progn (idlwave-previous-statement) (point)))
             (beg-reg (progn ;; Use substatement indent unless it's this line
!                     (idlwave-start-of-substatement 'pre) 
                      (if (eq (line-beginning-position) end-reg)
                          (idlwave-previous-statement))
                      (point)))
--- 2888,2894 ----
             (close-exp (progn (skip-chars-forward " \t") (looking-at "\\s)")))
  ;           (beg-reg (progn (idlwave-previous-statement) (point)))
             (beg-reg (progn ;; Use substatement indent unless it's this line
!                     (idlwave-start-of-substatement 'pre)
                      (if (eq (line-beginning-position) end-reg)
                          (idlwave-previous-statement))
                      (point)))
***************
*** 2912,2925 ****
                    (goto-char (match-end 2)))
                (current-column))
  
!              ;; Continued assignment (with =), 
               ((looking-at "[ \t]*[][().a-zA-Z0-9$_]+[ \t]*\\(=\\)[ \t]*")
                (goto-char (match-end 0))
                ;; Comment only?  Align with =
                (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$"))
!                   (progn 
                      (goto-char (match-end 1))
!                     (if idlwave-surround-by-blank 
                          (1+ (current-column))
                        (current-column)))
                  (current-column))))))
--- 2912,2925 ----
                    (goto-char (match-end 2)))
                (current-column))
  
!              ;; Continued assignment (with =),
               ((looking-at "[ \t]*[][().a-zA-Z0-9$_]+[ \t]*\\(=\\)[ \t]*")
                (goto-char (match-end 0))
                ;; Comment only?  Align with =
                (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$"))
!                   (progn
                      (goto-char (match-end 1))
!                     (if idlwave-surround-by-blank
                          (1+ (current-column))
                        (current-column)))
                  (current-column))))))
***************
*** 2938,2950 ****
                     (< (- fancy-paren-indent basic-indent)
                        idlwave-max-extra-continuation-indent))))
            fancy-enclosing-paren-indent)
!       (cond 
         ;; else continuations are always standard
!        (else-cont 
        cur-indent)
  
         ;; an allowed parenthesis-indent
!        (fancy-paren-indent-allowed 
        fancy-paren-indent)
  
         ;; a disallowed paren indent nested inside one or more other
--- 2938,2950 ----
                     (< (- fancy-paren-indent basic-indent)
                        idlwave-max-extra-continuation-indent))))
            fancy-enclosing-paren-indent)
!       (cond
         ;; else continuations are always standard
!        (else-cont
        cur-indent)
  
         ;; an allowed parenthesis-indent
!        (fancy-paren-indent-allowed
        fancy-paren-indent)
  
         ;; a disallowed paren indent nested inside one or more other
***************
*** 2959,2965 ****
                         enclose-indent)
                     (catch 'loop
                       (while (setq enclose-indent-cons
!                                   (idlwave-calculate-paren-indent 
                                     beg-reg (max (1- enclose-open) beg-reg)
                                     nil)
                                    enclose-open   (car enclose-indent-cons)
--- 2959,2965 ----
                         enclose-indent)
                     (catch 'loop
                       (while (setq enclose-indent-cons
!                                   (idlwave-calculate-paren-indent
                                     beg-reg (max (1- enclose-open) beg-reg)
                                     nil)
                                    enclose-open   (car enclose-indent-cons)
***************
*** 2969,2977 ****
                             (throw 'loop enclose-indent)))))))
        (min fancy-paren-indent
             (+ fancy-enclosing-paren-indent idlwave-continuation-indent)))
!               
         ;; a disallowed paren indent inside another type: indent relative
!        ((and fancy-paren-indent       
             (not fancy-paren-indent-allowed)
             fancy-nonparen-indent-allowed )
        (+ fancy-nonparen-indent idlwave-continuation-indent))
--- 2969,2977 ----
                             (throw 'loop enclose-indent)))))))
        (min fancy-paren-indent
             (+ fancy-enclosing-paren-indent idlwave-continuation-indent)))
! 
         ;; a disallowed paren indent inside another type: indent relative
!        ((and fancy-paren-indent
             (not fancy-paren-indent-allowed)
             fancy-nonparen-indent-allowed )
        (+ fancy-nonparen-indent idlwave-continuation-indent))
***************
*** 2981,2987 ****
        fancy-nonparen-indent)
  
         ;; everything else
!        (t 
        basic-indent)))))
  
  (defun idlwave-find-key (key-re &optional dir nomark limit)
--- 2981,2987 ----
        fancy-nonparen-indent)
  
         ;; everything else
!        (t
        basic-indent)))))
  
  (defun idlwave-find-key (key-re &optional dir nomark limit)
***************
*** 3023,3029 ****
    (let* ((here (point))
           (case-fold-search t)
           (limit (if (>= dir 0) (point-max) (point-min)))
!          (block-limit (if (>= dir 0) 
                          idlwave-begin-block-reg
                        idlwave-end-block-reg))
           found
--- 3023,3029 ----
    (let* ((here (point))
           (case-fold-search t)
           (limit (if (>= dir 0) (point-max) (point-min)))
!          (block-limit (if (>= dir 0)
                          idlwave-begin-block-reg
                        idlwave-end-block-reg))
           found
***************
*** 3034,3040 ****
                               (idlwave-find-key
                                idlwave-begin-unit-reg dir t limit)
                             (end-of-line)
!                            (idlwave-find-key 
                              idlwave-end-unit-reg dir t limit)))
                         limit)))
      (if (>= dir 0) (end-of-line)) ;Make sure we are in current block
--- 3034,3040 ----
                               (idlwave-find-key
                                idlwave-begin-unit-reg dir t limit)
                             (end-of-line)
!                            (idlwave-find-key
                              idlwave-end-unit-reg dir t limit)))
                         limit)))
      (if (>= dir 0) (end-of-line)) ;Make sure we are in current block
***************
*** 3068,3077 ****
  Blank or comment-only lines following regular continuation lines (with
  `$') count as continuations too."
    (save-excursion
!     (or 
       (idlwave-look-at "\\<\\$")
       (catch 'loop
!        (while (and (looking-at "^[ \t]*\\(;.*\\)?$") 
                   (eq (forward-line -1) 0))
         (if (idlwave-look-at "\\<\\$") (throw 'loop t)))))))
  
--- 3068,3077 ----
  Blank or comment-only lines following regular continuation lines (with
  `$') count as continuations too."
    (save-excursion
!     (or
       (idlwave-look-at "\\<\\$")
       (catch 'loop
!        (while (and (looking-at "^[ \t]*\\(;.*\\)?$")
                   (eq (forward-line -1) 0))
         (if (idlwave-look-at "\\<\\$") (throw 'loop t)))))))
  
***************
*** 3169,3175 ****
                                            (beginning-of-line) (point))
                                          (point))))
                 "[^;]"))
!       
          ;; Mark the beginning and end of the paragraph
          (goto-char bcl)
          (while (and (looking-at fill-prefix-reg)
--- 3169,3175 ----
                                            (beginning-of-line) (point))
                                          (point))))
                 "[^;]"))
! 
          ;; Mark the beginning and end of the paragraph
          (goto-char bcl)
          (while (and (looking-at fill-prefix-reg)
***************
*** 3233,3239 ****
                        (insert (make-string diff ?\ ))))
                  (forward-line -1))
                )
!         
            ;; No hang. Instead find minimum indentation of paragraph
            ;; after first line.
            ;; For the following while statement, since START is at the
--- 3233,3239 ----
                        (insert (make-string diff ?\ ))))
                  (forward-line -1))
                )
! 
            ;; No hang. Instead find minimum indentation of paragraph
            ;; after first line.
            ;; For the following while statement, since START is at the
***************
*** 3265,3271 ****
                    t)
                   (current-column))
                 indent))
!       
          ;; try to keep point at its original place
          (goto-char here)
  
--- 3265,3271 ----
                    t)
                   (current-column))
                 indent))
! 
          ;; try to keep point at its original place
          (goto-char here)
  
***************
*** 3454,3460 ****
    (insert (current-time-string))
    (insert ", " (user-full-name))
    (if (boundp 'user-mail-address)
!       (insert " <" user-mail-address ">") 
      (insert " <" (user-login-name) "@" (system-name) ">"))
    ;; Remove extra spaces from line
    (idlwave-fill-paragraph)
--- 3454,3460 ----
    (insert (current-time-string))
    (insert ", " (user-full-name))
    (if (boundp 'user-mail-address)
!       (insert " <" user-mail-address ">")
      (insert " <" (user-login-name) "@" (system-name) ">"))
    ;; Remove extra spaces from line
    (idlwave-fill-paragraph)
***************
*** 3480,3486 ****
             (setq end (match-end 0)))
        (progn
          (goto-char beg)
!         (if (re-search-forward 
               (concat idlwave-doc-modifications-keyword ":")
               end t)
              (end-of-line)
--- 3480,3486 ----
             (setq end (match-end 0)))
        (progn
          (goto-char beg)
!         (if (re-search-forward
               (concat idlwave-doc-modifications-keyword ":")
               end t)
              (end-of-line)
***************
*** 3578,3584 ****
       (not (idlwave-in-quote))
       (save-excursion
         (forward-char)
!        (re-search-backward (concat "\\(" idlwave-idl-keywords 
                                   "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t)))))
  
  
--- 3578,3584 ----
       (not (idlwave-in-quote))
       (save-excursion
         (forward-char)
!        (re-search-backward (concat "\\(" idlwave-idl-keywords
                                   "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t)))))
  
  
***************
*** 3624,3630 ****
          (indent-region beg end nil))
        (if (stringp prompt)
          (message prompt)))))
!   
  (defun idlwave-rw-case (string)
    "Make STRING have the case required by `idlwave-reserved-word-upcase'."
    (if idlwave-reserved-word-upcase
--- 3624,3630 ----
          (indent-region beg end nil))
        (if (stringp prompt)
          (message prompt)))))
! 
  (defun idlwave-rw-case (string)
    "Make STRING have the case required by `idlwave-reserved-word-upcase'."
    (if idlwave-reserved-word-upcase
***************
*** 3642,3648 ****
  (defun idlwave-case ()
    "Build skeleton IDL case statement."
    (interactive)
!   (idlwave-template 
     (idlwave-rw-case "case")
     (idlwave-rw-case " of\n\nendcase")
     "Selector expression"))
--- 3642,3648 ----
  (defun idlwave-case ()
    "Build skeleton IDL case statement."
    (interactive)
!   (idlwave-template
     (idlwave-rw-case "case")
     (idlwave-rw-case " of\n\nendcase")
     "Selector expression"))
***************
*** 3650,3656 ****
  (defun idlwave-switch ()
    "Build skeleton IDL switch statement."
    (interactive)
!   (idlwave-template 
     (idlwave-rw-case "switch")
     (idlwave-rw-case " of\n\nendswitch")
     "Selector expression"))
--- 3650,3656 ----
  (defun idlwave-switch ()
    "Build skeleton IDL switch statement."
    (interactive)
!   (idlwave-template
     (idlwave-rw-case "switch")
     (idlwave-rw-case " of\n\nendswitch")
     "Selector expression"))
***************
*** 3658,3664 ****
  (defun idlwave-for ()
    "Build skeleton for loop statment."
    (interactive)
!   (idlwave-template 
     (idlwave-rw-case "for")
     (idlwave-rw-case " do begin\n\nendfor")
     "Loop expression"))
--- 3658,3664 ----
  (defun idlwave-for ()
    "Build skeleton for loop statment."
    (interactive)
!   (idlwave-template
     (idlwave-rw-case "for")
     (idlwave-rw-case " do begin\n\nendfor")
     "Loop expression"))
***************
*** 3673,3686 ****
  
  (defun idlwave-procedure ()
    (interactive)
!   (idlwave-template 
     (idlwave-rw-case "pro")
     (idlwave-rw-case "\n\nreturn\nend")
     "Procedure name"))
  
  (defun idlwave-function ()
    (interactive)
!   (idlwave-template 
     (idlwave-rw-case "function")
     (idlwave-rw-case "\n\nreturn\nend")
     "Function name"))
--- 3673,3686 ----
  
  (defun idlwave-procedure ()
    (interactive)
!   (idlwave-template
     (idlwave-rw-case "pro")
     (idlwave-rw-case "\n\nreturn\nend")
     "Procedure name"))
  
  (defun idlwave-function ()
    (interactive)
!   (idlwave-template
     (idlwave-rw-case "function")
     (idlwave-rw-case "\n\nreturn\nend")
     "Function name"))
***************
*** 3694,3700 ****
  
  (defun idlwave-while ()
    (interactive)
!   (idlwave-template 
     (idlwave-rw-case "while")
     (idlwave-rw-case " do begin\n\nendwhile")
     "Entry condition"))
--- 3694,3700 ----
  
  (defun idlwave-while ()
    (interactive)
!   (idlwave-template
     (idlwave-rw-case "while")
     (idlwave-rw-case " do begin\n\nendwhile")
     "Entry condition"))
***************
*** 3773,3780 ****
  (defun idlwave-count-outlawed-buffers (tag)
    "How many outlawed buffers have tag TAG?"
    (length (delq nil
!               (mapcar 
!                (lambda (x) (eq (cdr x) tag)) 
                 idlwave-outlawed-buffers))))
  
  (defun idlwave-do-kill-autoloaded-buffers (&rest reasons)
--- 3773,3780 ----
  (defun idlwave-count-outlawed-buffers (tag)
    "How many outlawed buffers have tag TAG?"
    (length (delq nil
!               (mapcar
!                (lambda (x) (eq (cdr x) tag))
                 idlwave-outlawed-buffers))))
  
  (defun idlwave-do-kill-autoloaded-buffers (&rest reasons)
***************
*** 3788,3796 ****
                   (memq (cdr entry) reasons))
               (kill-buffer (car entry))
               (incf cnt)
!              (setq idlwave-outlawed-buffers 
                     (delq entry idlwave-outlawed-buffers)))
!       (setq idlwave-outlawed-buffers 
              (delq entry idlwave-outlawed-buffers))))
      (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s"))))
  
--- 3788,3796 ----
                   (memq (cdr entry) reasons))
               (kill-buffer (car entry))
               (incf cnt)
!              (setq idlwave-outlawed-buffers
                     (delq entry idlwave-outlawed-buffers)))
!       (setq idlwave-outlawed-buffers
              (delq entry idlwave-outlawed-buffers))))
      (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s"))))
  
***************
*** 3802,3808 ****
         (entry (assq buf idlwave-outlawed-buffers)))
      ;; Revoke license
      (if entry
!       (setq idlwave-outlawed-buffers 
              (delq entry idlwave-outlawed-buffers)))
      ;; Remove this function from the hook.
      (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local)))
--- 3802,3808 ----
         (entry (assq buf idlwave-outlawed-buffers)))
      ;; Revoke license
      (if entry
!       (setq idlwave-outlawed-buffers
              (delq entry idlwave-outlawed-buffers)))
      ;; Remove this function from the hook.
      (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local)))
***************
*** 3819,3825 ****
            (throw 'exit efile))))))
  (defun idlwave-expand-lib-file-name (file)
    ;; Find FILE on the scanned lib path and return a buffer visiting it
!   (cond 
     ((null file) nil)
     ((string-match "\\`\\({\\([0-9]+\\)}/\\)\\(.*\\)" file)
      (expand-file-name (match-string 3 file)
--- 3819,3825 ----
            (throw 'exit efile))))))
  (defun idlwave-expand-lib-file-name (file)
    ;; Find FILE on the scanned lib path and return a buffer visiting it
!   (cond
     ((null file) nil)
     ((string-match "\\`\\({\\([0-9]+\\)}/\\)\\(.*\\)" file)
      (expand-file-name (match-string 3 file)
***************
*** 3838,3844 ****
    (interactive)
    (let (directory directories cmd append status numdirs dir getsubdirs
                  buffer save_buffer files numfiles item errbuf)
!     
      ;;
      ;; Read list of directories
      (setq directory (read-string "Tag Directories: " "."))
--- 3838,3844 ----
    (interactive)
    (let (directory directories cmd append status numdirs dir getsubdirs
                  buffer save_buffer files numfiles item errbuf)
! 
      ;;
      ;; Read list of directories
      (setq directory (read-string "Tag Directories: " "."))
***************
*** 3901,3913 ****
                  (setq numfiles (1+ numfiles))
                  (setq item (nth numfiles files))
                  )))
!           
            (setq numdirs (1+ numdirs))
            (setq dir (nth numdirs directories)))
        (progn
          (setq numdirs (1+ numdirs))
          (setq dir (nth numdirs directories)))))
!     
      (setq errbuf (get-buffer-create "*idltags-error*"))
      (if (= status 0)
        (kill-buffer errbuf))
--- 3901,3913 ----
                  (setq numfiles (1+ numfiles))
                  (setq item (nth numfiles files))
                  )))
! 
            (setq numdirs (1+ numdirs))
            (setq dir (nth numdirs directories)))
        (progn
          (setq numdirs (1+ numdirs))
          (setq dir (nth numdirs directories)))))
! 
      (setq errbuf (get-buffer-create "*idltags-error*"))
      (if (= status 0)
        (kill-buffer errbuf))
***************
*** 3958,3964 ****
  ;; substrings.  So most of the code can simply assume to deal with
  ;; "sinterned" strings.  The only exception is that the functions
  ;; which scan whole buffers for routine information do not intern the
! ;; grabbed strings.  This is only done afterwards.  Therefore in these 
  ;; functions it is *not* safe to assume the strings can be compared
  ;; with `eq' and be fed into the routine assq functions.
  
--- 3958,3964 ----
  ;; substrings.  So most of the code can simply assume to deal with
  ;; "sinterned" strings.  The only exception is that the functions
  ;; which scan whole buffers for routine information do not intern the
! ;; grabbed strings.  This is only done afterwards.  Therefore in these
  ;; functions it is *not* safe to assume the strings can be compared
  ;; with `eq' and be fed into the routine assq functions.
  
***************
*** 3976,3982 ****
    ;; Make sure the hash functions are accessible.
    (if (or (not (fboundp 'gethash))
          (not (fboundp 'puthash)))
!       (progn 
        (require 'cl)
        (or (fboundp 'puthash)
            (defalias 'puthash 'cl-puthash))))
--- 3976,3982 ----
    ;; Make sure the hash functions are accessible.
    (if (or (not (fboundp 'gethash))
          (not (fboundp 'puthash)))
!       (progn
        (require 'cl)
        (or (fboundp 'puthash)
            (defalias 'puthash 'cl-puthash))))
***************
*** 3995,4001 ****
        ;; Reset the system & library hash
        (loop for entry in entries
        for var = (car entry) for size = (nth 1 entry)
!       do (setcdr (symbol-value var) 
                   (make-hash-table ':size size ':test 'equal)))
        (setq idlwave-sint-files nil))
  
--- 3995,4001 ----
        ;; Reset the system & library hash
        (loop for entry in entries
        for var = (car entry) for size = (nth 1 entry)
!       do (setcdr (symbol-value var)
                   (make-hash-table ':size size ':test 'equal)))
        (setq idlwave-sint-files nil))
  
***************
*** 4004,4010 ****
        ;; Reset the buffer & shell hash
        (loop for entry in entries
        for var = (car entry) for size = (nth 1 entry)
!       do (setcar (symbol-value var) 
                   (make-hash-table ':size size ':test 'equal))))))
  
  (defun idlwave-sintern-routine-or-method (name &optional class set)
--- 4004,4010 ----
        ;; Reset the buffer & shell hash
        (loop for entry in entries
        for var = (car entry) for size = (nth 1 entry)
!       do (setcar (symbol-value var)
                   (make-hash-table ':size size ':test 'equal))))))
  
  (defun idlwave-sintern-routine-or-method (name &optional class set)
***************
*** 4213,4222 ****
                     "-l" (expand-file-name "~/.emacs")
                     "-l" "idlwave"
                     "-f" "idlwave-rescan-catalog-directories"))
!        (process (apply 'start-process "idlcat" 
                         nil emacs args)))
      (setq idlwave-catalog-process process)
!     (set-process-sentinel 
       process
       (lambda (pro why)
         (when (string-match "finished" why)
--- 4213,4222 ----
                     "-l" (expand-file-name "~/.emacs")
                     "-l" "idlwave"
                     "-f" "idlwave-rescan-catalog-directories"))
!        (process (apply 'start-process "idlcat"
                         nil emacs args)))
      (setq idlwave-catalog-process process)
!     (set-process-sentinel
       process
       (lambda (pro why)
         (when (string-match "finished" why)
***************
*** 4270,4276 ****
           ;; The override-idle means, even if the idle timer has done some
           ;; preparing work, load and renormalize everything anyway.
           (override-idle (or arg idlwave-buffer-case-takes-precedence)))
!       
        (setq idlwave-buffer-routines nil
            idlwave-compiled-routines nil
            idlwave-unresolved-routines nil)
--- 4270,4276 ----
           ;; The override-idle means, even if the idle timer has done some
           ;; preparing work, load and renormalize everything anyway.
           (override-idle (or arg idlwave-buffer-case-takes-precedence)))
! 
        (setq idlwave-buffer-routines nil
            idlwave-compiled-routines nil
            idlwave-unresolved-routines nil)
***************
*** 4281,4287 ****
        (idlwave-reset-sintern (cond (load t)
                                     ((null idlwave-system-routines) t)
                                     (t 'bufsh))))
!       
        (if idlwave-buffer-case-takes-precedence
          ;; We can safely scan the buffer stuff first
          (progn
--- 4281,4287 ----
        (idlwave-reset-sintern (cond (load t)
                                     ((null idlwave-system-routines) t)
                                     (t 'bufsh))))
! 
        (if idlwave-buffer-case-takes-precedence
          ;; We can safely scan the buffer stuff first
          (progn
***************
*** 4296,4302 ****
                                    (idlwave-shell-is-running)))
             (ask-shell (and shell-is-running
                             idlwave-query-shell-for-routine-info)))
!       
        (if (or (not ask-shell)
                (not (interactive-p)))
            ;; 1. If we are not going to ask the shell, we need to do the
--- 4296,4302 ----
                                    (idlwave-shell-is-running)))
             (ask-shell (and shell-is-running
                             idlwave-query-shell-for-routine-info)))
! 
        (if (or (not ask-shell)
                (not (interactive-p)))
            ;; 1. If we are not going to ask the shell, we need to do the
***************
*** 4307,4313 ****
            ;;    the current command.  Therefore, we do a concatenation
            ;;    now, even though the shell might do it again.
            (idlwave-concatenate-rinfo-lists nil t))
!       
        (when ask-shell
          ;; Ask the shell about the routines it knows.
          (message "Querying the shell")
--- 4307,4313 ----
            ;;    the current command.  Therefore, we do a concatenation
            ;;    now, even though the shell might do it again.
            (idlwave-concatenate-rinfo-lists nil t))
! 
        (when ask-shell
          ;; Ask the shell about the routines it knows.
          (message "Querying the shell")
***************
*** 4360,4366 ****
            (when (and (stringp idlwave-libinfo-file)
                       (file-regular-p idlwave-libinfo-file))
              (condition-case nil
!                 (progn 
                    (message "Loading library catalog in idle time...")
                    (load-file idlwave-libinfo-file)
                    (message "Loading library catalog in idle time...done")
--- 4360,4366 ----
            (when (and (stringp idlwave-libinfo-file)
                       (file-regular-p idlwave-libinfo-file))
              (condition-case nil
!                 (progn
                    (message "Loading library catalog in idle time...")
                    (load-file idlwave-libinfo-file)
                    (message "Loading library catalog in idle time...done")
***************
*** 4421,4431 ****
  
  (defun idlwave-update-buffer-routine-info ()
    (let (res)
!     (cond 
       ((eq idlwave-scan-all-buffers-for-routine-info t)
        ;; Scan all buffers, current buffer last
        (message "Scanning all buffers...")
!       (setq res (idlwave-get-routine-info-from-buffers 
                 (reverse (buffer-list)))))
       ((null idlwave-scan-all-buffers-for-routine-info)
        ;; Don't scan any buffers
--- 4421,4431 ----
  
  (defun idlwave-update-buffer-routine-info ()
    (let (res)
!     (cond
       ((eq idlwave-scan-all-buffers-for-routine-info t)
        ;; Scan all buffers, current buffer last
        (message "Scanning all buffers...")
!       (setq res (idlwave-get-routine-info-from-buffers
                 (reverse (buffer-list)))))
       ((null idlwave-scan-all-buffers-for-routine-info)
        ;; Don't scan any buffers
***************
*** 4438,4449 ****
            (setq res (idlwave-get-routine-info-from-buffers
                       (list (current-buffer))))))))
      ;; Put the result into the correct variable
!     (setq idlwave-buffer-routines 
          (idlwave-sintern-rinfo-list res t))))
  
  (defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook)
    "Put the different sources for routine information together."
!   ;; The sequence here is important because earlier definitions shadow 
    ;; later ones.  We assume that if things in the buffers are newer
    ;; then in the shell of the system, it is meant to be different.
  
--- 4438,4449 ----
            (setq res (idlwave-get-routine-info-from-buffers
                       (list (current-buffer))))))))
      ;; Put the result into the correct variable
!     (setq idlwave-buffer-routines
          (idlwave-sintern-rinfo-list res t))))
  
  (defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook)
    "Put the different sources for routine information together."
!   ;; The sequence here is important because earlier definitions shadow
    ;; later ones.  We assume that if things in the buffers are newer
    ;; then in the shell of the system, it is meant to be different.
  
***************
*** 4455,4461 ****
  
    ;; Give a message with information about the number of routines we have.
    (unless quiet
!     (message 
       "Routine info updated:  buffer(%d)  compiled(%d)  catalog(%d)  
system(%d)"
       (length idlwave-buffer-routines)
       (length idlwave-compiled-routines)
--- 4455,4461 ----
  
    ;; Give a message with information about the number of routines we have.
    (unless quiet
!     (message
       "Routine info updated:  buffer(%d)  compiled(%d)  catalog(%d)  
system(%d)"
       (length idlwave-buffer-routines)
       (length idlwave-compiled-routines)
***************
*** 4472,4478 ****
          (when (and (setq class (nth 2 x))
                     (not (assq class idlwave-class-alist)))
            (push (list class) idlwave-class-alist)))
!       idlwave-class-alist)))      
  
  ;; Three functions for the hooks
  (defun idlwave-save-buffer-update ()
--- 4472,4478 ----
          (when (and (setq class (nth 2 x))
                     (not (assq class idlwave-class-alist)))
            (push (list class) idlwave-class-alist)))
!       idlwave-class-alist)))
  
  ;; Three functions for the hooks
  (defun idlwave-save-buffer-update ()
***************
*** 4505,4511 ****
  
  (defun idlwave-replace-buffer-routine-info (file new)
    "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW."
!   (let ((list idlwave-buffer-routines) 
        found)
      (while list
        ;; The following test uses eq to make sure it works correctly
--- 4505,4511 ----
  
  (defun idlwave-replace-buffer-routine-info (file new)
    "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW."
!   (let ((list idlwave-buffer-routines)
        found)
      (while list
        ;; The following test uses eq to make sure it works correctly
***************
*** 4516,4522 ****
            (setcar list nil)
            (setq found t))
        (if found
!           ;; End of that section reached. Jump. 
            (setq list nil)))
        (setq list (cdr list)))
      (setq idlwave-buffer-routines
--- 4516,4522 ----
            (setcar list nil)
            (setq found t))
        (if found
!           ;; End of that section reached. Jump.
            (setq list nil)))
        (setq list (cdr list)))
      (setq idlwave-buffer-routines
***************
*** 4548,4558 ****
        (save-restriction
        (widen)
        (goto-char (point-min))
!       (while (re-search-forward 
                "^[ \t]*\\(pro\\|function\\)[ \t]" nil t)
          (setq string (buffer-substring-no-properties
                        (match-beginning 0)
!                       (progn 
                          (idlwave-end-of-statement)
                          (point))))
          (setq entry (idlwave-parse-definition string))
--- 4548,4558 ----
        (save-restriction
        (widen)
        (goto-char (point-min))
!       (while (re-search-forward
                "^[ \t]*\\(pro\\|function\\)[ \t]" nil t)
          (setq string (buffer-substring-no-properties
                        (match-beginning 0)
!                       (progn
                          (idlwave-end-of-statement)
                          (point))))
          (setq entry (idlwave-parse-definition string))
***************
*** 4590,4596 ****
        (push (match-string 1 string) args)))
      ;; Normalize and sort.
      (setq args (nreverse args))
!     (setq keywords (sort keywords (lambda (a b) 
                                    (string< (downcase a) (downcase b)))))
      ;; Make and return the entry
      ;; We don't know which argument are optional, so this information
--- 4590,4596 ----
        (push (match-string 1 string) args)))
      ;; Normalize and sort.
      (setq args (nreverse args))
!     (setq keywords (sort keywords (lambda (a b)
                                    (string< (downcase a) (downcase b)))))
      ;; Make and return the entry
      ;; We don't know which argument are optional, so this information
***************
*** 4600,4606 ****
          class
          (cond ((not (boundp 'idlwave-scanning-lib))
                 (cons 'buffer (buffer-file-name)))
! ;             ((string= (downcase 
  ;                        (file-name-sans-extension
  ;                         (file-name-nondirectory (buffer-file-name))))
  ;                       (downcase name))
--- 4600,4606 ----
          class
          (cond ((not (boundp 'idlwave-scanning-lib))
                 (cons 'buffer (buffer-file-name)))
! ;             ((string= (downcase
  ;                        (file-name-sans-extension
  ;                         (file-name-nondirectory (buffer-file-name))))
  ;                       (downcase name))
***************
*** 4608,4614 ****
  ;             (t (cons 'lib (file-name-nondirectory (buffer-file-name))))
                (t (cons 'lib (concat idlwave-scanning-lib-dir
                                      (file-name-nondirectory 
(buffer-file-name))))))
!         (concat 
           (if (string= type "function") "Result = " "")
           (if class "Obj ->[%s::]" "")
           "%s"
--- 4608,4614 ----
  ;             (t (cons 'lib (file-name-nondirectory (buffer-file-name))))
                (t (cons 'lib (concat idlwave-scanning-lib-dir
                                      (file-name-nondirectory 
(buffer-file-name))))))
!         (concat
           (if (string= type "function") "Result = " "")
           (if class "Obj ->[%s::]" "")
           "%s"
***************
*** 4652,4661 ****
               (> (length idlwave-libinfo-file) 0)
               (file-accessible-directory-p
                (file-name-directory idlwave-libinfo-file))
!              (not (string= "" (file-name-nondirectory 
                                 idlwave-libinfo-file))))
      (error "`idlwave-libinfo-file' does not point to file in accessible 
directory"))
!   
    (cond
     ((and arg idlwave-path-alist
         (consp (car idlwave-path-alist))
--- 4652,4661 ----
               (> (length idlwave-libinfo-file) 0)
               (file-accessible-directory-p
                (file-name-directory idlwave-libinfo-file))
!              (not (string= "" (file-name-nondirectory
                                 idlwave-libinfo-file))))
      (error "`idlwave-libinfo-file' does not point to file in accessible 
directory"))
! 
    (cond
     ((and arg idlwave-path-alist
         (consp (car idlwave-path-alist))
***************
*** 4690,4701 ****
      (let* ((rpl (idlwave-shell-path-filter))
           (sysdir (car rpl))
           (dirs (cdr rpl)))
!       (idlwave-display-libinfo-widget 
         sysdir dirs
         (delq nil (mapcar (lambda (x) (if (cdr x) (car x) nil))
                         idlwave-path-alist))))))
  
! (defconst idlwave-libinfo-widget-help-string 
    "This is the front-end to the creation of IDLWAVE library catalog.
  Please select below the directories on IDL's search path from which you
  would like to extract routine information, which will be stored in the file
--- 4690,4701 ----
      (let* ((rpl (idlwave-shell-path-filter))
           (sysdir (car rpl))
           (dirs (cdr rpl)))
!       (idlwave-display-libinfo-widget
         sysdir dirs
         (delq nil (mapcar (lambda (x) (if (cdr x) (car x) nil))
                         idlwave-path-alist))))))
  
! (defconst idlwave-libinfo-widget-help-string
    "This is the front-end to the creation of IDLWAVE library catalog.
  Please select below the directories on IDL's search path from which you
  would like to extract routine information, which will be stored in the file
***************
*** 4733,4739 ****
    (make-local-variable 'idlwave-widget)
    (widget-insert (format idlwave-libinfo-widget-help-string
                         idlwave-libinfo-file))
!   
    (widget-create 'push-button
                 :notify 'idlwave-widget-scan-lib-files
                 "Scan & Save")
--- 4733,4739 ----
    (make-local-variable 'idlwave-widget)
    (widget-insert (format idlwave-libinfo-widget-help-string
                         idlwave-libinfo-file))
! 
    (widget-create 'push-button
                 :notify 'idlwave-widget-scan-lib-files
                 "Scan & Save")
***************
*** 4765,4771 ****
    (widget-insert "\n\n")
  
    (widget-insert "Select Directories\n")
!   
    (setq idlwave-widget
        (apply 'widget-create
               'checklist
--- 4765,4771 ----
    (widget-insert "\n\n")
  
    (widget-insert "Select Directories\n")
! 
    (setq idlwave-widget
        (apply 'widget-create
               'checklist
***************
*** 4780,4786 ****
    (widget-setup)
    (goto-char (point-min))
    (delete-other-windows))
!   
  (defun idlwave-delete-libinfo-file (&rest ignore)
    (if (yes-or-no-p
         (format "Delete file %s " idlwave-libinfo-file))
--- 4780,4786 ----
    (widget-setup)
    (goto-char (point-min))
    (delete-other-windows))
! 
  (defun idlwave-delete-libinfo-file (&rest ignore)
    (if (yes-or-no-p
         (format "Delete file %s " idlwave-libinfo-file))
***************
*** 4839,4845 ****
      ;; is used.  So we don't do it here - the catalog file looks nicer
      ;; when it is unsorted.
      ;;(message "Sorting...")
!     ;;(setq idlwave-library-routines 
      ;;(sort idlwave-library-routines 'idlwave-routine-entry-compare))
      ;;(message "Sorting...done")
      (message "Creating libinfo file...")
--- 4839,4845 ----
      ;; is used.  So we don't do it here - the catalog file looks nicer
      ;; when it is unsorted.
      ;;(message "Sorting...")
!     ;;(setq idlwave-library-routines
      ;;(sort idlwave-library-routines 'idlwave-routine-entry-compare))
      ;;(message "Sorting...done")
      (message "Creating libinfo file...")
***************
*** 4914,4920 ****
        (when (file-directory-p dir)
        (setq files (nreverse (directory-files dir t "[^.]")))
        (while (setq file (pop files))
!         (if (file-directory-p file) 
              (push (file-name-as-directory file) path)))
        (push dir path1)))
      path1))
--- 4914,4920 ----
        (when (file-directory-p dir)
        (setq files (nreverse (directory-files dir t "[^.]")))
        (while (setq file (pop files))
!         (if (file-directory-p file)
              (push (file-name-as-directory file) path)))
        (push dir path1)))
      path1))
***************
*** 4922,4938 ****
  ;;----- Asking the shell -------------------
  
  ;; First, here is the idl program which can be used to query IDL for
! ;; defined routines. 
  (defconst idlwave-routine-info.pro
    "
  ;; START OF IDLWAVE SUPPORT ROUTINES
  pro idlwave_print_info_entry,name,func=func,separator=sep
    ;; See if it's an object method
    if name eq '' then return
!   func    = keyword_set(func) 
    methsep = strpos(name,'::')
    meth    = methsep ne -1
!   
    ;; Get routine info
    pars   = routine_info(name,/parameters,functions=func)
    source = routine_info(name,/source,functions=func)
--- 4922,4938 ----
  ;;----- Asking the shell -------------------
  
  ;; First, here is the idl program which can be used to query IDL for
! ;; defined routines.
  (defconst idlwave-routine-info.pro
    "
  ;; START OF IDLWAVE SUPPORT ROUTINES
  pro idlwave_print_info_entry,name,func=func,separator=sep
    ;; See if it's an object method
    if name eq '' then return
!   func    = keyword_set(func)
    methsep = strpos(name,'::')
    meth    = methsep ne -1
! 
    ;; Get routine info
    pars   = routine_info(name,/parameters,functions=func)
    source = routine_info(name,/source,functions=func)
***************
*** 4940,4951 ****
    nkw    = pars.num_kw_args
    if nargs gt 0 then args = pars.args
    if nkw   gt 0 then kwargs = pars.kw_args
!   
    ;; Trim the class, and make the name
!   if meth then begin 
        class = strmid(name,0,methsep)
        name  = strmid(name,methsep+2,strlen(name)-1)
!       if nargs gt 0 then begin 
            ;; remove the self argument
            wh = where(args ne 'SELF',nargs)
            if nargs gt 0 then args = args(wh)
--- 4940,4951 ----
    nkw    = pars.num_kw_args
    if nargs gt 0 then args = pars.args
    if nkw   gt 0 then kwargs = pars.kw_args
! 
    ;; Trim the class, and make the name
!   if meth then begin
        class = strmid(name,0,methsep)
        name  = strmid(name,methsep+2,strlen(name)-1)
!       if nargs gt 0 then begin
            ;; remove the self argument
            wh = where(args ne 'SELF',nargs)
            if nargs gt 0 then args = args(wh)
***************
*** 4954,4960 ****
        ;; No class, just a normal routine.
        class = \"\"
    endelse
!    
    ;; Calling sequence
    cs = \"\"
    if func then cs = 'Result = '
--- 4954,4960 ----
        ;; No class, just a normal routine.
        class = \"\"
    endelse
! 
    ;; Calling sequence
    cs = \"\"
    if func then cs = 'Result = '
***************
*** 4975,4983 ****
            kwstring = kwstring + ' ' + kwargs(j)
        endfor
    endif
!   
    ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])(func)
!   
    print,ret + ': ' + name + sep + class + sep + source(0).path  $
      + sep + cs + sep + kwstring
  end
--- 4975,4983 ----
            kwstring = kwstring + ' ' + kwargs(j)
        endfor
    endif
! 
    ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])(func)
! 
    print,ret + ': ' + name + sep + class + sep + source(0).path  $
      + sep + cs + sep + kwstring
  end
***************
*** 5016,5022 ****
    if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single)
  end
  ;; END OF IDLWAVE SUPPORT ROUTINES
! " 
    "The idl programs to get info from the shell.")
  
  (defvar idlwave-idlwave_routine_info-compiled nil
--- 5016,5022 ----
    if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single)
  end
  ;; END OF IDLWAVE SUPPORT ROUTINES
! "
    "The idl programs to get info from the shell.")
  
  (defvar idlwave-idlwave_routine_info-compiled nil
***************
*** 5039,5050 ****
        (erase-buffer)
        (insert idlwave-routine-info.pro)
        (save-buffer 0))
!     (idlwave-shell-send-command 
       (concat ".run " idlwave-shell-temp-pro-file)
       nil 'hide)
  ;    (message "SENDING SAVE") ; ????????????????????????
      (idlwave-shell-send-command
!      (format 
"save,'idlwave_routine_info','idlwave_print_info_entry',FILE='%s',/ROUTINES" 
             (idlwave-shell-temp-file 'rinfo))
       nil 'hide))
  
--- 5039,5050 ----
        (erase-buffer)
        (insert idlwave-routine-info.pro)
        (save-buffer 0))
!     (idlwave-shell-send-command
       (concat ".run " idlwave-shell-temp-pro-file)
       nil 'hide)
  ;    (message "SENDING SAVE") ; ????????????????????????
      (idlwave-shell-send-command
!      (format 
"save,'idlwave_routine_info','idlwave_print_info_entry',FILE='%s',/ROUTINES"
             (idlwave-shell-temp-file 'rinfo))
       nil 'hide))
  
***************
*** 5156,5162 ****
                              (idlwave-all-class-inherits class-selector)))
             (isa (concat "procedure" (if class-selector "-method" "")))
             (type-selector 'pro))
!       (setq idlwave-completion-help-info 
              (list 'routine nil type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'procedure (if class-selector 'method 'routine)
--- 5156,5162 ----
                              (idlwave-all-class-inherits class-selector)))
             (isa (concat "procedure" (if class-selector "-method" "")))
             (type-selector 'pro))
!       (setq idlwave-completion-help-info
              (list 'routine nil type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'procedure (if class-selector 'method 'routine)
***************
*** 5164,5171 ****
         (format "Select a %s name%s"
                 isa
                 (if class-selector
!                    (format " (class is %s)" 
!                            (if (eq class-selector t) 
                                 "unknown" class-selector))
                   ""))
         isa
--- 5164,5171 ----
         (format "Select a %s name%s"
                 isa
                 (if class-selector
!                    (format " (class is %s)"
!                            (if (eq class-selector t)
                                 "unknown" class-selector))
                   ""))
         isa
***************
*** 5179,5185 ****
                              (idlwave-all-class-inherits class-selector)))
             (isa (concat "function" (if class-selector "-method" "")))
             (type-selector 'fun))
!       (setq idlwave-completion-help-info 
              (list 'routine nil type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'function (if class-selector 'method 'routine)
--- 5179,5185 ----
                              (idlwave-all-class-inherits class-selector)))
             (isa (concat "function" (if class-selector "-method" "")))
             (type-selector 'fun))
!       (setq idlwave-completion-help-info
              (list 'routine nil type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'function (if class-selector 'method 'routine)
***************
*** 5187,5193 ****
         (format "Select a %s name%s"
                 isa
                 (if class-selector
!                    (format " (class is %s)" 
                             (if (eq class-selector t)
                                 "unknown" class-selector))
                   ""))
--- 5187,5193 ----
         (format "Select a %s name%s"
                 isa
                 (if class-selector
!                    (format " (class is %s)"
                             (if (eq class-selector t)
                                 "unknown" class-selector))
                   ""))
***************
*** 5217,5230 ****
        (setq list (idlwave-fix-keywords name 'pro class list))
        (unless list (error (format "No keywords available for procedure %s"
                                    (idlwave-make-full-name class name))))
!       (setq idlwave-completion-help-info 
              (list 'keyword name type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'keyword 'keyword list nil
         (format "Select keyword for procedure %s%s"
                 (idlwave-make-full-name class name)
                 (if (or (member '("_EXTRA") list)
!                        (member '("_REF_EXTRA") list))                  
                     " (note _EXTRA)" ""))
         isa
         'idlwave-attach-keyword-classes)))
--- 5217,5230 ----
        (setq list (idlwave-fix-keywords name 'pro class list))
        (unless list (error (format "No keywords available for procedure %s"
                                    (idlwave-make-full-name class name))))
!       (setq idlwave-completion-help-info
              (list 'keyword name type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'keyword 'keyword list nil
         (format "Select keyword for procedure %s%s"
                 (idlwave-make-full-name class name)
                 (if (or (member '("_EXTRA") list)
!                        (member '("_REF_EXTRA") list))
                     " (note _EXTRA)" ""))
         isa
         'idlwave-attach-keyword-classes)))
***************
*** 5255,5267 ****
                         (idlwave-make-full-name class name)))
        (unless list (error (format "No keywords available for function %s"
                                    msg-name)))
!       (setq idlwave-completion-help-info 
              (list 'keyword name type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'keyword 'keyword list nil
         (format "Select keyword for function %s%s" msg-name
                 (if (or (member '("_EXTRA") list)
!                        (member '("_REF_EXTRA") list))                  
                     " (note _EXTRA)" ""))
         isa
         'idlwave-attach-keyword-classes)))
--- 5255,5267 ----
                         (idlwave-make-full-name class name)))
        (unless list (error (format "No keywords available for function %s"
                                    msg-name)))
!       (setq idlwave-completion-help-info
              (list 'keyword name type-selector class-selector nil 
super-classes))
        (idlwave-complete-in-buffer
         'keyword 'keyword list nil
         (format "Select keyword for function %s%s" msg-name
                 (if (or (member '("_EXTRA") list)
!                        (member '("_REF_EXTRA") list))
                     " (note _EXTRA)" ""))
         isa
         'idlwave-attach-keyword-classes)))
***************
*** 5299,5308 ****
                      ("class")))
         (module (idlwave-sintern-routine-or-method module class))
         (class (idlwave-sintern-class class))
!        (what (cond 
                ((equal what 0)
                 (setq what
!                      (intern (completing-read 
                                "Complete what? " what-list nil t))))
                ((integerp what)
                 (setq what (intern (car (nth (1- what) what-list)))))
--- 5299,5308 ----
                      ("class")))
         (module (idlwave-sintern-routine-or-method module class))
         (class (idlwave-sintern-class class))
!        (what (cond
                ((equal what 0)
                 (setq what
!                      (intern (completing-read
                                "Complete what? " what-list nil t))))
                ((integerp what)
                 (setq what (intern (car (nth (1- what) what-list)))))
***************
*** 5324,5330 ****
             (super-classes nil)
             (type-selector 'pro)
             (pro (or module
!                     (idlwave-completing-read 
                       "Procedure: " (idlwave-routines) 'idlwave-selector))))
        (setq pro (idlwave-sintern-routine pro))
        (list nil-list nil-list 'procedure-keyword
--- 5324,5330 ----
             (super-classes nil)
             (type-selector 'pro)
             (pro (or module
!                     (idlwave-completing-read
                       "Procedure: " (idlwave-routines) 'idlwave-selector))))
        (setq pro (idlwave-sintern-routine pro))
        (list nil-list nil-list 'procedure-keyword
***************
*** 5338,5344 ****
             (super-classes nil)
             (type-selector 'fun)
             (func (or module
!                      (idlwave-completing-read 
                        "Function: " (idlwave-routines) 'idlwave-selector))))
        (setq func (idlwave-sintern-routine func))
        (list nil-list nil-list 'function-keyword
--- 5338,5344 ----
             (super-classes nil)
             (type-selector 'fun)
             (func (or module
!                      (idlwave-completing-read
                        "Function: " (idlwave-routines) 'idlwave-selector))))
        (setq func (idlwave-sintern-routine func))
        (list nil-list nil-list 'function-keyword
***************
*** 5378,5384 ****
  
       ((eq what 'class)
        (list nil-list nil-list 'class nil-list nil))
!      
       (t (error "Illegal value for WHAT")))))
  
  (defun idlwave-completing-read (&rest args)
--- 5378,5384 ----
  
       ((eq what 'class)
        (list nil-list nil-list 'class nil-list nil))
! 
       (t (error "Illegal value for WHAT")))))
  
  (defun idlwave-completing-read (&rest args)
***************
*** 5401,5407 ****
                    (stringp idlwave-shell-default-directory)
                    (file-directory-p idlwave-shell-default-directory))
               idlwave-shell-default-directory
!            default-directory)))          
      (comint-dynamic-complete-filename)))
  
  (defun idlwave-make-full-name (class name)
--- 5401,5407 ----
                    (stringp idlwave-shell-default-directory)
                    (file-directory-p idlwave-shell-default-directory))
               idlwave-shell-default-directory
!            default-directory)))
      (comint-dynamic-complete-filename)))
  
  (defun idlwave-make-full-name (class name)
***************
*** 5410,5416 ****
  
  (defun idlwave-rinfo-assoc (name type class list)
    "Like `idlwave-rinfo-assq', but sintern strings first."
!   (idlwave-rinfo-assq 
     (idlwave-sintern-routine-or-method name class)
     type (idlwave-sintern-class class) list))
  
--- 5410,5416 ----
  
  (defun idlwave-rinfo-assoc (name type class list)
    "Like `idlwave-rinfo-assq', but sintern strings first."
!   (idlwave-rinfo-assq
     (idlwave-sintern-routine-or-method name class)
     type (idlwave-sintern-class class) list))
  
***************
*** 5540,5546 ****
  Must accept two arguments: `apos' and `info'")
  
  (defun idlwave-determine-class (info type)
!   ;; Determine the class of a routine call.  
    ;; INFO is the `cw-list' structure as returned by idlwave-where.
    ;; The second element in this structure is the class.  When nil, we
    ;; return nil.  When t, try to get the class from text properties at
--- 5540,5546 ----
  Must accept two arguments: `apos' and `info'")
  
  (defun idlwave-determine-class (info type)
!   ;; Determine the class of a routine call.
    ;; INFO is the `cw-list' structure as returned by idlwave-where.
    ;; The second element in this structure is the class.  When nil, we
    ;; return nil.  When t, try to get the class from text properties at
***************
*** 5560,5566 ****
                      (dassoc (cdr dassoc))
                      (t t)))
         (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->")))
!        (is-self 
          (and arrow
               (save-excursion (goto-char apos)
                               (forward-word -1)
--- 5560,5566 ----
                      (dassoc (cdr dassoc))
                      (t t)))
         (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->")))
!        (is-self
          (and arrow
               (save-excursion (goto-char apos)
                               (forward-word -1)
***************
*** 5581,5599 ****
          (setq class (or (nth 2 (idlwave-current-routine)) class)))
  
        ;; Before prompting, try any special class determination routines
!       (when (and (eq t class) 
                 idlwave-determine-class-special
                 (not force-query))
!       (setq special-class 
              (idlwave-call-special idlwave-determine-class-special apos))
!       (if special-class 
            (setq class (idlwave-sintern-class special-class)
                  store idlwave-store-inquired-class)))
!       
        ;; Prompt for a class, if we need to
        (when (and (eq class t)
                 (or force-query query))
!       (setq class-alist 
              (mapcar 'list (idlwave-all-method-classes (car info) type)))
        (setq class
              (idlwave-sintern-class
--- 5581,5599 ----
          (setq class (or (nth 2 (idlwave-current-routine)) class)))
  
        ;; Before prompting, try any special class determination routines
!       (when (and (eq t class)
                 idlwave-determine-class-special
                 (not force-query))
!       (setq special-class
              (idlwave-call-special idlwave-determine-class-special apos))
!       (if special-class
            (setq class (idlwave-sintern-class special-class)
                  store idlwave-store-inquired-class)))
! 
        ;; Prompt for a class, if we need to
        (when (and (eq class t)
                 (or force-query query))
!       (setq class-alist
              (mapcar 'list (idlwave-all-method-classes (car info) type)))
        (setq class
              (idlwave-sintern-class
***************
*** 5602,5610 ****
                 (error "No classes available with method %s" (car info)))
                ((and (= (length class-alist) 1) (not force-query))
                 (car (car class-alist)))
!               (t 
                 (setq store idlwave-store-inquired-class)
!                (idlwave-completing-read 
                  (format "Class%s: " (if (stringp (car info))
                                          (format " for %s method %s"
                                                  type (car info))
--- 5602,5610 ----
                 (error "No classes available with method %s" (car info)))
                ((and (= (length class-alist) 1) (not force-query))
                 (car (car class-alist)))
!               (t
                 (setq store idlwave-store-inquired-class)
!                (idlwave-completing-read
                  (format "Class%s: " (if (stringp (car info))
                                          (format " for %s method %s"
                                                  type (car info))
***************
*** 5616,5624 ****
        ;; We have a real class here
        (when (and store arrow)
          (condition-case ()
!             (add-text-properties 
!              apos (+ apos 2) 
!              `(idlwave-class ,class face ,idlwave-class-arrow-face 
                               rear-nonsticky t))
            (error nil)))
        (setf (nth 2 info) class))
--- 5616,5624 ----
        ;; We have a real class here
        (when (and store arrow)
          (condition-case ()
!             (add-text-properties
!              apos (+ apos 2)
!              `(idlwave-class ,class face ,idlwave-class-arrow-face
                               rear-nonsticky t))
            (error nil)))
        (setf (nth 2 info) class))
***************
*** 5639,5652 ****
           )))
  
  (defun idlwave-where ()
!   "Find out where we are. 
  The return value is a list with the following stuff:
  \(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR)
  
  PRO-LIST       (PRO POINT CLASS ARROW)
  FUNC-LIST      (FUNC POINT CLASS ARROW)
  COMPLETE-WHAT  a symbol indicating what kind of completion makes sense here
! CW-LIST        (PRO-OR-FUNC POINT CLASS ARROW)  Like PRO-LIST, for what can 
                 be completed here.
  LAST-CHAR      last relevant character before point (non-white non-comment,
                 not part of current identifier or leading slash).
--- 5639,5652 ----
           )))
  
  (defun idlwave-where ()
!   "Find out where we are.
  The return value is a list with the following stuff:
  \(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR)
  
  PRO-LIST       (PRO POINT CLASS ARROW)
  FUNC-LIST      (FUNC POINT CLASS ARROW)
  COMPLETE-WHAT  a symbol indicating what kind of completion makes sense here
! CW-LIST        (PRO-OR-FUNC POINT CLASS ARROW)  Like PRO-LIST, for what can
                 be completed here.
  LAST-CHAR      last relevant character before point (non-white non-comment,
                 not part of current identifier or leading slash).
***************
*** 5658,5664 ****
  CLASS:  What class has the routine (nil=no, t=is method, but class unknown)
  ARROW:  Location of the arrow"
    (idlwave-routines)
!   (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point))) 
           (bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
         (func-entry (idlwave-what-function bos))
           (func (car func-entry))
--- 5658,5664 ----
  CLASS:  What class has the routine (nil=no, t=is method, but class unknown)
  ARROW:  Location of the arrow"
    (idlwave-routines)
!   (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point)))
           (bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
         (func-entry (idlwave-what-function bos))
           (func (car func-entry))
***************
*** 5679,5686 ****
       ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'"
                      (buffer-substring bos (point)))
        (setq cw 'class))
!      ((string-match 
!        "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'" 
         (buffer-substring (if (> pro-point 0) pro-point bos) (point)))
        (setq cw 'procedure cw-class pro-class cw-point pro-point
            cw-arrow pro-arrow))
--- 5679,5686 ----
       ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'"
                      (buffer-substring bos (point)))
        (setq cw 'class))
!      ((string-match
!        "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'"
         (buffer-substring (if (> pro-point 0) pro-point bos) (point)))
        (setq cw 'procedure cw-class pro-class cw-point pro-point
            cw-arrow pro-arrow))
***************
*** 5689,5699 ****
        nil)
       ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'"
                    (buffer-substring bos (point)))
!       (setq cw 'class))                    
       ((string-match "\\<inherits\\s-+\\([a-zA-Z0-9$_]*\\)?\\'"
                    (buffer-substring bos (point)))
!       (setq cw 'class))                    
!      ((and func 
           (> func-point pro-point)
           (= func-level 1)
           (memq last-char '(?\( ?,)))
--- 5689,5699 ----
        nil)
       ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'"
                    (buffer-substring bos (point)))
!       (setq cw 'class))
       ((string-match "\\<inherits\\s-+\\([a-zA-Z0-9$_]*\\)?\\'"
                    (buffer-substring bos (point)))
!       (setq cw 'class))
!      ((and func
           (> func-point pro-point)
           (= func-level 1)
           (memq last-char '(?\( ?,)))
***************
*** 5739,5745 ****
    ;;    searches to this point.
  
    (catch 'exit
!     (let (pos 
          func-point
          (cnt 0)
          func arrow-start class)
--- 5739,5745 ----
    ;;    searches to this point.
  
    (catch 'exit
!     (let (pos
          func-point
          (cnt 0)
          func arrow-start class)
***************
*** 5754,5771 ****
             (setq pos (point))
             (incf cnt)
             (when (and (= (following-char) ?\()
!                       (re-search-backward 
                         "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\="
                         bound t))
               (setq func (match-string 2)
                     func-point (goto-char (match-beginning 2))
                     pos func-point)
!              (if (re-search-backward 
                    "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t)
                   (setq arrow-start (copy-marker (match-beginning 0))
                         class (or (match-string 2) t)))
!              (throw 
!               'exit 
                (list
                 (idlwave-sintern-routine-or-method func class)
                 (idlwave-sintern-class class)
--- 5754,5771 ----
             (setq pos (point))
             (incf cnt)
             (when (and (= (following-char) ?\()
!                       (re-search-backward
                         "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\="
                         bound t))
               (setq func (match-string 2)
                     func-point (goto-char (match-beginning 2))
                     pos func-point)
!              (if (re-search-backward
                    "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t)
                   (setq arrow-start (copy-marker (match-beginning 0))
                         class (or (match-string 2) t)))
!              (throw
!               'exit
                (list
                 (idlwave-sintern-routine-or-method func class)
                 (idlwave-sintern-class class)
***************
*** 5781,5797 ****
    ;;    searches to this point.
    (let ((pos (point)) pro-point
        pro class arrow-start string)
!     (save-excursion 
        ;;(idlwave-beginning-of-statement)
        (idlwave-start-of-substatement 'pre)
        (setq string (buffer-substring (point) pos))
!       (if (string-match 
           "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string)
          (setq pro (match-string 1 string)
                pro-point (+ (point) (match-beginning 1)))
        (if (and (idlwave-skip-object)
                 (setq string (buffer-substring (point) pos))
!                (string-match 
                  "\\`[ \t]*\\(->\\)[ 
\t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ 
\t]*\\(,\\|\\'\\)" string))
            (setq pro (if (match-beginning 4)
                          (match-string 4 string))
--- 5781,5797 ----
    ;;    searches to this point.
    (let ((pos (point)) pro-point
        pro class arrow-start string)
!     (save-excursion
        ;;(idlwave-beginning-of-statement)
        (idlwave-start-of-substatement 'pre)
        (setq string (buffer-substring (point) pos))
!       (if (string-match
           "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string)
          (setq pro (match-string 1 string)
                pro-point (+ (point) (match-beginning 1)))
        (if (and (idlwave-skip-object)
                 (setq string (buffer-substring (point) pos))
!                (string-match
                  "\\`[ \t]*\\(->\\)[ 
\t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ 
\t]*\\(,\\|\\'\\)" string))
            (setq pro (if (match-beginning 4)
                          (match-string 4 string))
***************
*** 5835,5841 ****
              (throw 'exit nil))))
        (goto-char pos)
        nil)))
!   
  (defun idlwave-last-valid-char ()
    "Return the last character before point which is not white or a comment
  and also not part of the current identifier.  Since we do this in
--- 5835,5841 ----
              (throw 'exit nil))))
        (goto-char pos)
        nil)))
! 
  (defun idlwave-last-valid-char ()
    "Return the last character before point which is not white or a comment
  and also not part of the current identifier.  Since we do this in
***************
*** 5946,5952 ****
                     idlwave-complete-empty-string-as-lower-case)
                 (not idlwave-completion-force-default-case))
            (setq list (mapcar (lambda (x)
!                                (if (listp x) 
                                     (setcar x (downcase (car x)))
                                   (setq x (downcase x)))
                                 x)
--- 5946,5952 ----
                     idlwave-complete-empty-string-as-lower-case)
                 (not idlwave-completion-force-default-case))
            (setq list (mapcar (lambda (x)
!                                (if (listp x)
                                     (setcar x (downcase (car x)))
                                   (setq x (downcase x)))
                                 x)
***************
*** 5966,5977 ****
           (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\="
                               (- (point) 15) t)
           (goto-char (point-min))
!          (re-search-forward 
            "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t))))
        ;; Yank the full class specification
        (insert (match-string 2))
      ;; Do the completion
!     (idlwave-complete-in-buffer 'class 'class (idlwave-class-alist) nil 
                                "Select a class" "class")))
  
  (defun idlwave-attach-classes (list type show-classes)
--- 5966,5977 ----
           (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\="
                               (- (point) 15) t)
           (goto-char (point-min))
!          (re-search-forward
            "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t))))
        ;; Yank the full class specification
        (insert (match-string 2))
      ;; Do the completion
!     (idlwave-complete-in-buffer 'class 'class (idlwave-class-alist) nil
                                "Select a class" "class")))
  
  (defun idlwave-attach-classes (list type show-classes)
***************
*** 5981,5987 ****
    ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'.
    (if (or (null show-classes)           ; don't want to see classes
          (null class-selector)         ; not a method call
!         (and 
           (stringp class-selector) ; the class is already known
           (not super-classes)))    ; no possibilities for inheritance
        ;; In these cases, we do not have to do anything
--- 5981,5987 ----
    ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'.
    (if (or (null show-classes)           ; don't want to see classes
          (null class-selector)         ; not a method call
!         (and
           (stringp class-selector) ; the class is already known
           (not super-classes)))    ; no possibilities for inheritance
        ;; In these cases, we do not have to do anything
***************
*** 5996,6008 ****
           (max (abs show-classes))
           (lmax (if do-dots (apply 'max (mapcar 'length list))))
          classes nclasses class-info space)
!       (mapcar 
         (lambda (x)
         ;; get the classes
         (if (eq type 'class-tag)
             ;; Just one class for tags
             (setq classes
!                  (list 
                    (idlwave-class-or-superclass-with-tag class-selector x)))
           ;; Multiple classes for method of method-keyword
           (setq classes
--- 5996,6008 ----
           (max (abs show-classes))
           (lmax (if do-dots (apply 'max (mapcar 'length list))))
          classes nclasses class-info space)
!       (mapcar
         (lambda (x)
         ;; get the classes
         (if (eq type 'class-tag)
             ;; Just one class for tags
             (setq classes
!                  (list
                    (idlwave-class-or-superclass-with-tag class-selector x)))
           ;; Multiple classes for method of method-keyword
           (setq classes
***************
*** 6011,6017 ****
                      method-selector x type-selector)
                   (idlwave-all-method-classes x type-selector)))
           (if inherit
!              (setq classes 
                     (delq nil
                           (mapcar (lambda (x) (if (memq x inherit) x nil))
                                   classes)))))
--- 6011,6017 ----
                      method-selector x type-selector)
                   (idlwave-all-method-classes x type-selector)))
           (if inherit
!              (setq classes
                     (delq nil
                           (mapcar (lambda (x) (if (memq x inherit) x nil))
                                   classes)))))
***************
*** 6048,6054 ****
  (defun idlwave-attach-class-tag-classes (list)
    ;; Call idlwave-attach-classes with class structure tags
    (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes))
!                                       
  
  ;;----------------------------------------------------------------------
  ;;----------------------------------------------------------------------
--- 6048,6054 ----
  (defun idlwave-attach-class-tag-classes (list)
    ;; Call idlwave-attach-classes with class structure tags
    (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes))
! 
  
  ;;----------------------------------------------------------------------
  ;;----------------------------------------------------------------------
***************
*** 6069,6075 ****
          ((= 1 (length list))
           (setq rtn (car list)))
          ((featurep 'xemacs)
!          (if sort (setq list (sort list (lambda (a b) 
                                            (string< (upcase a) (upcase b))))))
           (setq menu
                 (append (list title)
--- 6069,6075 ----
          ((= 1 (length list))
           (setq rtn (car list)))
          ((featurep 'xemacs)
!          (if sort (setq list (sort list (lambda (a b)
                                            (string< (upcase a) (upcase b))))))
           (setq menu
                 (append (list title)
***************
*** 6080,6086 ****
           (setq resp (get-popup-menu-response menu))
           (funcall (event-function resp) (event-object resp)))
          (t
!          (if sort (setq list (sort list (lambda (a b) 
                                            (string< (upcase a) (upcase b))))))
           (setq menu (cons title
                            (list
--- 6080,6086 ----
           (setq resp (get-popup-menu-response menu))
           (funcall (event-function resp) (event-object resp)))
          (t
!          (if sort (setq list (sort list (lambda (a b)
                                            (string< (upcase a) (upcase b))))))
           (setq menu (cons title
                            (list
***************
*** 6171,6177 ****
      (setq idlwave-before-completion-wconf (current-window-configuration)))
  
    (if (featurep 'xemacs)
!       (idlwave-display-completion-list-xemacs 
         list)
      (idlwave-display-completion-list-emacs list))
  
--- 6171,6177 ----
      (setq idlwave-before-completion-wconf (current-window-configuration)))
  
    (if (featurep 'xemacs)
!       (idlwave-display-completion-list-xemacs
         list)
      (idlwave-display-completion-list-emacs list))
  
***************
*** 6284,6290 ****
  (defun idlwave-make-modified-completion-map-emacs (old-map)
    "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP."
    (let ((new-map (copy-keymap old-map)))
!     (substitute-key-definition 
       'choose-completion 'idlwave-choose-completion new-map)
      (substitute-key-definition
       'mouse-choose-completion 'idlwave-mouse-choose-completion new-map)
--- 6284,6290 ----
  (defun idlwave-make-modified-completion-map-emacs (old-map)
    "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP."
    (let ((new-map (copy-keymap old-map)))
!     (substitute-key-definition
       'choose-completion 'idlwave-choose-completion new-map)
      (substitute-key-definition
       'mouse-choose-completion 'idlwave-mouse-choose-completion new-map)
***************
*** 6310,6317 ****
  ;;
  ;; - Go again over the documentation how to write a completion
  ;;   plugin.  It is in self.el, but currently still very bad.
! ;;   This could be in a separate file in the distribution, or 
! ;;   in an appendix for the manual.  
  
  (defun idlwave-struct-tags ()
    "Return a list of all tags in the structure defined at point.
--- 6310,6317 ----
  ;;
  ;; - Go again over the documentation how to write a completion
  ;;   plugin.  It is in self.el, but currently still very bad.
! ;;   This could be in a separate file in the distribution, or
! ;;   in an appendix for the manual.
  
  (defun idlwave-struct-tags ()
    "Return a list of all tags in the structure defined at point.
***************
*** 6336,6342 ****
         (beg (car borders))
         (end (cdr borders))
         (case-fold-search t))
!     (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") 
                       end t)))
  
  (defun idlwave-struct-inherits ()
--- 6336,6342 ----
         (beg (car borders))
         (end (cdr borders))
         (case-fold-search t))
!     (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:")
                       end t)))
  
  (defun idlwave-struct-inherits ()
***************
*** 6378,6384 ****
        (cons beg (point)))))
  
  (defun idlwave-find-structure-definition (&optional var name bound)
!   "Search forward for a structure definition.  
  If VAR is non-nil, search for a structure assigned to variable VAR.
  If NAME is non-nil, search for a named structure NAME.  If BOUND is an
  integer, limit the search.  If BOUND is the symbol `all', we search
--- 6378,6384 ----
        (cons beg (point)))))
  
  (defun idlwave-find-structure-definition (&optional var name bound)
!   "Search forward for a structure definition.
  If VAR is non-nil, search for a structure assigned to variable VAR.
  If NAME is non-nil, search for a named structure NAME.  If BOUND is an
  integer, limit the search.  If BOUND is the symbol `all', we search
***************
*** 6444,6454 ****
    (let* ((pro (concat (downcase class) "__define"))
         (class (idlwave-sintern-class class))
         (idlwave-auto-routine-info-updates nil)
!        (file (cdr (nth 3 (idlwave-rinfo-assoc pro 'pro nil 
                                                (idlwave-routines)))))
         buf)
      (if (or (not file)
!           (not (file-regular-p 
                  (setq file (idlwave-expand-lib-file-name file)))))
        nil ; Cannot get info
        (save-excursion
--- 6444,6454 ----
    (let* ((pro (concat (downcase class) "__define"))
         (class (idlwave-sintern-class class))
         (idlwave-auto-routine-info-updates nil)
!        (file (cdr (nth 3 (idlwave-rinfo-assoc pro 'pro nil
                                                (idlwave-routines)))))
         buf)
      (if (or (not file)
!           (not (file-regular-p
                  (setq file (idlwave-expand-lib-file-name file)))))
        nil ; Cannot get info
        (save-excursion
***************
*** 6478,6484 ****
    (condition-case err
        (apply 'append (mapcar 'idlwave-class-tags
                             (cons class (idlwave-all-class-inherits class))))
!     (error           
       (idlwave-class-tag-reset)
       (error "%s" (error-message-string err)))))
  
--- 6478,6484 ----
    (condition-case err
        (apply 'append (mapcar 'idlwave-class-tags
                             (cons class (idlwave-all-class-inherits class))))
!     (error
       (idlwave-class-tag-reset)
       (error "%s" (error-message-string err)))))
  
***************
*** 6546,6559 ****
          ;; Check if we need to update the "current" class
          (if (not (equal class-selector idlwave-current-tags-class))
              (idlwave-prepare-class-tag-completion class-selector))
!         (setq idlwave-completion-help-info 
                (list 'idlwave-complete-class-structure-tag-help
!                     (idlwave-sintern-routine 
                       (concat class-selector "__define"))
                      nil))
          (let  ((idlwave-cpl-bold idlwave-current-native-class-tags))
            (idlwave-complete-in-buffer
!            'class-tag 'class-tag 
             idlwave-current-class-tags nil
             (format "Select a tag of class %s" class-selector)
             "class tag"
--- 6546,6559 ----
          ;; Check if we need to update the "current" class
          (if (not (equal class-selector idlwave-current-tags-class))
              (idlwave-prepare-class-tag-completion class-selector))
!         (setq idlwave-completion-help-info
                (list 'idlwave-complete-class-structure-tag-help
!                     (idlwave-sintern-routine
                       (concat class-selector "__define"))
                      nil))
          (let  ((idlwave-cpl-bold idlwave-current-native-class-tags))
            (idlwave-complete-in-buffer
!            'class-tag 'class-tag
             idlwave-current-class-tags nil
             (format "Select a tag of class %s" class-selector)
             "class tag"
***************
*** 6580,6586 ****
  ;; Completing system variables and their structure fields
  ;; This is also a plugin.  It is a bit bigger since we support loading
  ;; current system variables from the shell and highlighting in the
! ;; completions buffer. 
  
  (defvar idlwave-sint-sysvars nil)
  (defvar idlwave-sint-sysvartags nil)
--- 6580,6586 ----
  ;; Completing system variables and their structure fields
  ;; This is also a plugin.  It is a bit bigger since we support loading
  ;; current system variables from the shell and highlighting in the
! ;; completions buffer.
  
  (defvar idlwave-sint-sysvars nil)
  (defvar idlwave-sint-sysvartags nil)
***************
*** 6606,6612 ****
             (skip-chars-backward "[a-zA-Z0-9_$]")
             (equal (char-before) ?!))
           (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help))
!          (idlwave-complete-in-buffer 'sysvar 'sysvar 
                                       idlwave-system-variables-alist nil
                                       "Select a system variable"
                                       "system variable")
--- 6606,6612 ----
             (skip-chars-backward "[a-zA-Z0-9_$]")
             (equal (char-before) ?!))
           (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help))
!          (idlwave-complete-in-buffer 'sysvar 'sysvar
                                       idlwave-system-variables-alist nil
                                       "Select a system variable"
                                       "system variable")
***************
*** 6625,6631 ****
             (or tags (error "System variable !%s is not a structure" var))
             (setq idlwave-completion-help-info
                   (list 'idlwave-complete-sysvar-help var))
!            (idlwave-complete-in-buffer 'sysvartag 'sysvartag 
                                         tags nil
                                         "Select a system variable tag"
                                         "system variable tag")
--- 6625,6631 ----
             (or tags (error "System variable !%s is not a structure" var))
             (setq idlwave-completion-help-info
                   (list 'idlwave-complete-sysvar-help var))
!            (idlwave-complete-in-buffer 'sysvartag 'sysvartag
                                         tags nil
                                         "Select a system variable tag"
                                         "system variable tag")
***************
*** 6634,6640 ****
  
  ;; Here we fake help using the routine "system variables" with keyword
  ;; set to the sysvar.  Name and kwd are global variables here.
! (defvar name) 
  (defvar kwd)
  (defun idlwave-complete-sysvar-help (mode word)
    (cond
--- 6634,6640 ----
  
  ;; Here we fake help using the routine "system variables" with keyword
  ;; set to the sysvar.  Name and kwd are global variables here.
! (defvar name)
  (defvar kwd)
  (defun idlwave-complete-sysvar-help (mode word)
    (cond
***************
*** 6661,6671 ****
      nil)
     ((eq mode 'set)
      (let (class-with)
!       (when (setq class-with 
!               (idlwave-class-or-superclass-with-tag 
                 idlwave-current-tags-class
                 word))
!       (if (assq (idlwave-sintern-class class-with) 
                  idlwave-system-class-info)
            (error "No help available for system class tags."))
        (setq name (concat class-with "__define"))))
--- 6661,6671 ----
      nil)
     ((eq mode 'set)
      (let (class-with)
!       (when (setq class-with
!               (idlwave-class-or-superclass-with-tag
                 idlwave-current-tags-class
                 word))
!       (if (assq (idlwave-sintern-class class-with)
                  idlwave-system-class-info)
            (error "No help available for system class tags."))
        (setq name (concat class-with "__define"))))
***************
*** 6676,6682 ****
  (defun idlwave-class-or-superclass-with-tag (class tag)
    "Find and return the CLASS or one of its superclass with the
  associated TAG, if any."
!   (let ((sclasses (cons class (cdr (assq 'all-inherits 
                                         (idlwave-class-info class)))))
        cl)
     (catch 'exit
--- 6676,6682 ----
  (defun idlwave-class-or-superclass-with-tag (class tag)
    "Find and return the CLASS or one of its superclass with the
  associated TAG, if any."
!   (let ((sclasses (cons class (cdr (assq 'all-inherits
                                         (idlwave-class-info class)))))
        cl)
     (catch 'exit
***************
*** 6685,6691 ****
         (let ((tags (idlwave-class-tags cl)))
         (while tags
           (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t))
!            (throw 'exit cl))         
           (setq tags (cdr tags))))))))
  
  
--- 6685,6691 ----
         (let ((tags (idlwave-class-tags cl)))
         (while tags
           (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t))
!            (throw 'exit cl))
           (setq tags (cdr tags))))))))
  
  
***************
*** 6703,6716 ****
  
  (defun idlwave-remember-builtin-sysvars ()
    (setq idlwave-builtin-system-variables
!       (mapcar 'downcase 
                (mapcar 'car idlwave-system-variables-alist))))
  
  (defun idlwave-sintern-sysvar-alist ()
    (let ((list idlwave-system-variables-alist) entry)
      (while (setq entry (pop list))
        (setcar entry (idlwave-sintern-sysvar (car entry) 'set))
!       (setcdr entry (mapcar (lambda (x) 
                              (list (idlwave-sintern-sysvartag (car x) 'set)))
                            (cdr entry))))))
  
--- 6703,6716 ----
  
  (defun idlwave-remember-builtin-sysvars ()
    (setq idlwave-builtin-system-variables
!       (mapcar 'downcase
                (mapcar 'car idlwave-system-variables-alist))))
  
  (defun idlwave-sintern-sysvar-alist ()
    (let ((list idlwave-system-variables-alist) entry)
      (while (setq entry (pop list))
        (setcar entry (idlwave-sintern-sysvar (car entry) 'set))
!       (setcdr entry (mapcar (lambda (x)
                              (list (idlwave-sintern-sysvartag (car x) 'set)))
                            (cdr entry))))))
  
***************
*** 6775,6785 ****
        nil)))
  
    ;; Restore the pre-completion window configuration if this is safe.
!   
!   (if (or (eq verify 'force)                                    ; force 
!         (and 
           (get-buffer-window "*Completions*")                  ; visible
!          (idlwave-local-value 'idlwave-completion-p 
                                "*Completions*")                ; cib-buffer
           (eq (marker-buffer idlwave-completion-mark)
               (current-buffer))                                ; buffer OK
--- 6775,6785 ----
        nil)))
  
    ;; Restore the pre-completion window configuration if this is safe.
! 
!   (if (or (eq verify 'force)                                    ; force
!         (and
           (get-buffer-window "*Completions*")                  ; visible
!          (idlwave-local-value 'idlwave-completion-p
                                "*Completions*")                ; cib-buffer
           (eq (marker-buffer idlwave-completion-mark)
               (current-buffer))                                ; buffer OK
***************
*** 6842,6854 ****
           (hfile (expand-file-name "idlw-help.txt" dir)))
        (if (or (and (file-regular-p lfile1) (load-file lfile1))
              (and (file-regular-p lfile2) (load-file lfile2)))
!         (progn 
            (if (and idlwave-help-frame-parameters
                     (not (assoc 'width idlwave-help-frame-parameters)))
                (push (cons 'width idlwave-help-frame-width)
                      idlwave-help-frame-parameters))
            (or idlwave-help-topics
!               (error "File `%s' in help dir `%s' does not define 
`idlwave-help-topics'" 
                         "idlw-help.el" dir)))
        (error "No such file `%s' in help dir `%s'" "idlw-help.el" dir))
        (if (file-regular-p hfile)
--- 6842,6854 ----
           (hfile (expand-file-name "idlw-help.txt" dir)))
        (if (or (and (file-regular-p lfile1) (load-file lfile1))
              (and (file-regular-p lfile2) (load-file lfile2)))
!         (progn
            (if (and idlwave-help-frame-parameters
                     (not (assoc 'width idlwave-help-frame-parameters)))
                (push (cons 'width idlwave-help-frame-width)
                      idlwave-help-frame-parameters))
            (or idlwave-help-topics
!               (error "File `%s' in help dir `%s' does not define 
`idlwave-help-topics'"
                         "idlw-help.el" dir)))
        (error "No such file `%s' in help dir `%s'" "idlw-help.el" dir))
        (if (file-regular-p hfile)
***************
*** 6918,6924 ****
      (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)"
                      resolve)
        (setq type (match-string 1 resolve)
!             class (if (match-beginning 2) 
                        (match-string 3 resolve)
                      nil)
              name (match-string 4 resolve)))
--- 6918,6924 ----
      (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)"
                      resolve)
        (setq type (match-string 1 resolve)
!             class (if (match-beginning 2)
                        (match-string 3 resolve)
                      nil)
              name (match-string 4 resolve)))
***************
*** 6927,6941 ****
  
      (cond
       ((null class)
!       (idlwave-shell-send-command 
         (format "resolve_routine,'%s'%s" (downcase name) kwd)
         'idlwave-update-routine-info
         nil t))
       (t
!       (idlwave-shell-send-command 
         (format "resolve_routine,'%s__define'%s" (downcase class) kwd)
!        (list 'idlwave-shell-send-command 
!            (format "resolve_routine,'%s__%s'%s" 
                     (downcase class) (downcase name) kwd)
             '(idlwave-update-routine-info)
             nil t))))))
--- 6927,6941 ----
  
      (cond
       ((null class)
!       (idlwave-shell-send-command
         (format "resolve_routine,'%s'%s" (downcase name) kwd)
         'idlwave-update-routine-info
         nil t))
       (t
!       (idlwave-shell-send-command
         (format "resolve_routine,'%s__define'%s" (downcase class) kwd)
!        (list 'idlwave-shell-send-command
!            (format "resolve_routine,'%s__%s'%s"
                     (downcase class) (downcase name) kwd)
             '(idlwave-update-routine-info)
             nil t))))))
***************
*** 6951,6959 ****
         (module (idlwave-fix-module-if-obj_new (idlwave-what-module)))
         (default (concat (idlwave-make-full-name (nth 2 module) (car module))
                          (if (eq (nth 1 module) 'pro) "<p>" "<f>")))
!        (list 
          (delq nil
!               (mapcar (lambda (x) 
                          (if (eq 'system (car-safe (nth 3 x)))
                              ;; Take out system routines with no source.
                              nil
--- 6951,6959 ----
         (module (idlwave-fix-module-if-obj_new (idlwave-what-module)))
         (default (concat (idlwave-make-full-name (nth 2 module) (car module))
                          (if (eq (nth 1 module) 'pro) "<p>" "<f>")))
!        (list
          (delq nil
!               (mapcar (lambda (x)
                          (if (eq 'system (car-safe (nth 3 x)))
                              ;; Take out system routines with no source.
                              nil
***************
*** 6963,6969 ****
                             (cdr x))))
                        (idlwave-routines))))
         (name (idlwave-completing-read
!               (format "Module (Default %s): " 
                        (if default default "none"))
                list))
         type class)
--- 6963,6969 ----
                             (cdr x))))
                        (idlwave-routines))))
         (name (idlwave-completing-read
!               (format "Module (Default %s): "
                        (if default default "none"))
                list))
         type class)
***************
*** 6993,7012 ****
          source (or force-source (nth 3 entry))
          name2 (if (nth 2 entry)
                    (idlwave-make-full-name (nth 2 entry) name)
!                 name1))                 
      (cond
       ((or (null name) (equal name ""))
        (error "Abort"))
       ((null entry)
        (error "Nothing known about a module %s" name2))
       ((eq (car source) 'system)
!       (error "Source code for system routine %s is not available" 
             name2))
       ((equal (cdr source) "")
        (error "Source code for routine %s is not available"
             name2))
       ((memq (car source) '(buffer lib compiled))
!       (setq buf1 
            (if (eq (car source) 'lib)
                (idlwave-find-file-noselect
                 (idlwave-expand-lib-file-name
--- 6993,7012 ----
          source (or force-source (nth 3 entry))
          name2 (if (nth 2 entry)
                    (idlwave-make-full-name (nth 2 entry) name)
!                 name1))
      (cond
       ((or (null name) (equal name ""))
        (error "Abort"))
       ((null entry)
        (error "Nothing known about a module %s" name2))
       ((eq (car source) 'system)
!       (error "Source code for system routine %s is not available"
             name2))
       ((equal (cdr source) "")
        (error "Source code for routine %s is not available"
             name2))
       ((memq (car source) '(buffer lib compiled))
!       (setq buf1
            (if (eq (car source) 'lib)
                (idlwave-find-file-noselect
                 (idlwave-expand-lib-file-name
***************
*** 7021,7027 ****
                     (cond ((equal type "f") "function")
                           ((equal type "p") "pro")
                           (t "\\(pro\\|function\\)"))
!                    "\\>[ \t]+" 
                     (regexp-quote (downcase name2))
                     "[^a-zA-Z0-9_$]")
             nil t)
--- 7021,7027 ----
                     (cond ((equal type "f") "function")
                           ((equal type "p") "pro")
                           (t "\\(pro\\|function\\)"))
!                    "\\>[ \t]+"
                     (regexp-quote (downcase name2))
                     "[^a-zA-Z0-9_$]")
             nil t)
***************
*** 7058,7074 ****
        (cond
         ((and (eq cw 'procedure)
             (not (equal this-word "")))
!       (setq this-word (idlwave-sintern-routine-or-method 
                         this-word (nth 2 (nth 3 where))))
        (list this-word 'pro
!             (idlwave-determine-class 
               (cons this-word (cdr (nth 3 where)))
               'pro)))
!        ((and (eq cw 'function) 
             (not (equal this-word ""))
             (or (eq next-char ?\()     ; exclude arrays, vars.
                 (looking-at "[a-zA-Z0-9_]*[ \t]*(")))
!       (setq this-word (idlwave-sintern-routine-or-method 
                         this-word (nth 2 (nth 3 where))))
        (list this-word 'fun
              (idlwave-determine-class
--- 7058,7074 ----
        (cond
         ((and (eq cw 'procedure)
             (not (equal this-word "")))
!       (setq this-word (idlwave-sintern-routine-or-method
                         this-word (nth 2 (nth 3 where))))
        (list this-word 'pro
!             (idlwave-determine-class
               (cons this-word (cdr (nth 3 where)))
               'pro)))
!        ((and (eq cw 'function)
             (not (equal this-word ""))
             (or (eq next-char ?\()     ; exclude arrays, vars.
                 (looking-at "[a-zA-Z0-9_]*[ \t]*(")))
!       (setq this-word (idlwave-sintern-routine-or-method
                         this-word (nth 2 (nth 3 where))))
        (list this-word 'fun
              (idlwave-determine-class
***************
*** 7143,7150 ****
                             string)
               (setq class (idlwave-sintern-class (match-string 1 string)))
               (setq idlwave-current-obj_new-class class)
!              (setq keywords 
!                    (append keywords 
                             (nth 5 (idlwave-rinfo-assq
                                     (idlwave-sintern-method "INIT")
                                     'fun
--- 7143,7150 ----
                             string)
               (setq class (idlwave-sintern-class (match-string 1 string)))
               (setq idlwave-current-obj_new-class class)
!              (setq keywords
!                    (append keywords
                             (nth 5 (idlwave-rinfo-assq
                                     (idlwave-sintern-method "INIT")
                                     'fun
***************
*** 7160,7170 ****
                 (mapcar (lambda (k) (add-to-list 'keywords k))
                         (nth 5 x))))
        (setq keywords (idlwave-uniquify keywords)))
!     
      ;; If we have inheritance, add all keywords from superclasses, if
      ;; the user indicated that method in
      ;; `idlwave-keyword-class-inheritance'
!     (when (and 
           idlwave-keyword-class-inheritance
           (stringp class)
           (or (assq (idlwave-sintern-keyword "_extra") keywords)
--- 7160,7170 ----
                 (mapcar (lambda (k) (add-to-list 'keywords k))
                         (nth 5 x))))
        (setq keywords (idlwave-uniquify keywords)))
! 
      ;; If we have inheritance, add all keywords from superclasses, if
      ;; the user indicated that method in
      ;; `idlwave-keyword-class-inheritance'
!     (when (and
           idlwave-keyword-class-inheritance
           (stringp class)
           (or (assq (idlwave-sintern-keyword "_extra") keywords)
***************
*** 7184,7190 ****
                 (mapcar (lambda (k) (add-to-list 'keywords k))
                         (nth 5 x))))
        (setq keywords (idlwave-uniquify keywords)))
!     
      ;; Return the final list
      keywords))
  
--- 7184,7190 ----
                 (mapcar (lambda (k) (add-to-list 'keywords k))
                         (nth 5 x))))
        (setq keywords (idlwave-uniquify keywords)))
! 
      ;; Return the final list
      keywords))
  
***************
*** 7209,7222 ****
                    (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist)))
         (completion-ignore-case t)
         candidates)
!     (cond ((assq kwd kwd-alist) 
           kwd)
          ((setq candidates (all-completions kwd kwd-alist))
           (if (= (length candidates) 1)
               (car candidates)
             candidates))
          ((and entry extra)
!          ;; Inheritance may cause this keyword to be correct 
           keyword)
          (entry
           ;; We do know the function, which does not have the keyword.
--- 7209,7222 ----
                    (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist)))
         (completion-ignore-case t)
         candidates)
!     (cond ((assq kwd kwd-alist)
           kwd)
          ((setq candidates (all-completions kwd kwd-alist))
           (if (= (length candidates) 1)
               (car candidates)
             candidates))
          ((and entry extra)
!          ;; Inheritance may cause this keyword to be correct
           keyword)
          (entry
           ;; We do know the function, which does not have the keyword.
***************
*** 7228,7240 ****
  
  (defvar idlwave-rinfo-mouse-map (make-sparse-keymap))
  (defvar idlwave-rinfo-map (make-sparse-keymap))
! (define-key idlwave-rinfo-mouse-map 
    (if (featurep 'xemacs) [button2] [mouse-2])
    'idlwave-mouse-active-rinfo)
! (define-key idlwave-rinfo-mouse-map 
    (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)])
    'idlwave-mouse-active-rinfo-shift)
! (define-key idlwave-rinfo-mouse-map 
    (if (featurep 'xemacs) [button3] [mouse-3])
    'idlwave-mouse-active-rinfo-right)
  (define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space)
--- 7228,7240 ----
  
  (defvar idlwave-rinfo-mouse-map (make-sparse-keymap))
  (defvar idlwave-rinfo-map (make-sparse-keymap))
! (define-key idlwave-rinfo-mouse-map
    (if (featurep 'xemacs) [button2] [mouse-2])
    'idlwave-mouse-active-rinfo)
! (define-key idlwave-rinfo-mouse-map
    (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)])
    'idlwave-mouse-active-rinfo-shift)
! (define-key idlwave-rinfo-mouse-map
    (if (featurep 'xemacs) [button3] [mouse-3])
    'idlwave-mouse-active-rinfo-right)
  (define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space)
***************
*** 7260,7266 ****
    (let* ((initial-class (or initial-class class))
         (entry (or (idlwave-best-rinfo-assq name type class
                                             (idlwave-routines))
!                   (idlwave-rinfo-assq name type class 
                                        idlwave-unresolved-routines)))
         (name (or (car entry) name))
         (class (or (nth 2 entry) class))
--- 7260,7266 ----
    (let* ((initial-class (or initial-class class))
         (entry (or (idlwave-best-rinfo-assq name type class
                                             (idlwave-routines))
!                   (idlwave-rinfo-assq name type class
                                        idlwave-unresolved-routines)))
         (name (or (car entry) name))
         (class (or (nth 2 entry) class))
***************
*** 7344,7357 ****
                  (format calling-seq name))
                "\n")
        (add-text-properties beg (point) props)
!       
        (insert "Keywords:")
        (if (null keywords)
            (insert " No keywords accepted.")
          (setq col 9)
          (mapcar
           (lambda (x)
!            (if (>= (+ col 1 (length (car x))) 
                     (window-width))
                 (progn
                   (insert "\n         ")
--- 7344,7357 ----
                  (format calling-seq name))
                "\n")
        (add-text-properties beg (point) props)
! 
        (insert "Keywords:")
        (if (null keywords)
            (insert " No keywords accepted.")
          (setq col 9)
          (mapcar
           (lambda (x)
!            (if (>= (+ col 1 (length (car x)))
                     (window-width))
                 (progn
                   (insert "\n         ")
***************
*** 7368,7374 ****
             (add-text-properties beg (point) props)
             (setq col (+ col 1 (length (car x)))))
           keywords))
!       
        (setq cnt 1 total (length all))
        (while (setq entry (pop all))
          (setq props (list 'mouse-face 'highlight
--- 7368,7374 ----
             (add-text-properties beg (point) props)
             (setq col (+ col 1 (length (car x)))))
           keywords))
! 
        (setq cnt 1 total (length all))
        (while (setq entry (pop all))
          (setq props (list 'mouse-face 'highlight
***************
*** 7377,7383 ****
                            'source (cons (car (nth 2 entry)) (nth 1 entry))
                            'data (cons 'source data)))
          (idlwave-insert-source-location
!          (format "\n%-8s  %s" 
                   (if (equal cnt 1)
                       (if (> total 1) "Sources:" "Source:")
                     "")
--- 7377,7383 ----
                            'source (cons (car (nth 2 entry)) (nth 1 entry))
                            'data (cons 'source data)))
          (idlwave-insert-source-location
!          (format "\n%-8s  %s"
                   (if (equal cnt 1)
                       (if (> total 1) "Sources:" "Source:")
                     "")
***************
*** 7386,7392 ****
          (incf cnt)
          (when (and all (> cnt idlwave-rinfo-max-source-lines))
            ;; No more source lines, please
!           (insert (format 
                     "\n          Source information truncated to %d entries."
                     idlwave-rinfo-max-source-lines))
            (setq all nil)))
--- 7386,7392 ----
          (incf cnt)
          (when (and all (> cnt idlwave-rinfo-max-source-lines))
            ;; No more source lines, please
!           (insert (format
                     "\n          Source information truncated to %d entries."
                     idlwave-rinfo-max-source-lines))
            (setq all nil)))
***************
*** 7400,7406 ****
              (unwind-protect
                  (progn
                    (select-window win)
!                   (enlarge-window (- (/ (frame-height) 2) 
                                       (window-height)))
                    (shrink-window-if-larger-than-buffer))
                (select-window ww)))))))))
--- 7400,7406 ----
              (unwind-protect
                  (progn
                    (select-window win)
!                   (enlarge-window (- (/ (frame-height) 2)
                                       (window-height)))
                    (shrink-window-if-larger-than-buffer))
                (select-window ww)))))))))
***************
*** 7450,7456 ****
               (if shell-flag "S" "-")
               (if buffer-flag "B" "-")
               "] ")))
!     (when (> ndupl 1) 
        (setq beg (point))
        (insert (format "(%dx) " ndupl))
        (add-text-properties beg (point) (list 'face 'bold)))
--- 7450,7456 ----
               (if shell-flag "S" "-")
               (if buffer-flag "B" "-")
               "] ")))
!     (when (> ndupl 1)
        (setq beg (point))
        (insert (format "(%dx) " ndupl))
        (add-text-properties beg (point) (list 'face 'bold)))
***************
*** 7474,7480 ****
                  alist nil)))
        rtn)
       (t nil))))
!   
  (defun idlwave-mouse-active-rinfo-right (ev)
    (interactive "e")
    (idlwave-mouse-active-rinfo ev 'right))
--- 7474,7480 ----
                  alist nil)))
        rtn)
       (t nil))))
! 
  (defun idlwave-mouse-active-rinfo-right (ev)
    (interactive "e")
    (idlwave-mouse-active-rinfo ev 'right))
***************
*** 7505,7513 ****
          bufwin (get-buffer-window buf t))
      (cond ((eq id 'class)
           (if (window-live-p bufwin) (select-window bufwin))
!          (idlwave-display-calling-sequence 
            (idlwave-sintern-method name)
!           type (idlwave-sintern-class word) 
            initial-class))
          ((eq id 'usage)
           (idlwave-require-online-help)
--- 7505,7513 ----
          bufwin (get-buffer-window buf t))
      (cond ((eq id 'class)
           (if (window-live-p bufwin) (select-window bufwin))
!          (idlwave-display-calling-sequence
            (idlwave-sintern-method name)
!           type (idlwave-sintern-class word)
            initial-class))
          ((eq id 'usage)
           (idlwave-require-online-help)
***************
*** 7551,7559 ****
        (setq bwin (get-buffer-window buffer)))
      (if (eq (preceding-char) ?/)
        (insert keyword)
!       (unless (save-excursion 
                (re-search-backward
!                "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\=" 
                 (min (- (point) 100) (point-min)) t))
        (insert ", "))
        (if shift (insert "/"))
--- 7551,7559 ----
        (setq bwin (get-buffer-window buffer)))
      (if (eq (preceding-char) ?/)
        (insert keyword)
!       (unless (save-excursion
                (re-search-backward
!                "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\="
                 (min (- (point) 100) (point-min)) t))
        (insert ", "))
        (if shift (insert "/"))
***************
*** 7605,7611 ****
  command can be used to detect possible name clashes during this process."
    (idlwave-routines)  ; Make sure everything is loaded.
    (unless idlwave-library-routines
!     (or (y-or-n-p 
         "You don't have a library catalog.  Continue anyway? ")
        (error "Abort")))
    (let* ((routines (append idlwave-system-routines
--- 7605,7611 ----
  command can be used to detect possible name clashes during this process."
    (idlwave-routines)  ; Make sure everything is loaded.
    (unless idlwave-library-routines
!     (or (y-or-n-p
         "You don't have a library catalog.  Continue anyway? ")
        (error "Abort")))
    (let* ((routines (append idlwave-system-routines
***************
*** 7617,7623 ****
         (keymap (make-sparse-keymap))
         (props (list 'mouse-face 'highlight
                      km-prop keymap
!                     'help-echo "Mouse2: Find source"))      
         (nroutines (length (or special-routines routines)))
         (step (/ nroutines 99))
         (n 0)
--- 7617,7623 ----
         (keymap (make-sparse-keymap))
         (props (list 'mouse-face 'highlight
                      km-prop keymap
!                     'help-echo "Mouse2: Find source"))
         (nroutines (length (or special-routines routines)))
         (step (/ nroutines 99))
         (n 0)
***************
*** 7641,7653 ****
      (message "Sorting routines...done")
  
      (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)])
!       (lambda (ev) 
        (interactive "e")
        (mouse-set-point ev)
        (apply 'idlwave-do-find-module
               (get-text-property (point) 'find-args))))
      (define-key keymap [(return)]
!       (lambda () 
        (interactive)
        (apply 'idlwave-do-find-module
               (get-text-property (point) 'find-args))))
--- 7641,7653 ----
      (message "Sorting routines...done")
  
      (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)])
!       (lambda (ev)
        (interactive "e")
        (mouse-set-point ev)
        (apply 'idlwave-do-find-module
               (get-text-property (point) 'find-args))))
      (define-key keymap [(return)]
!       (lambda ()
        (interactive)
        (apply 'idlwave-do-find-module
               (get-text-property (point) 'find-args))))
***************
*** 7678,7685 ****
                          (if (eq (nth 1 routine) 'fun) "()" "")))
          (while (setq twin (pop dtwins))
            (setq props1 (append (list 'find-args
!                                      (list (nth 0 routine) 
!                                            (nth 1 routine) 
                                             (nth 2 routine)
                                             (cons 'lib (nth 1 twin))))
                                 props))
--- 7678,7685 ----
                          (if (eq (nth 1 routine) 'fun) "()" "")))
          (while (setq twin (pop dtwins))
            (setq props1 (append (list 'find-args
!                                      (list (nth 0 routine)
!                                            (nth 1 routine)
                                             (nth 2 routine)
                                             (cons 'lib (nth 1 twin))))
                                 props))
***************
*** 7706,7712 ****
             (or (not (stringp sfile))
                 (not (string-match "\\S-" sfile))))
        (setq stype 'unresolved))
!     (princ (format "      %-10s %s\n" 
                   stype
                   (if sfile sfile "No source code available")))))
  
--- 7706,7712 ----
             (or (not (stringp sfile))
                 (not (string-match "\\S-" sfile))))
        (setq stype 'unresolved))
!     (princ (format "      %-10s %s\n"
                   stype
                   (if sfile sfile "No source code available")))))
  
***************
*** 7725,7731 ****
               (eq type (nth 1 candidate))
               (eq class (nth 2 candidate)))
          (push candidate twins)))
!     (if (setq candidate (idlwave-rinfo-assq name type class 
                                            idlwave-unresolved-routines))
        (push candidate twins))
      (cons entry (nreverse twins))))
--- 7725,7731 ----
               (eq type (nth 1 candidate))
               (eq class (nth 2 candidate)))
          (push candidate twins)))
!     (if (setq candidate (idlwave-rinfo-assq name type class
                                            idlwave-unresolved-routines))
        (push candidate twins))
      (cons entry (nreverse twins))))
***************
*** 7735,7744 ****
  Dangerous twins are routines with same name, but in different files
  on the load path.
  If a file is in the system library and has an entry in the
! `idlwave-system-routines' list, we omit the latter because many IDL 
  routines are implemented as library routines."
    (let* ((entry (car entries))
!        (name (car entry))      ; 
         (type (nth 1 entry))    ; Must be bound for
         (class (nth 2 entry))   ;  idlwave-routine-twin-compare
         (cnt 0)
--- 7735,7744 ----
  Dangerous twins are routines with same name, but in different files
  on the load path.
  If a file is in the system library and has an entry in the
! `idlwave-system-routines' list, we omit the latter because many IDL
  routines are implemented as library routines."
    (let* ((entry (car entries))
!        (name (car entry))      ;
         (type (nth 1 entry))    ; Must be bound for
         (class (nth 2 entry))   ;  idlwave-routine-twin-compare
         (cnt 0)
***************
*** 7754,7776 ****
        (setq key (cond ((eq type 'system) type)
                      (file (file-truename file))
                      (t 'unresolved)))
!       (if (and file 
               (not syslibp)
               (idlwave-syslib-p file))
          ;; We do have an entry in the system library
          (setq syslibp t))
!       
        (setq thefile (or thefile file))
        (if (setq entry (assoc key alist))
          (push type (nth 2 entry))
        (push (list key file (list type)) alist)))
!     
      (setq alist (nreverse alist))
!     
      (when syslibp
        ;; File is system *library* - remove any system entry
        (setq alist (delq (assoc 'system alist) alist)))
!     
      (when (and (idlwave-syslib-scanned-p)
               (setq entry (assoc 'system alist)))
        (setcar entry 'builtin))
--- 7754,7776 ----
        (setq key (cond ((eq type 'system) type)
                      (file (file-truename file))
                      (t 'unresolved)))
!       (if (and file
               (not syslibp)
               (idlwave-syslib-p file))
          ;; We do have an entry in the system library
          (setq syslibp t))
! 
        (setq thefile (or thefile file))
        (if (setq entry (assoc key alist))
          (push type (nth 2 entry))
        (push (list key file (list type)) alist)))
! 
      (setq alist (nreverse alist))
! 
      (when syslibp
        ;; File is system *library* - remove any system entry
        (setq alist (delq (assoc 'system alist) alist)))
! 
      (when (and (idlwave-syslib-scanned-p)
               (setq entry (assoc 'system alist)))
        (setcar entry 'builtin))
***************
*** 7805,7811 ****
       ((not (eq type (nth 1 b)))
        ;; Type decides
        (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0)))
!      (t       
        ;; A and B are twins - so the decision is more complicated.
        ;; Call twin-compare with the proper arguments.
        (idlwave-routine-entry-compare-twins a b)))))
--- 7805,7811 ----
       ((not (eq type (nth 1 b)))
        ;; Type decides
        (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0)))
!      (t
        ;; A and B are twins - so the decision is more complicated.
        ;; Call twin-compare with the proper arguments.
        (idlwave-routine-entry-compare-twins a b)))))
***************
*** 8001,8012 ****
    (start-process "idldeclient" nil
                 idlwave-shell-explicit-file-name "-c" "-e"
                   (buffer-file-name) "&"))
!                 
  (defun idlwave-launch-idlhelp ()
    "Start the IDLhelp application."
    (interactive)
    (start-process "idlhelp" nil idlwave-help-application))
!  
  ;; Menus - using easymenu.el
  (defvar idlwave-mode-menu-def
    `("IDLWAVE"
--- 8001,8012 ----
    (start-process "idldeclient" nil
                 idlwave-shell-explicit-file-name "-c" "-e"
                   (buffer-file-name) "&"))
! 
  (defun idlwave-launch-idlhelp ()
    "Start the IDLhelp application."
    (interactive)
    (start-process "idlhelp" nil idlwave-help-application))
! 
  ;; Menus - using easymenu.el
  (defvar idlwave-mode-menu-def
    `("IDLWAVE"
***************
*** 8093,8099 ****
      ("Customize"
       ["Browse IDLWAVE Group" idlwave-customize t]
       "--"
!      ["Build Full Customize Menu" idlwave-create-customize-menu 
        (fboundp 'customize-menu-create)])
      ("Documentation"
       ["Describe Mode" describe-mode t]
--- 8093,8099 ----
      ("Customize"
       ["Browse IDLWAVE Group" idlwave-customize t]
       "--"
!      ["Build Full Customize Menu" idlwave-create-customize-menu
        (fboundp 'customize-menu-create)])
      ("Documentation"
       ["Describe Mode" describe-mode t]
***************
*** 8110,8131 ****
    '("Debug"
      ["Start IDL shell" idlwave-shell t]
      ["Save and .RUN buffer" idlwave-shell-save-and-run
!      (and (boundp 'idlwave-shell-automatic-start) 
          idlwave-shell-automatic-start)]))
  
  (if (or (featurep 'easymenu) (load "easymenu" t))
      (progn
!       (easy-menu-define idlwave-mode-menu idlwave-mode-map 
!                       "IDL and WAVE CL editing menu" 
                        idlwave-mode-menu-def)
!       (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map 
!                       "IDL and WAVE CL editing menu" 
                        idlwave-mode-debug-menu-def)))
  
  (defun idlwave-customize ()
    "Call the customize function with idlwave as argument."
    (interactive)
!   ;; Try to load the code for the shell, so that we can customize it 
    ;; as well.
    (or (featurep 'idlw-shell)
        (load "idlw-shell" t))
--- 8110,8131 ----
    '("Debug"
      ["Start IDL shell" idlwave-shell t]
      ["Save and .RUN buffer" idlwave-shell-save-and-run
!      (and (boundp 'idlwave-shell-automatic-start)
          idlwave-shell-automatic-start)]))
  
  (if (or (featurep 'easymenu) (load "easymenu" t))
      (progn
!       (easy-menu-define idlwave-mode-menu idlwave-mode-map
!                       "IDL and WAVE CL editing menu"
                        idlwave-mode-menu-def)
!       (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map
!                       "IDL and WAVE CL editing menu"
                        idlwave-mode-debug-menu-def)))
  
  (defun idlwave-customize ()
    "Call the customize function with idlwave as argument."
    (interactive)
!   ;; Try to load the code for the shell, so that we can customize it
    ;; as well.
    (or (featurep 'idlw-shell)
        (load "idlw-shell" t))
***************
*** 8136,8146 ****
    (interactive)
    (if (fboundp 'customize-menu-create)
        (progn
!       ;; Try to load the code for the shell, so that we can customize it 
        ;; as well.
        (or (featurep 'idlw-shell)
            (load "idlw-shell" t))
!       (easy-menu-change 
         '("IDLWAVE") "Customize"
         `(["Browse IDLWAVE group" idlwave-customize t]
           "--"
--- 8136,8146 ----
    (interactive)
    (if (fboundp 'customize-menu-create)
        (progn
!       ;; Try to load the code for the shell, so that we can customize it
        ;; as well.
        (or (featurep 'idlw-shell)
            (load "idlw-shell" t))
!       (easy-menu-change
         '("IDLWAVE") "Customize"
         `(["Browse IDLWAVE group" idlwave-customize t]
           "--"
***************
*** 8188,8194 ****
    (let ((table (symbol-value 'idlwave-mode-abbrev-table))
        abbrevs
        str rpl func fmt (len-str 0) (len-rpl 0))
!     (mapatoms 
       (lambda (sym)
         (if (symbol-value sym)
           (progn
--- 8188,8194 ----
    (let ((table (symbol-value 'idlwave-mode-abbrev-table))
        abbrevs
        str rpl func fmt (len-str 0) (len-rpl 0))
!     (mapatoms
       (lambda (sym)
         (if (symbol-value sym)
           (progn
***************
*** 8214,8220 ****
      (with-output-to-temp-buffer "*Help*"
        (if arg
          (progn
!           (princ "Abbreviations and Actions in IDLWAVE-Mode\n") 
            (princ "=========================================\n\n")
            (princ (format fmt "KEY" "REPLACE" "HOOK"))
            (princ (format fmt "---" "-------" "----")))
--- 8214,8220 ----
      (with-output-to-temp-buffer "*Help*"
        (if arg
          (progn
!           (princ "Abbreviations and Actions in IDLWAVE-Mode\n")
            (princ "=========================================\n\n")
            (princ (format fmt "KEY" "REPLACE" "HOOK"))
            (princ (format fmt "---" "-------" "----")))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]