Function: idlwave-look-at
idlwave-look-at is a byte-compiled function defined in idlwave.el.gz.
Signature
(idlwave-look-at REGEXP &optional CONT BEG)
Documentation
Search current line from current point for REGEXP.
If optional argument CONT is non-nil, searches to the end of the current statement. If optional arg BEG is non-nil, search starts from the beginning of the current statement. Ignores matches that end in a comment or inside a string expression. Returns point if successful, nil otherwise. This function produces unexpected results if REGEXP contains quotes or a comment delimiter. The search is case insensitive. If successful leaves point after the match, otherwise, does not move point.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/idlwave.el.gz
(defun idlwave-look-at (regexp &optional cont beg)
"Search current line from current point for REGEXP.
If optional argument CONT is non-nil, searches to the end of
the current statement.
If optional arg BEG is non-nil, search starts from the beginning of the
current statement.
Ignores matches that end in a comment or inside a string expression.
Returns point if successful, nil otherwise.
This function produces unexpected results if REGEXP contains quotes or
a comment delimiter. The search is case insensitive.
If successful leaves point after the match, otherwise, does not move point."
(let ((here (point))
(case-fold-search t)
(eos (save-excursion
(if cont (idlwave-end-of-statement) (end-of-line))
(point)))
found)
(with-syntax-table idlwave-find-symbol-syntax-table
(if beg (idlwave-beginning-of-statement))
(while (and (setq found (re-search-forward regexp eos t))
(idlwave-quoted))))
(if (not found) (goto-char here))
found))