From: Juri Linkov Date: Mon, 12 Dec 2022 17:37:02 +0000 (+0200) Subject: * lisp/outline.el: Fix the value 'insert' of outline-minor-mode-use-buttons. X-Git-Tag: emacs-29.0.90~1221 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40c23c11e884bd14c9340a4853ab5db02901fe65;p=emacs.git * lisp/outline.el: Fix the value 'insert' of outline-minor-mode-use-buttons. (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'. --- diff --git a/lisp/apropos.el b/lisp/apropos.el index a731926f458..89f1f150a12 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -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. diff --git a/lisp/outline.el b/lisp/outline.el index 2c3f9798ec4..53bfc4d556f 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -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) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 1e4aa4eba52..0790d3a5650 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -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