summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-03-10 00:51:03 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2011-03-10 00:51:03 +0100
commitb12f0dd309db71a25a04808d67e79380b51a7d75 (patch)
tree051c52135d09088a4e6e0adf4a6d98b2aea6a2a3
parentf8ca5d85baa749b69f7b044079f8110825ec0f64 (diff)
downloadorg-mode-b12f0dd309db71a25a04808d67e79380b51a7d75.tar.gz
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.
-rw-r--r--lisp/org.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 22fe9ad..e120c5e 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))