diff --git a/core/autoload/minibuffer.el b/core/autoload/minibuffer.el deleted file mode 100644 index 0eaba15c3..000000000 --- a/core/autoload/minibuffer.el +++ /dev/null @@ -1,25 +0,0 @@ -;;; core/autoload/minibuffer.el -*- lexical-binding: t; -*- - -;;;###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))) diff --git a/core/autoload/system.el b/core/autoload/system.el deleted file mode 100644 index 97b44e2da..000000000 --- a/core/autoload/system.el +++ /dev/null @@ -1,68 +0,0 @@ -;;; core/autoload/system.el -*- lexical-binding: t; -*- - -;;;###autoload -(defun doom-system-os (&optional os) - "Returns the OS: arch, debian, macos, general linux, cygwin or windows. If OS -is given, returns t if it matches the current system, and nil otherwise." - (let* ((gnu-linux-p (eq system-type 'gnu/linux)) - (type (cond ((and gnu-linux-p (file-exists-p "/etc/arch-release")) - 'arch) - ((and gnu-linux-p (file-exists-p "/etc/debian_version")) - 'debian) - (gnu-linux-p - 'linux) - ((eq system-type 'darwin) - 'macos) - ((memq system-type '(windows-nt cygwin)) - 'windows) - (t (error "Unknown OS: %s" system-type))))) - (or (and os (eq os type)) - type))) - -;;;###autoload -(defun doom-sh (command &rest args) - "Runs a shell command and prints any output to the DOOM buffer." - (let ((cmd-list (split-string command " "))) - (cond ((equal (car cmd-list) "sudo") - (apply #'doom-sudo (string-join (cdr cmd-list) " ") args)) - ((let ((bin (executable-find "npm"))) - (and (file-exists-p bin) - (not (file-writable-p bin)))) - (apply #'doom-sudo (string-join cmd-list " ") args)) - (t - (princ (shell-command-to-string (apply #'format command args))))))) - -(defvar tramp-verbose) -;;;###autoload -(defun doom-sudo (command &rest args) - "Like `doom-sh', but runs as root (prompts for password)." - (let ((tramp-verbose 2)) - (with-current-buffer (get-buffer-create "*doom-sudo*") - (unless (string-prefix-p "/sudo::/" default-directory) - (cd "/sudo::/")) - (princ (shell-command-to-string (apply #'format command args)))))) - -;;;###autoload -(defun doom-fetch (fetcher location dest) - "Clone a remote version-controlled repo at REPO-URL to PATH, if it exists. -Requires the corresponding client, e.g. git for git repos, hg for mercurial, -etc." - (let* ((command (pcase fetcher - (:github "git clone --recursive https://github.com/%s.git") - (:git "git clone --recursive %s") - (:gist "git clone https://gist.github.com/%s.git") - ;; TODO Add hg - (_ (error "%s is not a valid fetcher" fetcher)))) - (argv (split-string command " " t)) - (args (format (string-join (cdr argv) " ") location)) - (bin (executable-find (car argv))) - (dest (expand-file-name dest))) - (unless bin - (error "%s couldn't be found" command)) - (unless (file-directory-p dest) - (funcall (if noninteractive - (lambda (c) (princ (shell-command-to-string c))) - #'async-shell-command) - (format "%s %s %s" bin args (shell-quote-argument dest))) - (message! "Cloning %s -> %s" location (file-relative-name dest))))) - diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index ad1fa3a10..0b46a9561 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -708,13 +708,14 @@ minibuffer-local-isearch-map read-expression-map) [escape] #'abort-recursive-edit - "C-r" #'evil-paste-from-register + (:when (featurep 'evil) + "C-r" #'evil-paste-from-register) "C-a" #'move-beginning-of-line - "C-w" #'doom/minibuffer-kill-word - "C-u" #'doom/minibuffer-kill-line + "C-w" #'backward-kill-word + "C-u" #'backward-kill-sentence "C-b" #'backward-word "C-f" #'forward-word - "M-z" #'doom/minibuffer-undo) + "C-z" (λ! (ignore-errors (call-interactively #'undo)))) (:after evil (:map evil-ex-completion-map