aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/erc/erc-button.el
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2006-02-20 09:40:28 +0000
committerMiles Bader <[email protected]>2006-02-20 09:40:28 +0000
commitd8bd1ad4948b8efd7f3bd9ca704e77034241793c (patch)
treecf78f69c4b5157f3be6f4626ca6e2ba35d8ee8ec /lisp/erc/erc-button.el
parent2f90d2bc9d98b273b1f2b2c1c69dd4f86247555d (diff)
Revision: [email protected]/emacs--devo--0--patch-102
Creator: Michael Olson <[email protected]> Merge from erc--emacs--0
Diffstat (limited to 'lisp/erc/erc-button.el')
-rw-r--r--lisp/erc/erc-button.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index 6c6998a3af..2ec625cc87 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -216,6 +216,7 @@ PAR is a number of a regexp grouping whose text will be passed to
(define-key map (kbd "<button2>") 'erc-button-click-button)
(define-key map (kbd "<mouse-2>") 'erc-button-click-button))
(define-key map (kbd "TAB") 'erc-button-next)
+ (define-key map (kbd "<C-tab>") 'erc-button-previous)
(set-keymap-parent map erc-mode-map)
map)
"Local keymap for ERC buttons.")
@@ -427,6 +428,22 @@ call it with the value of the `erc-data' text property."
(error "No next button"))
t)))
+(defun erc-button-previous ()
+ "Go to the previous button in this buffer."
+ (interactive)
+ (let ((here (point)))
+ (when (< here (erc-beg-of-input-line))
+ (while (and (get-text-property here 'erc-callback)
+ (not (= here (point-min))))
+ (setq here (1- here)))
+ (while (and (not (get-text-property here 'erc-callback))
+ (not (= here (point-min))))
+ (setq here (1- here)))
+ (if (> here (point-min))
+ (goto-char here)
+ (error "No previous button"))
+ t)))
+
(defun erc-browse-emacswiki (thing)
"Browse to thing in the emacs-wiki."
(browse-url (concat erc-emacswiki-url thing)))