Function: idlwave-struct-inherits

idlwave-struct-inherits is a byte-compiled function defined in idlwave.el.gz.

Signature

(idlwave-struct-inherits)

Documentation

Return a list of all inherits names in the struct at point.

Point is expected just before the opening { of the struct definition.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/idlwave.el.gz
(defun idlwave-struct-inherits ()
  "Return a list of all `inherits' names in the struct at point.
Point is expected just before the opening `{' of the struct definition."
  (save-excursion
    (let* ((borders (idlwave-struct-borders))
	   (beg (car borders))
	   (end (cdr borders))
	   (case-fold-search t)
	   names)
      (goto-char beg)
      (save-restriction
	(narrow-to-region beg end)
	(while (re-search-forward
		(concat "[{,]"  ;leading comma/brace
			idlwave-struct-skip ; 4 groups
			"inherits"    ; The INHERITS tag
			idlwave-struct-skip ; 4 more
			"\\([a-zA-Z][a-zA-Z0-9_]*\\)") ; The super-group, #9
		end t)
	  ;; Check if we are still on the top level of the structure.
	  (if (and (condition-case nil (progn (up-list -1) t) (error nil))
		   (= (point) beg))
	      (push (match-string-no-properties 9) names))
	  (goto-char (match-end 0))))
      (nreverse names))))