From 652d20e78d1156b352ec6a6b9c93aaaa91699a28 Mon Sep 17 00:00:00 2001 From: noa Date: Tue, 17 Sep 2024 10:17:01 +0800 Subject: Remove unused acdw text fill commands --- emacs/init.el | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'emacs/init.el') diff --git a/emacs/init.el b/emacs/init.el index 5678ede..e6e03bb 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -548,38 +548,8 @@ The misspelled word is taken from OVERLAY. WORD is the corrected word." (fill-paragraph nil))) (global-set-key (kbd "M-Q") #'unfill-paragraph) -;; The following functions were written by acdw for use with buffers like dict and help, where it's often ugly to read them with their hard wrapping - -;; unfill/refill a buffer - -;; unfill makes all paragraphs 1 line -(defun unfill-region (beg end) - (let ((fill-column most-positive-fixnum)) - (fill-region beg end))) - -;; this command is what you'd run in a hook -;; visual-line-mode makes it so it doesn't look shit -(defun unfill-buffer-force () - (interactive) - (let ((buffer-read-only nil)) - (unfill-region (point-min) (point-max)) - (visual-line-mode))) - -;; refill makes the width equal to the window-width minus 2 -;; (you could change it ofc) -(defun refill-region (beg end) - (let ((fill-column (- (window-width) 2))) - (fill-region beg end))) - -;; this command is what you'd run in a hook or w/e -(defun refill-buffer-force () - (interactive) - (let ((buffer-read-only nil)) - (refill-region (point-min) (point-max)))) - ;; Better control l ;; C-l goes in order, rather than first centering the cursor. This is particularly pleasant with a ~scroll-margin~ greater than the default of zero, which serves to keep a line of context at each edge of the screen, as well as triggering a scroll when the point is that far away from the screen edge. - (setopt recenter-positions '(top middle bottom)) (setopt scroll-margin 1) -- cgit 1.4.1-2-gfad0