about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+org.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/+org.el b/lisp/+org.el index 84b0288..252ee55 100644 --- a/lisp/+org.el +++ b/lisp/+org.el
@@ -649,5 +649,19 @@ and POST-PROCESS are passed to `org-export-to-file'."
649 (while (re-search-forward "\n\u000c\n" to t) 649 (while (re-search-forward "\n\u000c\n" to t)
650 (org-flag-region (match-beginning 0) (match-end 0) t 'visible))))) 650 (org-flag-region (match-beginning 0) (match-end 0) t 'visible)))))
651 651
652;;; Emacs 28+: wrap on hyphens
653;; https://emacs.stackexchange.com/a/71342/37239
654
655(defcustom +org-category-table (let ((table (copy-category-table)))
656 (modify-category-entry ?- ?| table)
657 table)
658 "Character category table for `org-mode'."
659 :type 'sexp)
660
661(defun +org-wrap-on-hyphens ()
662 "Soft-wrap `org-mode' buffers on spaces and hyphens."
663 (set-category-table +org-category-table)
664 (setq-local word-wrap-by-category t))
665
652(provide '+org) 666(provide '+org)
653;;; +org.el ends here 667;;; +org.el ends here