comparison 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
comparison
equal deleted inserted replaced
74092:b4cb60fd110d 74093:bc5d69739d5e
578 (erc-modified-channels-remove-buffer buffer)))) 578 (erc-modified-channels-remove-buffer buffer))))
579 erc-modified-channels-alist) 579 erc-modified-channels-alist)
580 (erc-modified-channels-display) 580 (erc-modified-channels-display)
581 (force-mode-line-update t)))) 581 (force-mode-line-update t))))
582 582
583 (defvar erc-track-mouse-face (if (featurep 'xemacs)
584 'modeline-mousable
585 'mode-line-highlight)
586 "The face to use when mouse is over channel names in the mode line.")
587
583 (defun erc-make-mode-line-buffer-name (string buffer &optional faces count) 588 (defun erc-make-mode-line-buffer-name (string buffer &optional faces count)
584 "Return STRING as a button that switches to BUFFER when clicked. 589 "Return STRING as a button that switches to BUFFER when clicked.
585 If FACES are provided, color STRING with them." 590 If FACES are provided, color STRING with them."
586 ;; We define a new sparse keymap every time, because 1. this data 591 ;; We define a new sparse keymap every time, because 1. this data
587 ;; structure is very small, the alternative would require us to 592 ;; structure is very small, the alternative would require us to
607 (save-selected-window 612 (save-selected-window
608 (select-window 613 (select-window
609 (posn-window (event-start e))) 614 (posn-window (event-start e)))
610 (switch-to-buffer-other-window ,buffer)))) 615 (switch-to-buffer-other-window ,buffer))))
611 (put-text-property 0 (length name) 'local-map map name) 616 (put-text-property 0 (length name) 'local-map map name)
617 (put-text-property
618 0 (length name)
619 'help-echo (concat "mouse-2: switch to buffer, "
620 "mouse-3: switch to buffer in other window")
621 name)
622 (put-text-property 0 (length name) 'mouse-face erc-track-mouse-face name)
612 (when (and faces erc-track-use-faces) 623 (when (and faces erc-track-use-faces)
613 (put-text-property 0 (length name) 'face faces name)) 624 (put-text-property 0 (length name) 'face faces name))
614 name)) 625 name))
615 626
616 (defun erc-modified-channels-display () 627 (defun erc-modified-channels-display ()