Function: idlwave-what-procedure
idlwave-what-procedure is a byte-compiled function defined in
idlwave.el.gz.
Signature
(idlwave-what-procedure &optional BOUND)
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/idlwave.el.gz
(defun idlwave-what-procedure (&optional _bound)
;; Find out if point is within the argument list of a procedure.
;; The return value is ("procedure-name" class arrow-pos (point)).
;; If the optional BOUND is an integer, bound backwards directed
;; searches to this point.
(let ((pos (point)) pro-point
pro class arrow-start string)
(save-excursion
;;(idlwave-beginning-of-statement)
(idlwave-start-of-substatement 'pre)
(setq string (buffer-substring (point) pos))
(if (string-match
"\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string)
(setq pro (match-string 1 string)
pro-point (+ (point) (match-beginning 1)))
(if (and (idlwave-skip-object)
(setq string (buffer-substring (point) pos))
(string-match
"\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)"
string))
(setq pro (if (match-beginning 4)
(match-string 4 string))
pro-point (if (match-beginning 4)
(+ (point) (match-beginning 4))
pos)
arrow-start (copy-marker (+ (point) (match-beginning 1)))
class (or (match-string 3 string) t)))))
(list (idlwave-sintern-routine-or-method pro class)
(idlwave-sintern-class class)
arrow-start
pro-point)))