diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/textmodes/refill.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/textmodes/refill.el')
-rw-r--r-- | lisp/textmodes/refill.el | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index 8f4f3c5a231..0a0e4cc444c 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el @@ -1,4 +1,4 @@ -;;; refill.el --- `auto-fill' by refilling paragraphs on changes +;;; refill.el --- `auto-fill' by refilling paragraphs on changes -*- lexical-binding: t -*- ;; Copyright (C) 2000-2021 Free Software Foundation, Inc. @@ -83,16 +83,11 @@ ;;; Code: -;; Unused. -;;; (defgroup refill nil -;;; "Refilling paragraphs on changes." -;;; :group 'fill) - (defvar-local refill-ignorable-overlay nil "Portion of the most recently filled paragraph not needing filling. This is used to optimize refilling.") -(defun refill-adjust-ignorable-overlay (overlay afterp beg end &optional len) +(defun refill-adjust-ignorable-overlay (overlay afterp beg _end &optional _len) "Adjust OVERLAY to not include the about-to-be-modified region." (when (not afterp) (save-excursion @@ -157,7 +152,7 @@ ensures refilling is only done once per command that causes a change, regardless of the number of after-change calls from commands doing complex processing.") -(defun refill-after-change-function (beg end len) +(defun refill-after-change-function (_beg end _len) "Function for `after-change-functions' which just sets `refill-doit'." (unless undo-in-progress (setq refill-doit end))) @@ -232,9 +227,9 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead." (kill-local-variable 'refill-saved-state)) (if refill-mode (progn - (add-hook 'after-change-functions 'refill-after-change-function nil t) - (add-hook 'post-command-hook 'refill-post-command-function nil t) - (add-hook 'pre-command-hook 'refill-pre-command-function nil t) + (add-hook 'after-change-functions #'refill-after-change-function nil t) + (add-hook 'post-command-hook #'refill-post-command-function nil t) + (add-hook 'pre-command-hook #'refill-pre-command-function nil t) (setq-local refill-saved-state (mapcar (lambda (s) (cons s (symbol-value s))) '(fill-paragraph-function auto-fill-function))) @@ -249,8 +244,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead." (overlay-put refill-ignorable-overlay 'insert-behind-hooks '(refill-adjust-ignorable-overlay)) (auto-fill-mode 0)) - (remove-hook 'after-change-functions 'refill-after-change-function t) - (remove-hook 'post-command-hook 'refill-post-command-function t) + (remove-hook 'after-change-functions #'refill-after-change-function t) + (remove-hook 'post-command-hook #'refill-post-command-function t) (kill-local-variable 'backward-delete-char-untabify-method))) (provide 'refill) |