summary refs log tree commit diff stats
path: root/lisp/acdw.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r--lisp/acdw.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 2d98833..9d8c489 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -91,11 +91,16 @@ ARG). When called with multiple arguments or a list, it returns
91 "Unfill, kill, then re-fill the region defined by START and END positions. 91 "Unfill, kill, then re-fill the region defined by START and END positions.
92REGION is passed straight to `kill-ring-save'." 92REGION is passed straight to `kill-ring-save'."
93 (interactive "*r") 93 (interactive "*r")
94 (save-excursion 94 (let ((sentence-end-double-space nil))
95 (save-restriction 95 (unfill-region start end)
96 (unfill-region start end) 96 (kill-ring-save
97 (kill-ring-save start end region) 97 ;; A quick hack to try and ameliorate the "Args out of range" error when
98 (fill-region start end)))) 98 ;; `unfill-region' removes some newlines. I'm not sure if this will work
99 ;; if calling from Lisp or other such nonsense.
100 (max start (point-min))
101 (min end (point-max))
102 region))
103 (fill-region start end))
99 104
100(defmacro when-unfocused (name &rest forms) 105(defmacro when-unfocused (name &rest forms)
101 "Define a function NAME, executing FORMS, that fires when Emacs 106 "Define a function NAME, executing FORMS, that fires when Emacs