Function: sh-send-line-or-region-and-step
sh-send-line-or-region-and-step is an interactive and byte-compiled
function defined in sh-script.el.gz.
Signature
(sh-send-line-or-region-and-step)
Documentation
Send the current line to the inferior shell and step to the next line.
When the region is active, send the region instead.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sh-script.el.gz
(defun sh-send-line-or-region-and-step ()
"Send the current line to the inferior shell and step to the next line.
When the region is active, send the region instead."
(interactive)
(let (from to end)
(if (use-region-p)
(setq from (region-beginning)
to (region-end)
end to)
(setq from (line-beginning-position)
to (line-end-position)
end (1+ to)))
(sh-send-text (buffer-substring-no-properties from to))
(goto-char end)))