1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Fix some side-effecting uses of make-text-button

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.
This commit is contained in:
Basil L. Contovounesios 2020-06-04 23:08:28 +01:00
parent 25390b28c4
commit f51f963478
3 changed files with 3 additions and 5 deletions

View 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)

View 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)

View 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