emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/erc/erc-button.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/erc/erc-button.el,v
Date: Sun, 01 Apr 2007 13:36:43 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/04/01 13:36:38

Index: lisp/erc/erc-button.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/erc/erc-button.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- lisp/erc/erc-button.el      21 Jan 2007 02:47:36 -0000      1.4
+++ lisp/erc/erc-button.el      1 Apr 2007 13:36:37 -0000       1.5
@@ -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 @@
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]