;; A printable version of the documentation is available from the
;; maintainers webpage (see under SOURCE)
;;
;; A printable version of the documentation is available from the
;; maintainers webpage (see under SOURCE)
;;
;; 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
;; 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
nil ;; We've got what we needed
;; We have the old or no custom-library, hack around it!
(defmacro defgroup (&rest args) nil)
nil ;; We've got what we needed
;; We have the old or no custom-library, hack around it!
(defmacro defgroup (&rest args) nil)
`(defvar ,var ,value ,doc))))
(defgroup idlwave nil
"Major mode for editing IDL .pro files"
:tag "IDLWAVE"
`(defvar ,var ,value ,doc))))
(defgroup idlwave nil
"Major mode for editing IDL .pro files"
:tag "IDLWAVE"
(defcustom idlwave-auto-fill-split-string t
"*If non-nil then auto fill will split strings with the IDL `+' operator.
(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.
+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
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
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.
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.
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.
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.
(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))))
(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.
(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.
(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
(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
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
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
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
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
This alist should therefore have entries for `routine' (normal
functions and procedures, i.e. non-methods), `keyword', `class', and
`method'. Plausible values are
This alist should therefore have entries for `routine' (normal
functions and procedures, i.e. non-methods), `keyword', `class', and
`method'. Plausible values are
for which to assume this can be set here."
:group 'idlwave-routine-info
:type '(repeat (regexp :tag "Match method:")))
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.
(defcustom idlwave-completion-show-classes 1
"*Number of classes to show when completing object methods and keywords.
specify if the class should be found during method and keyword
completion, respectively.
specify if the class should be found during method and keyword
completion, respectively.
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."
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."
value of the variable `idlwave-query-class'.
When you specify a class, this information can be stored as a text
value of the variable `idlwave-query-class'.
When you specify a class, this information can be stored as a text
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]'
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]'
'(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.
'(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.
(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
(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
;; Arrows with text property `idlwave-class'
(class-arrows
'(idlwave-match-class-arrows (0 idlwave-class-arrow-face))))
;; Arrows with text property `idlwave-class'
(class-arrows
'(idlwave-match-class-arrows (0 idlwave-class-arrow-face))))
"\\<\\(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.")
"\\<\\(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.")
'(switch . ("switch\\>" nil))
(cons 'call (list (concat idlwave-identifier "\\(\\s *$\\|\\s *,\\)") nil))
'(assign . ("[^=>\n]*=" nil)))
'(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
"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
;; 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.
;; 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.
(not (equal idlwave-shell-debug-modifiers '())))
;; Bind the debug commands also with the special modifiers.
(let ((shift (memq 'shift idlwave-shell-debug-modifiers))
(not (equal idlwave-shell-debug-modifiers '())))
;; Bind the debug commands also with the special modifiers.
(let ((shift (memq 'shift idlwave-shell-debug-modifiers))
(vector (append mods-noshift (list (if shift ?B ?b))))
'idlwave-shell-break-here)))
(define-key idlwave-mode-map "\C-c\C-f" 'idlwave-for)
(vector (append mods-noshift (list (if shift ?B ?b))))
'idlwave-shell-break-here)))
(define-key idlwave-mode-map "\C-c\C-f" 'idlwave-for)
(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 [(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)
(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))
(idlwave-action-and-binding "<" '(idlwave-surround -1 -1))
;; Binding works for both > and ->, by changing the length of the token.
'idlwave-gtr-pad-hook))
(idlwave-action-and-binding "->" '(idlwave-surround -1 -1 nil 2) t)
(idlwave-action-and-binding "," '(idlwave-surround 0 -1))
'idlwave-gtr-pad-hook))
(idlwave-action-and-binding "->" '(idlwave-surround -1 -1 nil 2) t)
(idlwave-action-and-binding "," '(idlwave-surround 0 -1))
(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))
(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)
;; This section is reserved words only. (From IDL user manual)
;;
(idlwave-define-abbrev "and" "and" (idlwave-keyword-abbrev 0 t) t)
(defvar imenu-extract-index-name-function)
(defvar imenu-prev-index-position-function)
;; defined later - so just make the compiler hush
(defvar imenu-extract-index-name-function)
(defvar imenu-prev-index-position-function)
;; defined later - so just make the compiler hush
For a full list, use \\[idlwave-list-abbrevs]. Some templates also have
direct keybindings - see the list of keybindings below.
For a full list, use \\[idlwave-list-abbrevs]. Some templates also have
direct keybindings - see the list of keybindings below.
(if idlwave-startup-message
(message "Emacs IDLWAVE mode version %s." idlwave-mode-version))
(setq idlwave-startup-message nil)
(if idlwave-startup-message
(message "Emacs IDLWAVE mode version %s." idlwave-mode-version))
(setq idlwave-startup-message nil)
(make-local-variable idlwave-comment-indent-function)
(set idlwave-comment-indent-function 'idlwave-comment-hook)
(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)
(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)
(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 idlwave-fill-function) 'idlwave-auto-fill)
(setq comment-end "")
(set (make-local-variable 'comment-multi-line) nil)
"[ \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)
"[ \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")))
;; 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.
;; Font-lock additions - originally Phil Williams, then Ulrik Dickow
;; Following line is for Emacs - XEmacs uses the corresponding porperty
;; on the `idlwave-mode' symbol.
(backward-char 1)
(let* ((pos (point-marker))
(last-abbrev-marker (copy-marker last-abbrev-location))
(eol-pos (save-excursion (end-of-line) (point)))
begin-pos end-pos end end1 )
(if idlwave-reindent-end (idlwave-indent-line))
(backward-char 1)
(let* ((pos (point-marker))
(last-abbrev-marker (copy-marker last-abbrev-location))
(eol-pos (save-excursion (end-of-line) (point)))
begin-pos end-pos end end1 )
(if idlwave-reindent-end (idlwave-indent-line))
((looking-at "pro\\|case\\|switch\\|function\\>")
(assoc (downcase (match-string 0)) idlwave-block-matches))
((looking-at "begin\\>")
((looking-at "pro\\|case\\|switch\\|function\\>")
(assoc (downcase (match-string 0)) idlwave-block-matches))
((looking-at "begin\\>")
(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))
(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))
idlwave-end-block-reg -1 'nomark eos))
(idlwave-beginning-of-statement)
(message "No nested block before beginning of containing block.")))
idlwave-end-block-reg -1 'nomark eos))
(idlwave-beginning-of-statement)
(message "No nested block before beginning of containing block.")))
idlwave-begin-block-reg 1 'nomark eos))
(idlwave-end-of-statement)
(message "No nested block before end of containing block."))))
idlwave-begin-block-reg 1 'nomark eos))
(idlwave-end-of-statement)
(message "No nested block before end of containing block."))))
((eq major-mode 'idlwave-shell-mode)
(if (re-search-backward idlwave-shell-prompt-pattern nil t)
(goto-char (match-end 0))))
((eq major-mode 'idlwave-shell-mode)
(if (re-search-backward idlwave-shell-prompt-pattern nil t)
(goto-char (match-end 0))))
;; - 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
;; - 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
(let* ((start (point))
(eos (save-excursion (idlwave-end-of-statement) (point)))
(end (idlwave-find-key ":" 1 'nomark eos)))
(let* ((start (point))
(eos (save-excursion (idlwave-end-of-statement) (point)))
(end (idlwave-find-key ":" 1 'nomark eos)))
(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
(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
(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)))))
(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)))))
(defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp)
"Calculate the continuation indent inside a paren group.
(defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp)
"Calculate the continuation indent inside a paren group.
location of the open paren"
(let ((open (nth 1 (parse-partial-sexp beg-reg end-reg))))
;; Found an innermost open paren.
location of the open paren"
(let ((open (nth 1 (parse-partial-sexp beg-reg end-reg))))
;; Found an innermost open paren.
(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
(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
((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$]*\\(;.*\\)?$"))
((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$]*\\(;.*\\)?$"))
(< (- fancy-paren-indent basic-indent)
idlwave-max-extra-continuation-indent))))
fancy-enclosing-paren-indent)
(< (- fancy-paren-indent basic-indent)
idlwave-max-extra-continuation-indent))))
fancy-enclosing-paren-indent)
(not fancy-paren-indent-allowed)
fancy-nonparen-indent-allowed )
(+ fancy-nonparen-indent idlwave-continuation-indent))
(not fancy-paren-indent-allowed)
fancy-nonparen-indent-allowed )
(+ fancy-nonparen-indent idlwave-continuation-indent))
Blank or comment-only lines following regular continuation lines (with
`$') count as continuations too."
(save-excursion
Blank or comment-only lines following regular continuation lines (with
`$') count as continuations too."
(save-excursion
;; No hang. Instead find minimum indentation of paragraph
;; after first line.
;; For the following while statement, since START is at the
;; No hang. Instead find minimum indentation of paragraph
;; after first line.
;; For the following while statement, since START is at the
(insert (current-time-string))
(insert ", " (user-full-name))
(if (boundp 'user-mail-address)
(insert (current-time-string))
(insert ", " (user-full-name))
(if (boundp 'user-mail-address)
(defun idlwave-rw-case (string)
"Make STRING have the case required by `idlwave-reserved-word-upcase'."
(if idlwave-reserved-word-upcase
(defun idlwave-rw-case (string)
"Make STRING have the case required by `idlwave-reserved-word-upcase'."
(if idlwave-reserved-word-upcase
(delq entry idlwave-outlawed-buffers)))
;; Remove this function from the hook.
(remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local)))
(delq entry idlwave-outlawed-buffers)))
;; Remove this function from the hook.
(remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local)))
(throw 'exit efile))))))
(defun idlwave-expand-lib-file-name (file)
;; Find FILE on the scanned lib path and return a buffer visiting it
(throw 'exit efile))))))
(defun idlwave-expand-lib-file-name (file)
;; Find FILE on the scanned lib path and return a buffer visiting it
(interactive)
(let (directory directories cmd append status numdirs dir getsubdirs
buffer save_buffer files numfiles item errbuf)
(interactive)
(let (directory directories cmd append status numdirs dir getsubdirs
buffer save_buffer files numfiles item errbuf)
(setq numdirs (1+ numdirs))
(setq dir (nth numdirs directories)))
(progn
(setq numdirs (1+ numdirs))
(setq dir (nth numdirs directories)))))
(setq numdirs (1+ numdirs))
(setq dir (nth numdirs directories)))
(progn
(setq numdirs (1+ numdirs))
(setq dir (nth numdirs directories)))))
;; 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
;; 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
;; functions it is *not* safe to assume the strings can be compared
;; with `eq' and be fed into the routine assq functions.
;; functions it is *not* safe to assume the strings can be compared
;; with `eq' and be fed into the routine assq functions.
;; Make sure the hash functions are accessible.
(if (or (not (fboundp 'gethash))
(not (fboundp 'puthash)))
;; Make sure the hash functions are accessible.
(if (or (not (fboundp 'gethash))
(not (fboundp 'puthash)))
;; Reset the system & library hash
(loop for entry in entries
for var = (car entry) for size = (nth 1 entry)
;; Reset the system & library hash
(loop for entry in entries
for var = (car entry) for size = (nth 1 entry)
;; Reset the buffer & shell hash
(loop for entry in entries
for var = (car entry) for size = (nth 1 entry)
;; Reset the buffer & shell hash
(loop for entry in entries
for var = (car entry) for size = (nth 1 entry)
(make-hash-table ':size size ':test 'equal))))))
(defun idlwave-sintern-routine-or-method (name &optional class set)
(make-hash-table ':size size ':test 'equal))))))
(defun idlwave-sintern-routine-or-method (name &optional class set)
;; 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)))
;; 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)
(setq idlwave-buffer-routines nil
idlwave-compiled-routines nil
idlwave-unresolved-routines nil)
(idlwave-shell-is-running)))
(ask-shell (and shell-is-running
idlwave-query-shell-for-routine-info)))
(idlwave-shell-is-running)))
(ask-shell (and shell-is-running
idlwave-query-shell-for-routine-info)))
;; the current command. Therefore, we do a concatenation
;; now, even though the shell might do it again.
(idlwave-concatenate-rinfo-lists nil t))
;; the current command. Therefore, we do a concatenation
;; now, even though the shell might do it again.
(idlwave-concatenate-rinfo-lists nil t))
(message "Loading library catalog in idle time...")
(load-file idlwave-libinfo-file)
(message "Loading library catalog in idle time...done")
(message "Loading library catalog in idle time...")
(load-file idlwave-libinfo-file)
(message "Loading library catalog in idle time...done")
((eq idlwave-scan-all-buffers-for-routine-info t)
;; Scan all buffers, current buffer last
(message "Scanning all buffers...")
((eq idlwave-scan-all-buffers-for-routine-info t)
;; Scan all buffers, current buffer last
(message "Scanning all buffers...")
(reverse (buffer-list)))))
((null idlwave-scan-all-buffers-for-routine-info)
;; Don't scan any buffers
(reverse (buffer-list)))))
((null idlwave-scan-all-buffers-for-routine-info)
;; Don't scan any buffers
(setq res (idlwave-get-routine-info-from-buffers
(list (current-buffer))))))))
;; Put the result into the correct variable
(setq res (idlwave-get-routine-info-from-buffers
(list (current-buffer))))))))
;; Put the result into the correct variable
(idlwave-sintern-rinfo-list res t))))
(defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook)
"Put the different sources for routine information together."
(idlwave-sintern-rinfo-list res t))))
(defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook)
"Put the different sources for routine information together."
;; 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.
;; 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.
"Routine info updated: buffer(%d) compiled(%d) catalog(%d) system(%d)"
(length idlwave-buffer-routines)
(length idlwave-compiled-routines)
"Routine info updated: buffer(%d) compiled(%d) catalog(%d) system(%d)"
(length idlwave-buffer-routines)
(length idlwave-compiled-routines)
(when (and (setq class (nth 2 x))
(not (assq class idlwave-class-alist)))
(push (list class) idlwave-class-alist)))
(when (and (setq class (nth 2 x))
(not (assq class idlwave-class-alist)))
(push (list class) idlwave-class-alist)))
(defun idlwave-replace-buffer-routine-info (file new)
"Cut the part from FILE out of `idlwave-buffer-routines' and add NEW."
(defun idlwave-replace-buffer-routine-info (file new)
"Cut the part from FILE out of `idlwave-buffer-routines' and add NEW."
(string< (downcase a) (downcase b)))))
;; Make and return the entry
;; We don't know which argument are optional, so this information
(string< (downcase a) (downcase b)))))
;; Make and return the entry
;; We don't know which argument are optional, so this information
; (t (cons 'lib (file-name-nondirectory (buffer-file-name))))
(t (cons 'lib (concat idlwave-scanning-lib-dir
(file-name-nondirectory (buffer-file-name))))))
; (t (cons 'lib (file-name-nondirectory (buffer-file-name))))
(t (cons 'lib (concat idlwave-scanning-lib-dir
(file-name-nondirectory (buffer-file-name))))))
(> (length idlwave-libinfo-file) 0)
(file-accessible-directory-p
(file-name-directory idlwave-libinfo-file))
(> (length idlwave-libinfo-file) 0)
(file-accessible-directory-p
(file-name-directory idlwave-libinfo-file))
"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
"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
;;(sort idlwave-library-routines 'idlwave-routine-entry-compare))
;;(message "Sorting...done")
(message "Creating libinfo file...")
;;(sort idlwave-library-routines 'idlwave-routine-entry-compare))
;;(message "Sorting...done")
(message "Creating libinfo file...")
(when (file-directory-p dir)
(setq files (nreverse (directory-files dir t "[^.]")))
(while (setq file (pop files))
(when (file-directory-p dir)
(setq files (nreverse (directory-files dir t "[^.]")))
(while (setq file (pop files))
;;----- Asking the shell -------------------
;; First, here is the idl program which can be used to query IDL for
;;----- Asking the shell -------------------
;; First, here is the idl program which can be used to query IDL for
(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
(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
;; Get routine info
pars = routine_info(name,/parameters,functions=func)
source = routine_info(name,/source,functions=func)
;; Get routine info
pars = routine_info(name,/parameters,functions=func)
source = routine_info(name,/source,functions=func)
class = strmid(name,0,methsep)
name = strmid(name,methsep+2,strlen(name)-1)
class = strmid(name,0,methsep)
name = strmid(name,methsep+2,strlen(name)-1)
;; remove the self argument
wh = where(args ne 'SELF',nargs)
if nargs gt 0 then args = args(wh)
;; remove the self argument
wh = where(args ne 'SELF',nargs)
if nargs gt 0 then args = args(wh)
print,ret + ': ' + name + sep + class + sep + source(0).path $
+ sep + cs + sep + kwstring
end
print,ret + ': ' + name + sep + class + sep + source(0).path $
+ sep + cs + sep + kwstring
end
if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single)
end
;; END OF IDLWAVE SUPPORT ROUTINES
if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single)
end
;; END OF IDLWAVE SUPPORT ROUTINES
(concat ".run " idlwave-shell-temp-pro-file)
nil 'hide)
; (message "SENDING SAVE") ; ????????????????????????
(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"
+ (format "save,'idlwave_routine_info','idlwave_print_info_entry',FILE='%s',/ROUTINES"
(idlwave-all-class-inherits class-selector)))
(isa (concat "procedure" (if class-selector "-method" "")))
(type-selector 'pro))
(idlwave-all-class-inherits class-selector)))
(isa (concat "procedure" (if class-selector "-method" "")))
(type-selector 'pro))
(list 'routine nil type-selector class-selector nil super-classes))
(idlwave-complete-in-buffer
'procedure (if class-selector 'method 'routine)
(list 'routine nil type-selector class-selector nil super-classes))
(idlwave-complete-in-buffer
'procedure (if class-selector 'method 'routine)
(idlwave-all-class-inherits class-selector)))
(isa (concat "function" (if class-selector "-method" "")))
(type-selector 'fun))
(idlwave-all-class-inherits class-selector)))
(isa (concat "function" (if class-selector "-method" "")))
(type-selector 'fun))
(list 'routine nil type-selector class-selector nil super-classes))
(idlwave-complete-in-buffer
'function (if class-selector 'method 'routine)
(list 'routine nil type-selector class-selector nil super-classes))
(idlwave-complete-in-buffer
'function (if class-selector 'method 'routine)
(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 list (idlwave-fix-keywords name 'pro class list))
(unless list (error (format "No keywords available for procedure %s"
(idlwave-make-full-name class name))))
(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)
(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)
(idlwave-make-full-name class name)))
(unless list (error (format "No keywords available for function %s"
msg-name)))
(idlwave-make-full-name class name)))
(unless list (error (format "No keywords available for function %s"
msg-name)))
(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)
(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)
"List of special completion functions.
These functions are called for each completion. Each function must check
if its own special completion context is present. If yes, it should
"List of special completion functions.
These functions are called for each completion. Each function must check
if its own special completion context is present. If yes, it should
-use `idlwave-complete-in-buffer' to do some completion and return `t'.
-If such a function returns `t', *no further* attempts to complete
-other contexts will be done. If the function returns `nil', other completions
+use `idlwave-complete-in-buffer' to do some completion and return t.
+If such a function returns t, *no further* attempts to complete
+other contexts will be done. If the function returns nil, other completions
"Procedure: " (idlwave-routines) 'idlwave-selector))))
(setq pro (idlwave-sintern-routine pro))
(list nil-list nil-list 'procedure-keyword
"Procedure: " (idlwave-routines) 'idlwave-selector))))
(setq pro (idlwave-sintern-routine pro))
(list nil-list nil-list 'procedure-keyword
"Function: " (idlwave-routines) 'idlwave-selector))))
(setq func (idlwave-sintern-routine func))
(list nil-list nil-list 'function-keyword
"Function: " (idlwave-routines) 'idlwave-selector))))
(setq func (idlwave-sintern-routine func))
(list nil-list nil-list 'function-keyword
(stringp idlwave-shell-default-directory)
(file-directory-p idlwave-shell-default-directory))
idlwave-shell-default-directory
(stringp idlwave-shell-default-directory)
(file-directory-p idlwave-shell-default-directory))
idlwave-shell-default-directory
(defun idlwave-rinfo-assoc (name type class list)
"Like `idlwave-rinfo-assq', but sintern strings first."
(defun idlwave-rinfo-assoc (name type class list)
"Like `idlwave-rinfo-assq', but sintern strings first."
;; 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
;; 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
(setq class (or (nth 2 (idlwave-current-routine)) class)))
;; Before prompting, try any special class determination routines
(setq class (or (nth 2 (idlwave-current-routine)) class)))
;; Before prompting, try any special class determination routines
(error "No classes available with method %s" (car info)))
((and (= (length class-alist) 1) (not force-query))
(car (car class-alist)))
(error "No classes available with method %s" (car info)))
((and (= (length class-alist) 1) (not force-query))
(car (car class-alist)))
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
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
be completed here.
LAST-CHAR last relevant character before point (non-white non-comment,
not part of current identifier or leading slash).
be completed here.
LAST-CHAR last relevant character before point (non-white non-comment,
not part of current identifier or leading slash).
CLASS: What class has the routine (nil=no, t=is method, but class unknown)
ARROW: Location of the arrow"
(idlwave-routines)
CLASS: What class has the routine (nil=no, t=is method, but class unknown)
ARROW: Location of the arrow"
(idlwave-routines)
(bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
(func-entry (idlwave-what-function bos))
(func (car func-entry))
(bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
(func-entry (idlwave-what-function bos))
(func (car func-entry))
(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))
(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))
"\\(::\\|\\<\\)\\([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)
"\\(::\\|\\<\\)\\([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)
"->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t)
(setq arrow-start (copy-marker (match-beginning 0))
class (or (match-string 2) t)))
"->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t)
(setq arrow-start (copy-marker (match-beginning 0))
class (or (match-string 2) t)))
;; searches to this point.
(let ((pos (point)) pro-point
pro class arrow-start string)
;; searches to this point.
(let ((pos (point)) pro-point
pro class arrow-start string)
;;(idlwave-beginning-of-statement)
(idlwave-start-of-substatement 'pre)
(setq string (buffer-substring (point) pos))
;;(idlwave-beginning-of-statement)
(idlwave-start-of-substatement 'pre)
(setq string (buffer-substring (point) pos))
"\\`[ \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))
"\\`[ \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))
"\\`[ \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))
"\\`[ \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))
(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
(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
idlwave-complete-empty-string-as-lower-case)
(not idlwave-completion-force-default-case))
(setq list (mapcar (lambda (x)
idlwave-complete-empty-string-as-lower-case)
(not idlwave-completion-force-default-case))
(setq list (mapcar (lambda (x)
"^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t))))
;; Yank the full class specification
(insert (match-string 2))
;; Do the completion
"^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t))))
;; Yank the full class specification
(insert (match-string 2))
;; Do the completion
;; 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
;; 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
(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
(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
(idlwave-class-or-superclass-with-tag class-selector x)))
;; Multiple classes for method of method-keyword
(setq classes
(idlwave-class-or-superclass-with-tag class-selector x)))
;; Multiple classes for method of method-keyword
(setq classes
(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))
(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))
;;----------------------------------------------------------------------
;;----------------------------------------------------------------------
;;----------------------------------------------------------------------
;;----------------------------------------------------------------------
(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)))
(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)))
'choose-completion 'idlwave-choose-completion new-map)
(substitute-key-definition
'mouse-choose-completion 'idlwave-mouse-choose-completion new-map)
'choose-completion 'idlwave-choose-completion new-map)
(substitute-key-definition
'mouse-choose-completion 'idlwave-mouse-choose-completion new-map)
;;
;; - Go again over the documentation how to write a completion
;; plugin. It is in self.el, but currently still very bad.
;;
;; - 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.
+;; This could be in a separate file in the distribution, or
+;; in an appendix for the manual.
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
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
(let* ((pro (concat (downcase class) "__define"))
(class (idlwave-sintern-class class))
(idlwave-auto-routine-info-updates nil)
(let* ((pro (concat (downcase class) "__define"))
(class (idlwave-sintern-class class))
(idlwave-auto-routine-info-updates nil)
;; 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))
;; 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))
(concat class-selector "__define"))
nil))
(let ((idlwave-cpl-bold idlwave-current-native-class-tags))
(idlwave-complete-in-buffer
(concat class-selector "__define"))
nil))
(let ((idlwave-cpl-bold idlwave-current-native-class-tags))
(idlwave-complete-in-buffer
;; 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
;; 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
(skip-chars-backward "[a-zA-Z0-9_$]")
(equal (char-before) ?!))
(setq idlwave-completion-help-info '(idlwave-complete-sysvar-help))
(skip-chars-backward "[a-zA-Z0-9_$]")
(equal (char-before) ?!))
(setq idlwave-completion-help-info '(idlwave-complete-sysvar-help))
(or tags (error "System variable !%s is not a structure" var))
(setq idlwave-completion-help-info
(list 'idlwave-complete-sysvar-help var))
(or tags (error "System variable !%s is not a structure" var))
(setq idlwave-completion-help-info
(list 'idlwave-complete-sysvar-help var))
;; Here we fake help using the routine "system variables" with keyword
;; set to the sysvar. Name and kwd are global variables here.
;; Here we fake help using the routine "system variables" with keyword
;; set to the sysvar. Name and kwd are global variables here.
idlwave-system-class-info)
(error "No help available for system class tags."))
(setq name (concat class-with "__define"))))
idlwave-system-class-info)
(error "No help available for system class tags."))
(setq name (concat class-with "__define"))))
(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."
(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."
(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))
(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))
"*Completions*") ; cib-buffer
(eq (marker-buffer idlwave-completion-mark)
(current-buffer)) ; buffer OK
"*Completions*") ; cib-buffer
(eq (marker-buffer idlwave-completion-mark)
(current-buffer)) ; buffer OK
(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)))
(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)))
(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
(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
(if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)"
resolve)
(setq type (match-string 1 resolve)
(if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)"
resolve)
(setq type (match-string 1 resolve)
(format "resolve_routine,'%s'%s" (downcase name) kwd)
'idlwave-update-routine-info
nil t))
(t
(format "resolve_routine,'%s'%s" (downcase name) kwd)
'idlwave-update-routine-info
nil t))
(t
- (list 'idlwave-shell-send-command
- (format "resolve_routine,'%s__%s'%s"
+ (list 'idlwave-shell-send-command
+ (format "resolve_routine,'%s__%s'%s"
(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>")))
(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>")))
(cond
((or (null name) (equal name ""))
(error "Abort"))
((null entry)
(error "Nothing known about a module %s" name2))
((eq (car source) 'system)
(cond
((or (null name) (equal name ""))
(error "Abort"))
((null entry)
(error "Nothing known about a module %s" name2))
((eq (car source) 'system)
(if (eq (car source) 'lib)
(idlwave-find-file-noselect
(idlwave-expand-lib-file-name
(if (eq (car source) 'lib)
(idlwave-find-file-noselect
(idlwave-expand-lib-file-name
(not (equal this-word ""))
(or (eq next-char ?\() ; exclude arrays, vars.
(looking-at "[a-zA-Z0-9_]*[ \t]*(")))
(not (equal this-word ""))
(or (eq next-char ?\() ; exclude arrays, vars.
(looking-at "[a-zA-Z0-9_]*[ \t]*(")))
string)
(setq class (idlwave-sintern-class (match-string 1 string)))
(setq idlwave-current-obj_new-class class)
string)
(setq class (idlwave-sintern-class (match-string 1 string)))
(setq idlwave-current-obj_new-class class)
;; If we have inheritance, add all keywords from superclasses, if
;; the user indicated that method in
;; `idlwave-keyword-class-inheritance'
;; If we have inheritance, add all keywords from superclasses, if
;; the user indicated that method in
;; `idlwave-keyword-class-inheritance'
(defvar idlwave-rinfo-mouse-map (make-sparse-keymap))
(defvar idlwave-rinfo-map (make-sparse-keymap))
(defvar idlwave-rinfo-mouse-map (make-sparse-keymap))
(defvar idlwave-rinfo-map (make-sparse-keymap))
(if (featurep 'xemacs) [button3] [mouse-3])
'idlwave-mouse-active-rinfo-right)
(define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space)
(if (featurep 'xemacs) [button3] [mouse-3])
'idlwave-mouse-active-rinfo-right)
(define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space)
idlwave-unresolved-routines)))
(name (or (car entry) name))
(class (or (nth 2 entry) class))
idlwave-unresolved-routines)))
(name (or (car entry) name))
(class (or (nth 2 entry) class))
(setq cnt 1 total (length all))
(while (setq entry (pop all))
(setq props (list 'mouse-face 'highlight
(setq cnt 1 total (length all))
(while (setq entry (pop all))
(setq props (list 'mouse-face 'highlight
'source (cons (car (nth 2 entry)) (nth 1 entry))
'data (cons 'source data)))
(idlwave-insert-source-location
'source (cons (car (nth 2 entry)) (nth 1 entry))
'data (cons 'source data)))
(idlwave-insert-source-location
(incf cnt)
(when (and all (> cnt idlwave-rinfo-max-source-lines))
;; No more source lines, please
(incf cnt)
(when (and all (> cnt idlwave-rinfo-max-source-lines))
;; No more source lines, please
command can be used to detect possible name clashes during this process."
(idlwave-routines) ; Make sure everything is loaded.
(unless idlwave-library-routines
command can be used to detect possible name clashes during this process."
(idlwave-routines) ; Make sure everything is loaded.
(unless idlwave-library-routines
"You don't have a library catalog. Continue anyway? ")
(error "Abort")))
(let* ((routines (append idlwave-system-routines
"You don't have a library catalog. Continue anyway? ")
(error "Abort")))
(let* ((routines (append idlwave-system-routines
(message "Sorting routines...done")
(define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)])
(message "Sorting routines...done")
(define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)])
(interactive "e")
(mouse-set-point ev)
(apply 'idlwave-do-find-module
(get-text-property (point) 'find-args))))
(define-key keymap [(return)]
(interactive "e")
(mouse-set-point ev)
(apply 'idlwave-do-find-module
(get-text-property (point) 'find-args))))
(define-key keymap [(return)]
(if (eq (nth 1 routine) 'fun) "()" "")))
(while (setq twin (pop dtwins))
(setq props1 (append (list 'find-args
(if (eq (nth 1 routine) 'fun) "()" "")))
(while (setq twin (pop dtwins))
(setq props1 (append (list 'find-args
(or (not (stringp sfile))
(not (string-match "\\S-" sfile))))
(setq stype 'unresolved))
(or (not (stringp sfile))
(not (string-match "\\S-" sfile))))
(setq stype 'unresolved))
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
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
(setq thefile (or thefile file))
(if (setq entry (assoc key alist))
(push type (nth 2 entry))
(push (list key file (list type)) alist)))
(setq thefile (or thefile file))
(if (setq entry (assoc key alist))
(push type (nth 2 entry))
(push (list key file (list type)) alist)))
(when syslibp
;; File is system *library* - remove any system entry
(setq alist (delq (assoc 'system alist) alist)))
(when syslibp
;; File is system *library* - remove any system entry
(setq alist (delq (assoc 'system alist) alist)))
;; 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)))))
;; 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)))))
(defun idlwave-launch-idlhelp ()
"Start the IDLhelp application."
(interactive)
(start-process "idlhelp" nil idlwave-help-application))
(defun idlwave-launch-idlhelp ()
"Start the IDLhelp application."
(interactive)
(start-process "idlhelp" nil idlwave-help-application))
idlwave-mode-debug-menu-def)))
(defun idlwave-customize ()
"Call the customize function with idlwave as argument."
(interactive)
idlwave-mode-debug-menu-def)))
(defun idlwave-customize ()
"Call the customize function with idlwave as argument."
(interactive)
(princ "=========================================\n\n")
(princ (format fmt "KEY" "REPLACE" "HOOK"))
(princ (format fmt "---" "-------" "----")))
(princ "=========================================\n\n")
(princ (format fmt "KEY" "REPLACE" "HOOK"))
(princ (format fmt "---" "-------" "----")))