1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-102

Creator:  Michael Olson <mwolson@gnu.org>

Merge from erc--emacs--0
This commit is contained in:
Miles Bader 2006-02-20 09:40:28 +00:00
parent 2f90d2bc9d
commit d8bd1ad494
5 changed files with 39 additions and 4 deletions

View file

@ -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)))