From: Stefan Monnier Date: Sat, 8 Sep 2007 03:09:31 +0000 (+0000) Subject: (outline-flag-region): Use front-advance. X-Git-Tag: emacs-pretest-22.1.90~844 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b7e5bc1c44850833ad2c0e0b2b72cf789c372b24;p=emacs.git (outline-flag-region): Use front-advance. --- 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