From: Andreas Gerler Date: Mon, 11 Dec 2017 13:43:22 +0000 (+0100) Subject: add fill-or-unfill paragraph X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=2dc88e2a50c2f9603110ab1970e15e156844ba6f;p=emacsconfig.git add fill-or-unfill paragraph Signed-off-by: Andreas Gerler --- diff --git a/bba.org b/bba.org index bb5d080e..72448eec 100644 --- a/bba.org +++ b/bba.org @@ -2846,6 +2846,24 @@ safe files with #! in first line as user executable. #+END_SRC +* fill-or-unfill paragraph +[2017-06-09 Fri 12:25] + +#+BEGIN_SRC emacs-lisp :tangle yes + (defun bba-fill-or-unfill () + "Like `fill-paragraph', but unfill if used twice." + (interactive) + (let ((fill-column + (if (eq last-command 'bba-fill-or-unfill) + (progn (setq this-command nil) + (point-max)) + fill-column))) + (call-interactively 'fill-paragraph))) + + (global-set-key [remap fill-paragraph] + 'bba-fill-or-unfill) +#+END_SRC + * Move Cursor to Beginning of Line/Paragraph [2017-03-02 Thu 13:46]