# HG changeset patch # User Johan Bockgrd # Date 1253974593 0 # Node ID 53bc42d507c592034549559934b225517468a68d # Parent bf36d53a4b8f4e24497610aca7e2301eda125d3b (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. diff -r bf36d53a4b8f -r 53bc42d507c5 lisp/erc/ChangeLog --- a/lisp/erc/ChangeLog Sat Sep 26 09:41:02 2009 +0000 +++ b/lisp/erc/ChangeLog Sat Sep 26 14:16:33 2009 +0000 @@ -1,3 +1,10 @@ +2009-09-26 Johan Bockgård + + * erc-button.el (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. + 2009-09-19 Glenn Morris * erc-lang.el (line): Define for compiler. diff -r bf36d53a4b8f -r 53bc42d507c5 lisp/erc/erc-button.el --- a/lisp/erc/erc-button.el Sat Sep 26 09:41:02 2009 +0000 +++ b/lisp/erc/erc-button.el Sat Sep 26 14:16:33 2009 +0000 @@ -367,16 +367,17 @@ (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."