]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert make-text-button string copy
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 4 Jun 2020 01:15:54 +0000 (18:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 4 Jun 2020 01:16:33 +0000 (18:16 -0700)
* lisp/button.el (make-text-button): Don’t make a copy of
a button’s string label.  This reverts the change made in
2020-05-17T05:23:28Z!eggert@cs.ucla.edu, which broke SLY.
Problem reported by João Távora in:
https://lists.gnu.org/r/emacs-devel/2020-06/msg00117.html
However, we’ll need a better fix for this once string
literals become contents, if SLY uses string constants
for text button labels.

lisp/button.el

index a91b0482acd85c0e3d682a29ef15541aab99777b..3a6a6de774c8d612cbf00bbc614ceb3594bc6496 100644 (file)
@@ -349,7 +349,6 @@ Also see `insert-text-button'."
         (or (plist-member properties 'type)
             (plist-member properties :type))))
     (when (stringp beg)
-      (setq beg (copy-sequence beg)) ;; In case BEG is not mutable.
       (setq object beg beg 0 end (length object)))
     ;; Disallow setting the `category' property directly.
     (when (plist-get properties 'category)