]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix last commit to wid-edit.el
authorMauro Aranda <maurooaranda@gmail.com>
Sat, 22 Feb 2025 21:31:40 +0000 (18:31 -0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:18:53 +0000 (09:18 +0100)
* lisp/wid-edit.el (widget-editable-list-entry-create): Don't
use save-excursion when indenting.  Previously, it was needed
because we inserted the :entry-format string, but we don't do
that anymore.  (Bug#53606)

https://lists.gnu.org/archive/html/emacs-devel/2025-02/msg00958.html
(cherry picked from commit 44a1c4a9aea54d6542bcf0c231b080f0ed023229)

lisp/wid-edit.el

index 0bfe9ef730f6a07108e71a5d371cf25b72d496ab..1ddfd0cc08e3a05381f86fe57aa25e048a475eaa 100644 (file)
@@ -3071,10 +3071,9 @@ Save CHILD into the :last-deleted list, so it can be inserted later."
         (onext 0) (next 0)
        child delete insert)
     (widget-specify-insert
-     (save-excursion
-       (and (widget--should-indent-p)
-            (widget-get widget :indent)
-            (insert-char ?\s (widget-get widget :indent))))
+     (and (widget--should-indent-p)
+          (widget-get widget :indent)
+          (insert-char ?\s (widget-get widget :indent)))
      ;; Parse % escapes in format.
      (while (string-match "%\\(.\\)" str next)
        (setq next (match-end 1))