mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
20 lines
679 B
EmacsLisp
20 lines
679 B
EmacsLisp
;;; ../core/autoload/minibuffer.el
|
|
|
|
;;;###autoload
|
|
(defun doom-minibuffer-kill-word ()
|
|
"Kill a word, backwards, but only if the cursor is after
|
|
`minibuffer-prompt-end', to prevent the 'Text is read-only' warning from
|
|
monopolizing the minibuffer."
|
|
(interactive)
|
|
(when (> (point) (minibuffer-prompt-end))
|
|
(call-interactively 'backward-kill-word)))
|
|
|
|
;;;###autoload
|
|
(defun doom-minibuffer-kill-line ()
|
|
"Kill the entire line, but only if the cursor is after
|
|
`minibuffer-prompt-end', to prevent the 'Text is read-only' warning from
|
|
monopolizing the minibuffer."
|
|
(interactive)
|
|
(when (> (point) (minibuffer-prompt-end))
|
|
(call-interactively 'backward-kill-sentence)))
|