Function: klink:update-label

klink:update-label is a byte-compiled function defined in klink.el.

Signature

(klink:update-label KLINK START LINK-BUF)

Documentation

Update label of KLINK if its relative cell id has changed.

Assume point is in klink referent buffer, where the klink points.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/klink.el
(defun klink:update-label (klink start link-buf)
  "Update label of KLINK if its relative cell id has changed.
Assume point is in klink referent buffer, where the klink points."
  (and (stringp klink)
       (string-match "[#@,]\\s-*\\([*0-9][*.0-9a-zA-Z]*\\)\\s-*=\\s-*0[0-9]*"
		     klink)
       ;; Then klink has both relative and permanent ids.
       (let* ((label (match-string 1 klink))
	      (new-label (kcell-view:label)))
	 (and new-label (not (equal label new-label))
	      (klink:replace-label klink link-buf start new-label)))))