]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some side-effecting uses of make-text-button
authorBasil L. Contovounesios <contovob@tcd.ie>
Thu, 4 Jun 2020 22:08:28 +0000 (23:08 +0100)
committerBasil L. Contovounesios <contovob@tcd.ie>
Thu, 4 Jun 2020 22:30:34 +0000 (23:30 +0100)
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00117.html

* lisp/apropos.el (apropos-library-button):
* lisp/help-fns.el (help-fns--first-release): Return result of
make-text-button instead of relying on its side effects.
* lisp/ibuf-ext.el (ibuffer-old-saved-filters-warning): Avoid
modifying an immutable string.

lisp/apropos.el
lisp/help-fns.el
lisp/ibuf-ext.el

index 7cbda3cb678626557e1110790aeba80195dbc100..22866cd2cc87470fa5a5ed845b2266eefe3bc215 100644 (file)
@@ -665,8 +665,7 @@ Return list of symbols and documentation found."
       (make-text-button name nil
                         'type 'apropos-library
                         'face 'apropos-symbol
-                        'apropos-symbol name)
-      name)))
+                        'apropos-symbol name))))
 
 ;;;###autoload
 (defun apropos-library (file)
index 63b066f3b8586d8ac4e14474a9eb9a16e3155943..b953647063162822a1f39b47cc27032fd482d0fb 100644 (file)
@@ -647,8 +647,7 @@ FILE is the file where FUNCTION was probably defined."
                     (setq place (list f pos))
                     (setq first version)))))))))
     (when first
-      (make-text-button first nil 'type 'help-news 'help-args place))
-    first))
+      (make-text-button first nil 'type 'help-news 'help-args place))))
 
 (add-hook 'help-fns-describe-function-functions
           #'help-fns--mention-first-release)
index bfb9787a96d2a5e9106e2dbe8492207dc6152138..c39000b4886cb93296358df5515cc39828808d11 100644 (file)
@@ -202,7 +202,7 @@ The format has been repaired and the variable modified accordingly.
 You can save the current value through the customize system by
 either clicking or hitting return "
           (make-text-button
-           "here" nil
+           (copy-sequence "here") nil
            'face '(:weight bold :inherit button)
            'mouse-face '(:weight normal :background "gray50" :inherit button)
            'follow-link t