Function: c-put-char-property

c-put-char-property is a macro defined in cc-defs.el.gz.

Signature

(c-put-char-property POS PROPERTY VALUE)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-defs.el.gz
(cc-bytecomp-defun c-put-char-property-fun) ; Make it known below.

(defmacro c-put-char-property (pos property value)
  ;; Put the given property with the given value on the character at
  ;; POS and make it front and rear nonsticky, or start and end open
  ;; in XEmacs vocabulary.  If the character already has the given
  ;; property then the value is replaced, and the behavior is
  ;; undefined if that property has been put by some other function.
  ;; PROPERTY is assumed to be constant.
  ;;
  ;; If there's a `text-property-default-nonsticky' variable (Emacs
  ;; 21) then it's assumed that the property is present on it.
  ;;
  ;; This macro does a hidden buffer change.
  (declare (debug t))
  (setq property (eval property))
  (if (or c-use-extents
	  (not (cc-bytecomp-boundp 'text-property-default-nonsticky)))
      ;; XEmacs and Emacs < 21.
      `(c-put-char-property-fun ,pos ',property ,value)
    ;; In Emacs 21 we got the `rear-nonsticky' property covered
    ;; by `text-property-default-nonsticky'.
    `(let ((-pos- ,pos))
       ,@(when (and (fboundp 'syntax-ppss)
		    (eq `,property 'syntax-table))
	   `((setq c-syntax-table-hwm (min c-syntax-table-hwm -pos-))))
       (put-text-property -pos- (1+ -pos-) ',property ,value))))