erc-commit
[Top][All Lists]
Advanced

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

[Erc-commit] [commit][emacs22] Add help-echo and mouse-face properties t


From: mwolson
Subject: [Erc-commit] [commit][emacs22] Add help-echo and mouse-face properties to tracked channel names.
Date: Sun, 14 Oct 2007 00:48:28 -0400

commit 554ce8e5a9d26d94dcc9dc99575d0638071f37ca
Author: Diane Murray <address@hidden>
Date:   Mon Aug 21 18:30:22 2006 +0000

    Add help-echo and mouse-face properties to tracked channel names.
    
    * erc-track.el (erc-track-mode-line-mouse-face): New variable.
      (erc-make-mode-line-buffer-name): Add help-echo and mouse-face
      properties to channel name.
    git-archimport-id: address@hidden/erc--main--0--patch-47

diff --git a/ChangeLog b/ChangeLog
index 1b876a4..4b466ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-21  Diane Murray  <address@hidden>
+
+       * erc-track.el (erc-track-mode-line-mouse-face): New variable.
+       (erc-make-mode-line-buffer-name): Add help-echo and mouse-face
+       properties to channel name.
+
 2006-08-20  Michael Olson  <address@hidden>
 
        * erc-identd.el (erc-identd): New customization group.
diff --git a/erc-track.el b/erc-track.el
index 939b545..209d54a 100644
--- a/erc-track.el
+++ b/erc-track.el
@@ -580,6 +580,11 @@ ARGS are ignored."
       (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 @@ If FACES are provided, color STRING with them."
            (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))




reply via email to

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