[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b464dab 1/2: Use text-property buttons in rcirc-mar
From: |
Miles Bader |
Subject: |
[Emacs-diffs] master b464dab 1/2: Use text-property buttons in rcirc-markup-urls |
Date: |
Fri, 8 Sep 2017 23:59:41 -0400 (EDT) |
branch: master
commit b464dab2af90b5ebcf1925fcca144a9ed294e6a3
Author: Miles Bader <address@hidden>
Commit: Miles Bader <address@hidden>
Use text-property buttons in rcirc-markup-urls
* lisp/net/rcirc.el (rcirc-markup-urls): Use `make-text-button'
instead of `make-button'; the former is much more efficient in large
buffers, and for the purposes of rcirc, changes no functionality.
---
lisp/net/rcirc.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index c01ece9..60af197 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2499,12 +2499,12 @@ If ARG is given, opens the URL in a new browser window."
(end (match-end 0))
(url (match-string-no-properties 0))
(link-text (buffer-substring-no-properties start end)))
- (make-button start end
- 'face 'rcirc-url
- 'follow-link t
- 'rcirc-url url
- 'action (lambda (button)
- (browse-url (button-get button 'rcirc-url))))
+ (make-text-button start end
+ 'face 'rcirc-url
+ 'follow-link t
+ 'rcirc-url url
+ 'action (lambda (button)
+ (browse-url (button-get button 'rcirc-url))))
;; record the url if it is not already the latest stored url
(when (not (string= link-text (caar rcirc-urls)))
(push (cons link-text start) rcirc-urls)))))