Function: c-search-forward-char-property-with-value-on-char

c-search-forward-char-property-with-value-on-char is a macro defined in cc-defs.el.gz.

Signature

(c-search-forward-char-property-with-value-on-char PROPERTY VALUE CHAR &optional LIMIT)

Documentation

Search forward for a text-property PROPERTY having value VALUE on a character with value CHAR. LIMIT bounds the search. The value comparison is done with equal. PROPERTY must be a constant.

Leave point just after the character, and set the match data on this character, and return point. If the search fails, return nil; point is then left undefined.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-defs.el.gz
(defmacro c-search-forward-char-property-with-value-on-char
    (property value char &optional limit)
  "Search forward for a text-property PROPERTY having value VALUE on a
character with value CHAR.
LIMIT bounds the search.  The value comparison is done with `equal'.
PROPERTY must be a constant.

Leave point just after the character, and set the match data on
this character, and return point.  If the search fails, return
nil; point is then left undefined."
  (declare (debug t))
  `(let ((char-skip (concat "^" (char-to-string ,char)))
	 (-limit- (or ,limit (point-max)))
	 (-value- ,value))
     (while
	 (and
	  (progn (skip-chars-forward char-skip -limit-)
		 (< (point) -limit-))
	  (not (equal (c-get-char-property (point) ,property) -value-)))
       (forward-char))
     (when (< (point) -limit-)
       (search-forward-regexp "\\(\n\\|.\\)")	; to set the match-data.
       (point))))