Function: klabel-type:parent
klabel-type:parent is a byte-compiled function defined in klabel.el.
Signature
(klabel-type:parent LABEL-TYPE)
Documentation
Return function which computes parent cell label of LABEL-TYPE.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/klabel.el
(defun klabel-type:parent (label-type)
"Return function which computes parent cell label of LABEL-TYPE."
(cond ((memq label-type '(alpha legal partial-alpha))
(intern-soft (concat "klabel:parent-"
(symbol-name label-type))))
((eq label-type 'no)
(lambda (label)
(if (equal label "0")
(error "(klabel:parent-no): 0 cell cannot have a parent")
"")))
((eq label-type 'star)
(lambda (label)
(if (string-equal label "0")
(error "(klabel:parent-star): 0 cell cannot have a parent")
(substring label 0 (1- (length label))))))
((memq label-type '(id partial-alpha))
(lambda (label)
(if (string-equal label "0")
(error "(klabel:increment-no): 0 cell cannot have a parent")
(save-excursion
(format "0%s" (if (eq (kcell-view:parent) 0)
""
(kcell-view:label (point))))))))
(t (error
"(klabel-type:parent): Invalid label type setting: `%s'"
label-type))))