summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lisp/acdw.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index d048fc0..48e754d 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -73,6 +73,20 @@ ARG). When called with multiple arguments or a list, it returns
73 (kill-region (region-beginning) (region-end)) 73 (kill-region (region-beginning) (region-end))
74 (backward-kill-word arg))) 74 (backward-kill-word arg)))
75 75
76;; https://www.emacswiki.org/emacs/UnfillRegion
77(defun unfill-region (start end)
78 "Unfill a region defined by START and END positions."
79 (interactive "*r")
80 (let ((fill-column (point-max))
81 (emacs-lisp-docstring-fill-column t))
82 (fill-region start end)))
83
84(defun unfill-buffer (&optional buffer-or-name)
85 (with-current-buffer (or buffer-or-name (current-buffer))
86 (save-excursion
87 (save-restriction
88 (unfill-region (point-min) (point-max))))))
89
76(defmacro when-unfocused (name &rest forms) 90(defmacro when-unfocused (name &rest forms)
77 "Define a function NAME, executing FORMS, that fires when Emacs 91 "Define a function NAME, executing FORMS, that fires when Emacs
78is unfocused." 92is unfocused."