* term/xterm.el (xterm--query): Stop after first matching handler. (Bug#14615)
[bpt/emacs.git] / lisp / progmodes / idlw-complete-structtag.el
index 95acc42..fd32538 100644 (file)
@@ -1,7 +1,6 @@
 ;;; idlw-complete-structtag.el --- Completion of structure tags.
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@astro.uva.nl>
 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
@@ -54,8 +53,8 @@
 ;;
 ;; INSTALLATION
 ;; ============
-;; Put this file on the emacs load path and load it with the following 
-;; line in your .emacs file:
+;; Put this file on the emacs load path and load it with the following
+;; line in your init file:
 ;;
 ;;   (add-hook 'idlwave-load-hook 
 ;;             (lambda () (require 'idlw-complete-structtag)))
@@ -167,7 +166,7 @@ an up-to-date completion list."
 (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 (eq major-mode 'idlwave-shell-mode)
+  (if (derived-mode-p 'idlwave-shell-mode)
       ;; OK, we are in the shell, do it dynamically
       (progn
         (message "preparing shell tags") 
@@ -225,9 +224,8 @@ an up-to-date completion list."
 
 
 ;; Fake help in the source buffer for structure tags.
-;; kwd and name are global-variables here.
-(defvar name)
-(defvar kwd)
+;; idlw-help-kwd is a global-variable (from idlwave-do-mouse-completion-help).
+(defvar idlw-help-kwd)
 (defvar idlwave-help-do-struct-tag)
 (defun idlwave-complete-structure-tag-help (mode word)
   (cond
@@ -236,13 +234,10 @@ an up-to-date completion list."
     (not (equal idlwave-current-tags-buffer
                 (get-buffer (idlwave-shell-buffer)))))
    ((eq mode 'set)
-    (setq kwd word
+    (setq idlw-help-kwd word
          idlwave-help-do-struct-tag idlwave-structtag-struct-location))
    (t (error "This should not happen"))))
 
 (provide 'idlw-complete-structtag)
 
 ;;; idlw-complete-structtag.el ends here
-
-
-;; arch-tag: d1f9e55c-e504-4187-9c31-3c3651fa4bfa