Function: idlwave-find-class-definition

idlwave-find-class-definition is a byte-compiled function defined in idlwave.el.gz.

Signature

(idlwave-find-class-definition CLASS &optional ALL-HOOK ALT-CLASS)

Documentation

Find class structure definition(s).

If ALL-HOOK is set, find all named structure definitions in a given class__define routine, on which ALL-HOOK will be run. If ALT-CLASS is set, look for the name__define pro, and inside of it, for the ALT-CLASS class/struct definition.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/idlwave.el.gz
(defun idlwave-find-class-definition (class &optional all-hook alt-class)
  "Find class structure definition(s).
If ALL-HOOK is set, find all named structure definitions in a given
class__define routine, on which ALL-HOOK will be run.  If ALT-CLASS is
set, look for the name__define pro, and inside of it, for the ALT-CLASS
class/struct definition."
  (let ((case-fold-search t) end-lim name)
    (when (re-search-forward
	   (concat "^[ \t]*pro[ \t]+" (downcase class) "__define" "\\>") nil t)
      (if all-hook
	  (progn
	    ;; For everything there
	    (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point)))
	    (while (setq name
			 (idlwave-find-structure-definition nil t end-lim))
	      (funcall all-hook name)))
	(idlwave-find-structure-definition nil (or alt-class class))))))