]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/outline.el: Fix the value 'insert' of outline-minor-mode-use-buttons.
authorJuri Linkov <juri@linkov.net>
Mon, 12 Dec 2022 17:37:02 +0000 (19:37 +0200)
committerJuri Linkov <juri@linkov.net>
Mon, 12 Dec 2022 17:37:02 +0000 (19:37 +0200)
(outline--insert-button): Keep text properties around point
on the inserted whitespace placeholder.

* lisp/apropos.el (apropos-mode):
* lisp/progmodes/xref.el (xref--xref-buffer-mode):
Change outline-minor-mode-use-buttons from t to 'insert'.

lisp/apropos.el
lisp/outline.el
lisp/progmodes/xref.el

index a731926f458bb57ea22d7e73ea481eec7846aede..89f1f150a12288ab36c6ca60ab83a4e60eb59a24 100644 (file)
@@ -496,7 +496,7 @@ Intended as a value for `revert-buffer-function'."
               outline-level (lambda () 1)
               outline-minor-mode-cycle t
               outline-minor-mode-highlight t
-              outline-minor-mode-use-buttons t))
+              outline-minor-mode-use-buttons 'insert))
 
 (defvar apropos-multi-type t
   "If non-nil, this apropos query concerns multiple types.
index 2c3f9798ec409b88eff04395d413cd52c38635ec..53bfc4d556f60794e1ba4496b051b34ebac1e96b 100644 (file)
@@ -1817,7 +1817,7 @@ With a prefix argument, show headings up to that LEVEL."
         (unless o
           (when (eq outline-minor-mode-use-buttons 'insert)
             (let ((inhibit-read-only t))
-              (insert "  ")
+              (insert (apply #'propertize "  " (text-properties-at (point))))
               (beginning-of-line)))
           (setq o (make-overlay (point) (1+ (point))))
           (overlay-put o 'outline-button t)
index 1e4aa4eba524c7746a75c851f8695f458b533e46..0790d3a5650f38d25a4a37bf6d5b992999795c71 100644 (file)
@@ -994,7 +994,7 @@ point."
   (setq-local add-log-current-defun-function
              #'xref--add-log-current-defun)
   (setq-local outline-minor-mode-cycle t
-              outline-minor-mode-use-buttons t
+              outline-minor-mode-use-buttons 'insert
               outline-search-function
               (lambda (&optional bound move backward looking-at)
                 (outline-search-text-property