Function: idlwave-prepare-structure-tag-completion
idlwave-prepare-structure-tag-completion is a byte-compiled function
defined in idlw-complete-structtag.el.gz.
Signature
(idlwave-prepare-structure-tag-completion VAR)
Documentation
Find and parse the tag list for structure tag completion.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/idlw-complete-structtag.el.gz
(defun idlwave-prepare-structure-tag-completion (var)
"Find and parse the tag list for structure tag completion."
;; This works differently in source buffers and in the shell
(if (derived-mode-p 'idlwave-shell-mode)
;; OK, we are in the shell, do it dynamically
(progn
(message "preparing shell tags")
;; The following call puts the tags into `idlwave-current-struct-tags'
(idlwave-complete-structure-tag-query-shell var)
;; initialize
(setq idlwave-sint-structtags nil
idlwave-current-tags-buffer (current-buffer)
idlwave-current-tags-var var
idlwave-structtag-struct-location (point)
idlwave-current-struct-tags
(mapcar (lambda (x)
(list (idlwave-sintern-structtag x 'set)))
idlwave-current-struct-tags))
(if (not idlwave-current-struct-tags)
(error "Cannot complete structure tags of variable %s" var)))
;; Not the shell, so probably a source buffer.
(unless
(catch 'exit
(save-excursion
(goto-char (point-max))
;; Find possible definitions of the structure.
(while (idlwave-find-structure-definition var nil 'all)
(let ((tags (idlwave-struct-tags)))
(when tags
;; initialize
(setq idlwave-sint-structtags nil
idlwave-current-tags-buffer (current-buffer)
idlwave-current-tags-var var
idlwave-structtag-struct-location (point)
idlwave-current-struct-tags
(mapcar (lambda (x)
(list (idlwave-sintern-structtag x 'set)))
tags))
(throw 'exit t))))))
(error "Cannot complete structure tags of variable %s" var))))