Function: idlwave-complete-sysvar-or-tag
idlwave-complete-sysvar-or-tag is an interactive and byte-compiled
function defined in idlwave.el.gz.
Signature
(idlwave-complete-sysvar-or-tag)
Documentation
Complete a system variable.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/idlwave.el.gz
(defun idlwave-complete-sysvar-or-tag ()
"Complete a system variable."
(interactive)
(let ((pos (point))
(case-fold-search t))
(cond ((save-excursion
;; Check if the context is right for system variable
(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")
t) ; return t to skip other completions
((save-excursion
;; Check if the context is right for sysvar tag
(skip-chars-backward "a-zA-Z0-9_$.")
(and (equal (char-before) ?!)
(looking-at "\\([a-zA-Z][a-zA-Z0-9_$]*\\)\\.")
(<= (match-end 0) pos)))
;; Complete a system variable tag
(let* ((var (idlwave-sintern-sysvar (match-string 1)))
(entry (assq var idlwave-system-variables-alist))
(tags (cdr (assq 'tags entry))))
(or entry (error "!%s is not a known system variable" var))
(or tags (error "System variable !%s is not a structure" var))
(setq idlwave-completion-help-info
(list 'idlwave-complete-sysvar-tag-help var))
(idlwave-complete-in-buffer 'sysvartag 'sysvartag
tags nil
"Select a system variable tag"
"system variable tag")
t)) ; return t to skip other completions
(t nil))))