Borrow fill-or-unfill-paragraph from sachachua
This commit is contained in:
parent
09d986d989
commit
f5d29d0e1c
1
init.el
1
init.el
@ -1048,6 +1048,7 @@
|
||||
("M-t W" . transpose-windows)
|
||||
("C-a" . gpolonkai/move-to-beginning-of-line)
|
||||
("C-e" . gpolonkai/move-to-end-of-line)
|
||||
("M-q" . sachachua/fill-or-unfill-paragraph)
|
||||
:map ctl-x-map
|
||||
("C-y" . duplicate-line)
|
||||
("_" . maximize-window)
|
||||
|
@ -5,3 +5,13 @@
|
||||
(when (looking-back "[.!?…]")
|
||||
(call-interactively 'self-insert-command arg))
|
||||
(call-interactively 'self-insert-command arg))
|
||||
|
||||
;; From http://pages.sachachua.com/.emacs.d/Sacha.html
|
||||
(defun sachachua/fill-or-unfill-paragraph (&optional unfill region)
|
||||
"Fill paragraph (or REGION).
|
||||
With the prefix argument UNFILL, unfill it instead."
|
||||
(interactive (progn
|
||||
(barf-if-buffer-read-only)
|
||||
(list (if current-prefix-arg 'unfill) t)))
|
||||
(let ((fill-column (if unfill (point-max) fill-column)))
|
||||
(fill-paragraph nil region)))
|
||||
|
Loading…
Reference in New Issue
Block a user