Commit fca8b94c authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

(idlwave-completion-help-info): Add defvar.

parent 691ccfad
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
;; ;;
;; INSTALLATION ;; INSTALLATION
;; ============ ;; ============
;; Put this file on the emacs load path and load it with the following ;; Put this file on the emacs load path and load it with the following
;; line in your .emacs file: ;; line in your .emacs file:
;; ;;
;; (add-hook 'idlwave-load-hook ;; (add-hook 'idlwave-load-hook
;; (lambda () (require 'idlw-complete-structtag))) ;; (lambda () (require 'idlw-complete-structtag)))
;; ;;
;; DESCRIPTION ;; DESCRIPTION
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
;; - You can force an update of the tag list with the usual command ;; - You can force an update of the tag list with the usual command
;; to update routine info in IDLWAVE: C-c C-i ;; to update routine info in IDLWAVE: C-c C-i
(defvar idlwave-completion-help-info)
;; Some variables to identify the previously used structure ;; Some variables to identify the previously used structure
(defvar idlwave-current-tags-var nil) (defvar idlwave-current-tags-var nil)
...@@ -144,9 +145,9 @@ an up-to-date completion list." ...@@ -144,9 +145,9 @@ an up-to-date completion list."
(not (equal start idlwave-current-tags-completion-pos))) (not (equal start idlwave-current-tags-completion-pos)))
(idlwave-prepare-structure-tag-completion var)) (idlwave-prepare-structure-tag-completion var))
(setq idlwave-current-tags-completion-pos start) (setq idlwave-current-tags-completion-pos start)
(setq idlwave-completion-help-info (setq idlwave-completion-help-info
(list 'idlwave-complete-structure-tag-help)) (list 'idlwave-complete-structure-tag-help))
(idlwave-complete-in-buffer 'structtag 'structtag (idlwave-complete-in-buffer 'structtag 'structtag
idlwave-current-struct-tags nil idlwave-current-struct-tags nil
"Select a structure tag" "structure tag") "Select a structure tag" "structure tag")
t) ; we did the completion: return t to skip other completions t) ; we did the completion: return t to skip other completions
...@@ -165,7 +166,7 @@ an up-to-date completion list." ...@@ -165,7 +166,7 @@ an up-to-date completion list."
(if (eq major-mode 'idlwave-shell-mode) (if (eq major-mode 'idlwave-shell-mode)
;; OK, we are in the shell, do it dynamically ;; OK, we are in the shell, do it dynamically
(progn (progn
(message "preparing shell tags") (message "preparing shell tags")
;; The following call puts the tags into `idlwave-current-struct-tags' ;; The following call puts the tags into `idlwave-current-struct-tags'
(idlwave-complete-structure-tag-query-shell var) (idlwave-complete-structure-tag-query-shell var)
;; initialize ;; initialize
...@@ -187,7 +188,7 @@ an up-to-date completion list." ...@@ -187,7 +188,7 @@ an up-to-date completion list."
;; Find possible definitions of the structure. ;; Find possible definitions of the structure.
(while (idlwave-find-structure-definition var nil 'all) (while (idlwave-find-structure-definition var nil 'all)
(let ((tags (idlwave-struct-tags))) (let ((tags (idlwave-struct-tags)))
(when tags (when tags
;; initialize ;; initialize
(setq idlwave-sint-structtags nil (setq idlwave-sint-structtags nil
idlwave-current-tags-buffer (current-buffer) idlwave-current-tags-buffer (current-buffer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment