doomemacs/core/autoload/minibuffer.el
Henrik Lissner 41a288d21d Refactor minibuffer bindings
+ conform their function names to naming conventions
+ place ivy-specific version in ivy autoloads
2017-05-26 20:22:45 +02:00

26 lines
851 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)))
;;;###autoload
(defun doom/minibuffer-undo ()
"Undo an edit in the minibuffer without throwing errors."
(interactive)
(ignore-errors (call-interactively #'undo)))