diff options
| author | Basil L. Contovounesios | 2020-06-04 23:08:28 +0100 |
|---|---|---|
| committer | Basil L. Contovounesios | 2020-06-04 23:30:34 +0100 |
| commit | f51f9634788323b3bf2dde59d0d20a8ca8fbfeaf (patch) | |
| tree | 4fb1157114ea55bc02a6d29bca2b5ba737c76b5e | |
| parent | 25390b28c43401caee749554871217d3436ea9bd (diff) | |
| download | emacs-f51f9634788323b3bf2dde59d0d20a8ca8fbfeaf.tar.gz emacs-f51f9634788323b3bf2dde59d0d20a8ca8fbfeaf.zip | |
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.
| -rw-r--r-- | lisp/apropos.el | 3 | ||||
| -rw-r--r-- | lisp/help-fns.el | 3 | ||||
| -rw-r--r-- | lisp/ibuf-ext.el | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el index 7cbda3cb678..22866cd2cc8 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el | |||
| @@ -665,8 +665,7 @@ Return list of symbols and documentation found." | |||
| 665 | (make-text-button name nil | 665 | (make-text-button name nil |
| 666 | 'type 'apropos-library | 666 | 'type 'apropos-library |
| 667 | 'face 'apropos-symbol | 667 | 'face 'apropos-symbol |
| 668 | 'apropos-symbol name) | 668 | 'apropos-symbol name)))) |
| 669 | name))) | ||
| 670 | 669 | ||
| 671 | ;;;###autoload | 670 | ;;;###autoload |
| 672 | (defun apropos-library (file) | 671 | (defun apropos-library (file) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 63b066f3b85..b9536470631 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -647,8 +647,7 @@ FILE is the file where FUNCTION was probably defined." | |||
| 647 | (setq place (list f pos)) | 647 | (setq place (list f pos)) |
| 648 | (setq first version))))))))) | 648 | (setq first version))))))))) |
| 649 | (when first | 649 | (when first |
| 650 | (make-text-button first nil 'type 'help-news 'help-args place)) | 650 | (make-text-button first nil 'type 'help-news 'help-args place)))) |
| 651 | first)) | ||
| 652 | 651 | ||
| 653 | (add-hook 'help-fns-describe-function-functions | 652 | (add-hook 'help-fns-describe-function-functions |
| 654 | #'help-fns--mention-first-release) | 653 | #'help-fns--mention-first-release) |
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index bfb9787a96d..c39000b4886 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el | |||
| @@ -202,7 +202,7 @@ The format has been repaired and the variable modified accordingly. | |||
| 202 | You can save the current value through the customize system by | 202 | You can save the current value through the customize system by |
| 203 | either clicking or hitting return " | 203 | either clicking or hitting return " |
| 204 | (make-text-button | 204 | (make-text-button |
| 205 | "here" nil | 205 | (copy-sequence "here") nil |
| 206 | 'face '(:weight bold :inherit button) | 206 | 'face '(:weight bold :inherit button) |
| 207 | 'mouse-face '(:weight normal :background "gray50" :inherit button) | 207 | 'mouse-face '(:weight normal :background "gray50" :inherit button) |
| 208 | 'follow-link t | 208 | 'follow-link t |