;;; -*- lexical-binding: t -*- ;; ;; -------------------------------------------------------------------------- (require 'cl-lib) (cl-pushnew "." load-path :test #'string=) (require 'luki-lisp) ;; -------------------------------------------------------------------------- (-> 'message) ;; -------------------------------------------------------------------------------- (-> 'll-dwim) ;; -------------------------------------------------------------------------- (setq sentence-end-double-space nil) (setq fill-nobreak-predicate (list #'fill-single-char-nobreak-p #'fill-single-word-nobreak-p)) (let ((fill-col 80)) (setq-default fill-column fill-col) (setq message-fill-column fill-col)) ;; -------------------------------------------------------------------------- (defun fill-down (beg end &optional justify) (interactive (if (use-region-p) `(,@(use-region) ,current-prefix-arg) (list (pos-bol) (save-excursion (forward-paragraph) (point)) current-prefix-arg))) (cond ((member 4 justify) (unfill beg end)) ((member 16 justify) (canonically-space-region beg end)) ((fill-region beg end)))) ;; -------------------------------------------------------------------------- (defun unfill (&optional beg end) "\nhttp://emacswiki.org/emacs/unfillregion" (interactive (use-region)) (or beg (setq beg (point-min))) (or end (setq end (point-max))) (let ((fill-column (point-max))) (fill-region beg end) )) ;; -------------------------------------------------------------------------- (<- 'll-fill)