1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-27 23:56:04 -07:00

(outline-flag-region): Use front-advance.

This commit is contained in:
Stefan Monnier 2007-09-08 03:09:31 +00:00
parent 2420deb36b
commit b7e5bc1c44
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2007-09-08 Stefan Monnier <monnier@iro.umontreal.ca>
* outline.el (outline-flag-region): Use front-advance.
2007-09-07 Ilya Zakharevich <ilyaz@cpan.org>
* progmodes/cperl-mode.el: Merge upstream 5.23.

View file

@ -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