Function: append-next-kill

append-next-kill is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(append-next-kill &optional INTERACTIVE)

Documentation

Cause following command, if it kills, to add to previous kill.

If the next command kills forward from point, the kill is appended to the previous killed text. If the command kills backward, the kill is prepended. Kill commands that act on the region, such as kill-region, are regarded as killing forward if point is after mark, and killing backward if point is before mark.

If the next command is not a kill command, append-next-kill has no effect.

The argument is used for internal purposes; do not supply one.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun append-next-kill (&optional interactive)
  "Cause following command, if it kills, to add to previous kill.
If the next command kills forward from point, the kill is
appended to the previous killed text.  If the command kills
backward, the kill is prepended.  Kill commands that act on the
region, such as `kill-region', are regarded as killing forward if
point is after mark, and killing backward if point is before
mark.

If the next command is not a kill command, `append-next-kill' has
no effect.

The argument is used for internal purposes; do not supply one."
  (interactive "p")
  ;; We don't use (interactive-p), since that breaks kbd macros.
  (if interactive
      (progn
	(setq this-command 'kill-region)
	(message "If the next command is a kill, it will append"))
    (setq last-command 'kill-region)))