diff options
author | Miles Bader <miles@gnu.org> | 2007-04-01 13:36:38 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-04-01 13:36:38 +0000 |
commit | ff59d266c7dcb9c6f7cc7ff7942510bda288e167 (patch) | |
tree | 9cc762d166a00ae8d02c9f079890afb68125072e /lisp/erc/erc-button.el | |
parent | 25c8c1594fe7ba177ec0621260304181b7052af3 (diff) | |
download | emacs-ff59d266c7dcb9c6f7cc7ff7942510bda288e167.tar.gz emacs-ff59d266c7dcb9c6f7cc7ff7942510bda288e167.tar.bz2 emacs-ff59d266c7dcb9c6f7cc7ff7942510bda288e167.zip |
Release ERC 5.2.
I have updated the version of ERC to 5.2, since it fixes a bug with C-c
C-SPC being bound globally by default. For the full list of changes in
this version, see etc/ERC-NEWS.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-687
Creator: Michael Olson <mwolson@gnu.org>
Diffstat (limited to 'lisp/erc/erc-button.el')
-rw-r--r-- | lisp/erc/erc-button.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 1fd224fb956..435c72bba23 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -56,10 +56,12 @@ "This mode buttonizes all messages according to `erc-button-alist'." ((add-hook 'erc-insert-modify-hook 'erc-button-add-buttons 'append) (add-hook 'erc-send-modify-hook 'erc-button-add-buttons 'append) - (add-hook 'erc-complete-functions 'erc-button-next)) + (add-hook 'erc-complete-functions 'erc-button-next) + (add-hook 'erc-mode-hook 'erc-button-add-keys)) ((remove-hook 'erc-insert-modify-hook 'erc-button-add-buttons) (remove-hook 'erc-send-modify-hook 'erc-button-add-buttons) - (remove-hook 'erc-complete-functions 'erc-button-next))) + (remove-hook 'erc-complete-functions 'erc-button-next) + (remove-hook 'erc-mode-hook 'erc-button-add-keys))) ;; Make XEmacs use `erc-button-face'. (when (featurep 'xemacs) @@ -241,6 +243,16 @@ PAR is a number of a regexp grouping whose text will be passed to This syntax table should make all the legal nick characters word constituents.") +(defvar erc-button-keys-added nil + "Internal variable used to keep track of whether we've added the +global-level ERC button keys yet.") + +(defun erc-button-add-keys () + "Add ERC mode-level button movement keys. This is only done once." + (unless erc-button-keys-added + (define-key erc-mode-map (kbd "<backtab>") 'erc-button-previous) + (setq erc-button-keys-added t))) + (defun erc-button-add-buttons () "Find external references in the current buffer and make buttons of them. \"External references\" are things like URLs, as |