Function: kotl-mode:delete-blank-lines
kotl-mode:delete-blank-lines is an interactive and byte-compiled
function defined in kotl-mode.el.
Signature
(kotl-mode:delete-blank-lines)
Documentation
On blank line in a cell, delete all surrounding blank lines, leaving just one.
On isolated blank line, delete that one. On nonblank line, delete all blank lines that follow it.
If nothing but whitespace follows point until the end of a cell, delete all whitespace at the end of the cell.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:delete-blank-lines ()
"On blank line in a cell, delete all surrounding blank lines, leaving just one.
On isolated blank line, delete that one.
On nonblank line, delete all blank lines that follow it.
If nothing but whitespace follows point until the end of a cell, delete all
whitespace at the end of the cell."
(interactive "*")
;; If nothing but whitespace from point until the end of cell, remove all
;; cell trailing whitespace.
(let ((end (kcell-view:end-contents))
start)
(if (save-excursion
(skip-chars-forward " \t\n\r" end)
(not (kotl-mode:eocp)))
(kcell-view:operate #'delete-blank-lines)
(setq start (kcell-view:start))
(goto-char end)
;; delete any preceding whitespace
(skip-chars-backward " \t\n\r" start)
(delete-region (max start (point)) end)))
(kotl-mode:to-valid-position))