Function: idlwave-scan-class-info

idlwave-scan-class-info is a byte-compiled function defined in idlwave.el.gz.

Signature

(idlwave-scan-class-info CLASS)

Documentation

Scan all class and named structure info in the class__define pro.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/idlwave.el.gz
(defun idlwave-scan-class-info (class)
  "Scan all class and named structure info in the class__define pro."
  (let* ((idlwave-auto-routine-info-updates nil)
	 (filebuf (idlwave-class-file-or-buffer class))
	 (file (car filebuf))
	 (buf (cdr filebuf))
	 (class (idlwave-sintern-class class)))
    (if (or
	 (not file)
	 (and ;; neither a regular file nor a visited buffer
	  (not buf)
	  (not (file-regular-p file))))
	nil ; Cannot find the file/buffer to get any info
      (save-excursion
	(if buf (set-buffer buf)
	  ;; Read the file in temporarily
	  (set-buffer (get-buffer-create " *IDLWAVE-tmp*"))
	  (erase-buffer)
	  (unless (derived-mode-p 'idlwave-mode)
	    (idlwave-mode))
	  (insert-file-contents file))
	(save-excursion
	  (goto-char 1)
	  (idlwave-find-class-definition class
	   ;; Scan all of the structures found there
	   (lambda (name)
	     (let* ((this-class (idlwave-sintern-class name))
		    (entry
		     (list this-class
			   (cons 'tags (idlwave-struct-tags))
			   (cons 'inherits (idlwave-struct-inherits)))))
	       (if (not (eq this-class class))
		   (setq entry (nconc entry (list (cons 'found-in class)))))
	       (idlwave-sintern-class-info entry)
	       (push entry idlwave-class-info)))))))))