From b7e5bc1c44850833ad2c0e0b2b72cf789c372b24 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 8 Sep 2007 03:09:31 +0000 Subject: [PATCH] (outline-flag-region): Use front-advance. --- lisp/ChangeLog | 4 ++++ lisp/outline.el | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c2ffe504d0..58bd6a36f35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-09-08 Stefan Monnier + + * outline.el (outline-flag-region): Use front-advance. + 2007-09-07 Ilya Zakharevich * progmodes/cperl-mode.el: Merge upstream 5.23. diff --git a/lisp/outline.el b/lisp/outline.el index 6eabd8f3d02..92e521afc9f 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -712,7 +712,10 @@ If nil, `show-entry' is called to reveal the invisible text.") If FLAG is nil then text is shown, while if FLAG is t the text is hidden." (remove-overlays from to 'invisible 'outline) (when flag - (let ((o (make-overlay from to))) + ;; We use `front-advance' here because the invisible text begins at the + ;; very end of the heading, before the newline, so text inserted at FROM + ;; belongs to the heading rather than to the entry. + (let ((o (make-overlay from to nil 'front-advance))) (overlay-put o 'invisible 'outline) (overlay-put o 'isearch-open-invisible (or outline-isearch-open-invisible-function -- 2.39.2