Function: kcell-view:set-attr

kcell-view:set-attr is a byte-compiled function defined in kview.el.

Signature

(kcell-view:set-attr ATTRIBUTE VALUE &optional POS)

Documentation

Set ATTRIBUTE's VALUE for cell and return the modified cell.

Cell is current or at optional POS. Use 0 for POS to set top cell's attributes.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kview.el
(defun kcell-view:set-attr (attribute value &optional pos)
  "Set ATTRIBUTE's VALUE for cell and return the modified cell.
Cell is current or at optional POS.
Use 0 for POS to set top cell's attributes."
  (unless (and (eq pos 0) (eq attribute 'idstamp)) ;; top cell idstamp set when Koutline is created
    (save-excursion
      (goto-char (or pos (kcell-view:plist-point)))
      (if (eq attribute 'idstamp)
	  (progn (kproperty:set attribute value)
		 (kcell-view:cell))
	;; Returns kcell
	(let ((mod-cell (kcell:set-attr (if (eq pos 0) (kview:top-cell kotl-kview) (kcell-view:cell))
					attribute value)))
	  (kproperty:add-properties (list 'kcell mod-cell))
	  mod-cell)))))