summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-button.el
diff options
context:
space:
mode:
authorJohan Bockgård <bojohan@gnu.org>2009-09-26 14:16:33 +0000
committerJohan Bockgård <bojohan@gnu.org>2009-09-26 14:16:33 +0000
commit9c7b2dd3bdbb1a5a9652d9c713b7011c2ccc83a4 (patch)
tree42b0faf63d718aa51f438bb57bb6117b2ac99d35 /lisp/erc/erc-button.el
parent416ac2f17edb6dd24f979c34fca9fee33535dcb0 (diff)
downloademacs-9c7b2dd3bdbb1a5a9652d9c713b7011c2ccc83a4.tar.gz
(erc-button-add-button): Only call `widget-convert-button' in XEmacs.
For Emacs (at least), it doesn't seem to have any purpose except creating lots of overlays, slowing everything down.
Diffstat (limited to 'lisp/erc/erc-button.el')
-rw-r--r--lisp/erc/erc-button.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index f0fa72f45b5..8eee1ce278f 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -367,16 +367,17 @@ REGEXP is the regular expression which matched for this button."
(list 'keymap erc-button-keymap)
(list 'rear-nonsticky t)
(and data (list 'erc-data data))))
- (widget-convert-button 'link from to :action 'erc-button-press-button
- :suppress-face t
- ;; Make XEmacs use our faces.
- :button-face (if nick-p
- erc-button-nickname-face
- erc-button-face)
- ;; Make XEmacs behave with mouse-clicks, for
- ;; some reason, widget stuff overrides the
- ;; 'keymap text-property.
- :mouse-down-action 'erc-button-click-button))
+ (when (featurep 'xemacs)
+ (widget-convert-button 'link from to :action 'erc-button-press-button
+ :suppress-face t
+ ;; Make XEmacs use our faces.
+ :button-face (if nick-p
+ erc-button-nickname-face
+ erc-button-face)
+ ;; Make XEmacs behave with mouse-clicks, for
+ ;; some reason, widget stuff overrides the
+ ;; 'keymap text-property.
+ :mouse-down-action 'erc-button-click-button)))
(defun erc-button-add-face (from to face)
"Add FACE to the region between FROM and TO."