Function: kotl-mode:remove-cell-attribute
kotl-mode:remove-cell-attribute is an interactive and byte-compiled
function defined in kotl-mode.el.
Signature
(kotl-mode:remove-cell-attribute ATTRIBUTE &optional POS TOP-CELL-FLAG)
Documentation
Remove ATTRIBUTE from the current cell or the cell at optional POS.
With optional prefix arg TOP-CELL-FLAG non-nil, removethe hidden top cell's ATTRIBUTE and ignore any value of POS.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:remove-cell-attribute (attribute &optional pos top-cell-flag)
"Remove ATTRIBUTE from the current cell or the cell at optional POS.
With optional prefix arg TOP-CELL-FLAG non-nil, removethe hidden top cell's
ATTRIBUTE and ignore any value of POS."
(interactive
(let* ((plist (copy-sequence (kcell-view:plist)))
(existing-attributes plist)
(top-cell-flag (zerop (prefix-numeric-value
current-prefix-arg)))
attribute)
(barf-if-buffer-read-only)
;; Remove attribute values leaving only attribute symbols in existing-attributes.
(while plist
(setcdr plist (cdr (cdr plist)))
(setq plist (cdr plist)))
;; Remove read-only attributes
(setq existing-attributes (apply #'set:create existing-attributes)
existing-attributes (set:difference
existing-attributes
kcell:read-only-attributes))
(while (zerop (length (setq attribute
(completing-read
(format "Name of attribute to remove from cell <%s>: "
(if top-cell-flag
"0"
(kcell-view:label)))
(mapcar 'list
(mapcar 'symbol-name
existing-attributes))))))
(beep))
(setq attribute (intern attribute))
(list attribute nil top-cell-flag)))
(barf-if-buffer-read-only)
(if top-cell-flag
(kcell:remove-attr (kview:top-cell kotl-kview) attribute)
(kcell-view:remove-attr attribute pos))
;; Note that buffer needs to be saved to store modified property list.
(set-buffer-modified-p t)
(when (called-interactively-p 'interactive)
(message "Attribute `%s' removed from cell <%s>."
attribute (if top-cell-flag
"0"
(kcell-view:label pos)))))