emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline mode


From: Stefan Monnier
Subject: Re: Outline mode
Date: Tue, 04 Sep 2007 15:45:17 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> Sure.  I want the heading line of a collapsed entry to be editable
> independent of the entry.  The newline at the end of the header should

Does the patch do what you want?


        Stefan


--- orig/lisp/outline.el
+++ mod/lisp/outline.el
@@ -708,7 +708,10 @@
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]