Function: klink:replace-label

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

Signature

(klink:replace-label KLINK LINK-BUF START NEW-LABEL)

Documentation

Replace out of date relative id in a link reference of the form, relid=idstamp.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/klink.el
(defun klink:replace-label (klink link-buf start new-label)
  "Replace out of date relative id in a link reference of the form, relid=idstamp."
  (with-current-buffer link-buf
    (if buffer-read-only
	(message "Relative label should be `%s' in klink <%s>."
		 new-label klink)
      (goto-char start)
      (cond ((or (looking-at "<\\s-*[#@]\\s-*")
		 (looking-at "[^,]+?[#,]\\s-*"))
	     (goto-char (match-end 0))
	     (zap-to-char 1 ?=)
	     (insert new-label ?=))
	    (t nil)))))