From ff59d266c7dcb9c6f7cc7ff7942510bda288e167 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 1 Apr 2007 13:36:38 +0000 Subject: 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 --- lisp/erc/erc-button.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'lisp/erc/erc-button.el') 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 "") '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 -- cgit v1.2.3