Add '+' character for custom defined functions

This commit is contained in:
Wojciech Kozlowski 2022-04-10 22:01:32 +02:00
parent 61b4dd0437
commit cc8efb8ca4

View File

@ -165,10 +165,10 @@
:bind
(("C-x C-g" . deadgrep))
(:map deadgrep-mode-map
("C-o" . deadgrep-open-result-other-window)
("C-o" . +deadgrep-open-result-other-window)
("<RET>" . deadgrep-visit-result-other-window))
:config
(defun deadgrep-open-result-other-window ()
(defun +deadgrep-open-result-other-window ()
"Open the result in other window without changing to it."
(interactive)
(save-selected-window (deadgrep-visit-result-other-window))))
@ -221,14 +221,14 @@
(defalias #'end-of-visual-line #'end-of-line)
(defalias #'beginning-of-visual-line #'beginning-of-line)
(defun indent-region-or-buffer ()
(defun +indent-region-or-buffer ()
"Indent a region if selected, otherwise the whole buffer."
(interactive)
(if (region-active-p)
(indent-region (region-beginning) (region-end))
(indent-region (point-min) (point-max))))
(defun unfill-paragraph (&optional region)
(defun +unfill-paragraph (&optional region)
"Takes a multi-line paragraph and makes it into a single line of text."
(interactive (progn (barf-if-buffer-read-only) '(t)))
(let ((fill-column (point-max))
@ -242,8 +242,8 @@
(map!
;; For functions defined above.
"M-Q" #'unfill-paragraph
"C-M-\\" #'indent-region-or-buffer
"M-Q" #'+unfill-paragraph
"C-M-\\" #'+indent-region-or-buffer
;; Create binding before dired is loaded.
"C-x C-j" #'dired-jump
;; More convenient window switching.