* lisp/button.el (make-text-button): Use the copy of BEG
uniformly, instead of in just one place. This fixes a typo
introduced in 2020-05-17T05:23:28Z!eggert@cs.ucla.edu.
Problem reported by João Távora in:
https://lists.gnu.org/r/emacs-devel/2020-06/msg00117.html
(or (plist-member properties 'type)
(plist-member properties :type))))
(when (stringp beg)
- (setq object (copy-sequence beg) beg 0 end (length object)))
+ (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)
(error "Button `category' property may not be set directly"))