summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lisp/+org.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/+org.el b/lisp/+org.el index 57a4a16..5062a08 100644 --- a/lisp/+org.el +++ b/lisp/+org.el
@@ -314,12 +314,18 @@ instead of the true count."
314 314
315;;; Hooks & Advice 315;;; Hooks & Advice
316 316
317(defvar +org-before-save-prettify-buffer t
318 "Prettify org buffers before saving.")
319
320(put '+org-before-save-prettify-buffer 'safe-local-variable #'booleanp)
321
317(defun +org-before-save@prettify-buffer () 322(defun +org-before-save@prettify-buffer ()
318 (save-mark-and-excursion 323 (when +org-before-save-prettify-buffer
319 (mark-whole-buffer) 324 (save-mark-and-excursion
320 ;;(org-fill-paragraph nil t) 325 (mark-whole-buffer)
321 (+org-fix-blank-lines t) 326 ;;(org-fill-paragraph nil t)
322 (org-align-tags t))) 327 (+org-fix-blank-lines t)
328 (org-align-tags t))))
323 329
324(defun +org-delete-backward-char (N) 330(defun +org-delete-backward-char (N)
325 "Keep tables aligned while deleting N characters backward. 331 "Keep tables aligned while deleting N characters backward.