diff options
author | Case Duckworth | 2021-07-22 21:16:23 -0500 |
---|---|---|
committer | Case Duckworth | 2021-07-22 21:17:14 -0500 |
commit | 2bc99f0e850a8fcb3d2ef120fb2802c597accb53 (patch) | |
tree | 0a95b5f347c19a740bd3ec12f4b81de063fa89bc /lisp | |
parent | Better configure ispell/hunspell (diff) | |
download | emacs-2bc99f0e850a8fcb3d2ef120fb2802c597accb53.tar.gz emacs-2bc99f0e850a8fcb3d2ef120fb2802c597accb53.zip |
Further configure org-mode
Especially `kill-ring-save-unfilled', though it doesn't quite work in a really weird way.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 2f878a9..15756c2 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -87,6 +87,16 @@ ARG). When called with multiple arguments or a list, it returns | |||
87 | (save-restriction | 87 | (save-restriction |
88 | (unfill-region (point-min) (point-max)))))) | 88 | (unfill-region (point-min) (point-max)))))) |
89 | 89 | ||
90 | (defun kill-ring-save-unfilled (start end &optional region) | ||
91 | "Unfill, kill, then re-fill the region defined by START and END positions. | ||
92 | REGION is passed straight to `kill-ring-save'." | ||
93 | (interactive "*r") | ||
94 | (save-excursion | ||
95 | (save-restriction | ||
96 | (unfill-region start end) | ||
97 | (kill-ring-save start end region) | ||
98 | (fill-region start end)))) | ||
99 | |||
90 | (defmacro when-unfocused (name &rest forms) | 100 | (defmacro when-unfocused (name &rest forms) |
91 | "Define a function NAME, executing FORMS, that fires when Emacs | 101 | "Define a function NAME, executing FORMS, that fires when Emacs |
92 | is unfocused." | 102 | is unfocused." |