;; erc-button.el --- A way of buttonizing certain things in ERC buffers
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2004, 2006-2011 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Keywords: irc, button, url, regexp
(define-key map (kbd "<mouse-2>") 'erc-button-click-button))
(define-key map (kbd "TAB") 'erc-button-next)
(define-key map (kbd "<backtab>") 'erc-button-previous)
+ (define-key map [follow-link] 'mouse-face)
(set-keymap-parent map erc-mode-map)
map)
"Local keymap for ERC buttons.")
(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."
;; indent-tabs-mode: nil
;; End:
-;; arch-tag: 7d23bed4-2f30-4273-a03f-d7a274c605c4