diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/+emacs.el | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index fa94a10..7ad6768 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el | |||
@@ -201,25 +201,6 @@ kill without asking." | |||
201 | (save-buffers-kill-emacs)) | 201 | (save-buffers-kill-emacs)) |
202 | (server-save-buffers-kill-terminal nil))) | 202 | (server-save-buffers-kill-terminal nil))) |
203 | 203 | ||
204 | (defun +filldent-dwim (&optional arg) | ||
205 | "Fill and indent region if active, or current defun/paragraph. | ||
206 | Optional ARG causes the paragraph to \"unfill.\"" | ||
207 | ;; I wrote a whole package for this --- filldent.el --- but under further | ||
208 | ;; inspection it seems as though Emacs is smart enough in most cases. | ||
209 | ;; Possible TODO: make calling this twice in a row restore the buffer how it | ||
210 | ;; was. | ||
211 | (interactive "*P") | ||
212 | (let ((fill-column (if arg most-positive-fixnum fill-column))) | ||
213 | (if (region-active-p) | ||
214 | (progn | ||
215 | (fill-region (region-beginning) (region-end)) | ||
216 | (indent-region (region-beginning) (region-end))) | ||
217 | (progn | ||
218 | (fill-paragraph) | ||
219 | (save-excursion | ||
220 | (mark-defun) | ||
221 | (indent-region (region-beginning) (region-end))))))) | ||
222 | |||
223 | ;;; Bindings | 204 | ;;; Bindings |
224 | 205 | ||
225 | ;; I need to place these bindings under `+key-mode-map' so that they aren't | 206 | ;; I need to place these bindings under `+key-mode-map' so that they aren't |
@@ -230,7 +211,6 @@ Optional ARG causes the paragraph to \"unfill.\"" | |||
230 | ("M-SPC" . +cycle-spacing) | 211 | ("M-SPC" . +cycle-spacing) |
231 | ("M-/" . hippie-expand) | 212 | ("M-/" . hippie-expand) |
232 | ("M-=" . count-words) | 213 | ("M-=" . count-words) |
233 | ("M-q" . +filldent-dwim) | ||
234 | ("C-x C-b" . ibuffer) | 214 | ("C-x C-b" . ibuffer) |
235 | ("C-s" . isearch-forward-regexp) | 215 | ("C-s" . isearch-forward-regexp) |
236 | ("C-r" . isearch-backward-regexp) | 216 | ("C-r" . isearch-backward-regexp) |