From cdb6c1cf893ce75f4aef39d18dafcb78501c017c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 28 Dec 2021 22:15:43 -0600 Subject: Re-install (new and improved!) filldent.el --- lisp/+emacs.el | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'lisp/+emacs.el') 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." (save-buffers-kill-emacs)) (server-save-buffers-kill-terminal nil))) -(defun +filldent-dwim (&optional arg) - "Fill and indent region if active, or current defun/paragraph. -Optional ARG causes the paragraph to \"unfill.\"" - ;; I wrote a whole package for this --- filldent.el --- but under further - ;; inspection it seems as though Emacs is smart enough in most cases. - ;; Possible TODO: make calling this twice in a row restore the buffer how it - ;; was. - (interactive "*P") - (let ((fill-column (if arg most-positive-fixnum fill-column))) - (if (region-active-p) - (progn - (fill-region (region-beginning) (region-end)) - (indent-region (region-beginning) (region-end))) - (progn - (fill-paragraph) - (save-excursion - (mark-defun) - (indent-region (region-beginning) (region-end))))))) - ;;; Bindings ;; 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.\"" ("M-SPC" . +cycle-spacing) ("M-/" . hippie-expand) ("M-=" . count-words) - ("M-q" . +filldent-dwim) ("C-x C-b" . ibuffer) ("C-s" . isearch-forward-regexp) ("C-r" . isearch-backward-regexp) -- cgit 1.4.1-21-gabe81