Function: tex-search-noncomment

tex-search-noncomment is a macro defined in tex-mode.el.gz.

Signature

(tex-search-noncomment &rest BODY)

Documentation

Execute BODY as long as it return non-nil and point is in a comment.

Return the value returned by the last execution of BODY.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/tex-mode.el.gz
;;;;
;;;; LaTeX syntax navigation
;;;;

(defmacro tex-search-noncomment (&rest body)
  "Execute BODY as long as it return non-nil and point is in a comment.
Return the value returned by the last execution of BODY."
  (declare (debug t))
  (let ((res-sym (make-symbol "result")))
    `(let (,res-sym)
       (while
	   (and (setq ,res-sym (progn ,@body))
		(save-excursion (skip-chars-backward "^\n%") (not (bolp)))))
       ,res-sym)))