[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6dad339: Fix make-text-button bug with string copy
From: |
Paul Eggert |
Subject: |
master 6dad339: Fix make-text-button bug with string copy |
Date: |
Wed, 3 Jun 2020 18:39:57 -0400 (EDT) |
branch: master
commit 6dad339f064df180e8f2c6257ffb53a6f341c4ec
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Fix make-text-button bug with string copy
* 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
---
lisp/button.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/button.el b/lisp/button.el
index f969a03..a91b048 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -349,7 +349,8 @@ Also see `insert-text-button'."
(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"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6dad339: Fix make-text-button bug with string copy,
Paul Eggert <=