From b12f0dd309db71a25a04808d67e79380b51a7d75 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 10 Mar 2011 00:51:03 +0100 Subject: [PATCH] Fix fill-region in an item * lisp/org.el (org-adaptive-fill-function): when a region is specified first line of paragraph isn't skipped, so fill-paragraph have to be computed even if point is at an item. --- lisp/org.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 22fe9ad9a..e120c5e6b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19208,15 +19208,15 @@ the functionality can be provided as a fall-back.") ;; Comment line ((looking-at "#[ \t]+") (match-string-no-properties 0)) + ;; Plain list item + ((org-at-item-p) + (make-string (org-list-item-body-column (point-at-bol)) ?\ )) ;; Point is in a list after `backward-paragraph': original ;; point wasn't in the list, or filling would have been taken ;; care of by `org-auto-fill-function', but the list and the ;; real paragraph are not separated by a blank line. Thus, move ;; point after the list to go back to real paragraph and - ;; determine fill-prefix. If point is at an item, do not - ;; compute prefix and list structure, as first line of - ;; paragraph will be skipped anyway. - ((org-at-item-p) "") + ;; determine fill-prefix. ((setq itemp (org-in-item-p)) (goto-char itemp) (let* ((struct (org-list-struct))