diff lisp/erc/erc-track.el @ 74093:bc5d69739d5e

Merge from erc--emacs--22 Merge from my ERC Emacs 22 integration branch. The version is now "5.2 stable pre-release". This will probably be the last change to the version of ERC in Emacs 22 before the release, pending any bugfixes. For details on the changes, see the lisp/erc/ChangeLog file. Note that ERC is now invoked with M-x erc, not M-x erc-select. If you were using the old `erc' function programmatically, use `erc-open' instead. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-520 Creator: Michael Olson <mwolson@gnu.org>
author Miles Bader <miles@gnu.org>
date Mon, 20 Nov 2006 06:50:29 +0000
parents 3d0d6e217db9
children f45c5edf0be4
line wrap: on
line diff
--- a/lisp/erc/erc-track.el	Mon Nov 20 02:48:15 2006 +0000
+++ b/lisp/erc/erc-track.el	Mon Nov 20 06:50:29 2006 +0000
@@ -580,6 +580,11 @@
       (erc-modified-channels-display)
       (force-mode-line-update t))))
 
+(defvar erc-track-mouse-face (if (featurep 'xemacs)
+				 'modeline-mousable
+			       'mode-line-highlight)
+  "The face to use when mouse is over channel names in the mode line.")
+
 (defun erc-make-mode-line-buffer-name (string buffer &optional faces count)
   "Return STRING as a button that switches to BUFFER when clicked.
 If FACES are provided, color STRING with them."
@@ -609,6 +614,12 @@
 	    (posn-window (event-start e)))
 	   (switch-to-buffer-other-window ,buffer))))
     (put-text-property 0 (length name) 'local-map map name)
+    (put-text-property
+     0 (length name)
+     'help-echo (concat "mouse-2: switch to buffer, "
+			"mouse-3: switch to buffer in other window")
+     name)
+    (put-text-property 0 (length name) 'mouse-face erc-track-mouse-face name)
     (when (and faces erc-track-use-faces)
       (put-text-property 0 (length name) 'face faces name))
     name))