Function: hbdata:write

hbdata:write is a byte-compiled function defined in hbdata.el.

Signature

(hbdata:write &optional ORIG-LBL-KEY BUT-SYM NEW-LBL-KEY)

Documentation

Try to write Hyperbole button data from optional ORIG-LBL-KEY and BUT-SYM.

ORIG-LBL-KEY nil means create a new entry, otherwise modify existing one. BUT-SYM nil means use hbut:current. If successful, return a button instance string to append to button label or t when first instance. On failure, return nil.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbdata.el
(defun hbdata:write (&optional orig-lbl-key but-sym new-lbl-key)
  "Try to write Hyperbole button data from optional ORIG-LBL-KEY and BUT-SYM.
ORIG-LBL-KEY nil means create a new entry, otherwise modify existing one.
BUT-SYM nil means use `hbut:current'.  If successful, return
a button instance string to append to button label or t when first instance.
On failure, return nil."
  (let ((cons (hbdata:ebut-build orig-lbl-key but-sym new-lbl-key))
	entry lbl-instance)
    (unless (or (and (hypb:buffer-file-name) (not (file-writable-p (hypb:buffer-file-name))))
		(null cons))
      (setq entry (car cons) lbl-instance (cdr cons))
      (prin1 entry (current-buffer))
      (terpri (current-buffer))
      (or lbl-instance t))))