Function: kotl-mode:yank
kotl-mode:yank is an interactive and byte-compiled function defined in
kotl-mode.el.
Signature
(kotl-mode:yank &optional ARG)
Documentation
Reinsert ("paste") the last stretch of killed text.
More precisely, reinsert the most recent kill, which is the
stretch of killed text most recently killed OR yanked. Put point
at the end, and set mark at the beginning without activating it.
With just C-u (universal-argument) as argument, put point at beginning,
and mark at end. With argument N, reinsert the Nth most recent kill.
When this command inserts text into the buffer, it honors the
yank-handled-properties and yank-excluded-properties
variables, and the yank-handler text property. See
insert-for-yank-1 for details.
See also the command yank-pop (M-y (yank-pop)).
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:yank (&optional arg)
"Reinsert (\"paste\") the last stretch of killed text.
More precisely, reinsert the most recent kill, which is the
stretch of killed text most recently killed OR yanked. Put point
at the end, and set mark at the beginning without activating it.
With just \\[universal-argument] as argument, put point at beginning,
and mark at end. With argument N, reinsert the Nth most recent kill.
When this command inserts text into the buffer, it honors the
`yank-handled-properties' and `yank-excluded-properties'
variables, and the `yank-handler' text property. See
`insert-for-yank-1' for details.
See also the command `yank-pop' (\\[yank-pop])."
(interactive "*P")
(setq yank-window-start (window-start))
;; If we don't get all the way thru, make last-command indicate that
;; for the following command.
(setq this-command t)
(push-mark (point))
(let* ((yank-text (current-kill (cond
((listp arg) 0)
((eq arg '-) -1)
(t (1- arg)))))
(indent (kcell-view:indent))
(indent-str (make-string indent ?\ )))
;; Convert all occurrences of newline to newline + cell indent.
;; Then insert into buffer.
(insert-for-yank (replace-regexp-in-string
"[\n\r]" (lambda (match) (concat match indent-str)) yank-text)))
(when (consp arg) (kotl-mode:exchange-point-and-mark))
;; If we do get all the way thru, make this-command indicate that.
(when (eq this-command t) (setq this-command 'kotl-mode:yank))
nil)