summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-track.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc/erc-track.el')
-rw-r--r--lisp/erc/erc-track.el52
1 files changed, 14 insertions, 38 deletions
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index e51e6056fb9..53a59207839 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -267,22 +267,12 @@ nil - don't add to mode line."
(defun erc-modified-channels-object (strings)
"Generate a new `erc-modified-channels-object' based on STRINGS."
(if strings
- (if (featurep 'xemacs)
- (let ((e-m-c-s '("[")))
- (push (cons (extent-at 0 (car strings)) (car strings))
- e-m-c-s)
- (dolist (string (cdr strings))
- (push "," e-m-c-s)
- (push (cons (extent-at 0 string) string)
- e-m-c-s))
- (push "] " e-m-c-s)
- (reverse e-m-c-s))
- (concat (if (eq erc-track-position-in-mode-line 'after-modes)
- "[" " [")
- (mapconcat 'identity (nreverse strings) ",")
- (if (eq erc-track-position-in-mode-line 'before-modes)
- "] " "]")))
- (if (featurep 'xemacs) '() "")))
+ (concat (if (eq erc-track-position-in-mode-line 'after-modes)
+ "[" " [")
+ (mapconcat 'identity (nreverse strings) ",")
+ (if (eq erc-track-position-in-mode-line 'before-modes)
+ "] " "]"))
+ ""))
(defvar erc-modified-channels-object (erc-modified-channels-object nil)
"Internal object used for displaying modified channels in the mode line.")
@@ -546,20 +536,13 @@ keybindings will not do anything useful."
((when (boundp 'erc-track-when-inactive)
(if erc-track-when-inactive
(progn
- (if (featurep 'xemacs)
- (defadvice switch-to-buffer (after erc-update-when-inactive
- (&rest args) activate)
- (erc-user-is-active))
- (add-hook 'window-configuration-change-hook 'erc-user-is-active))
+ (add-hook 'window-configuration-change-hook 'erc-user-is-active)
(add-hook 'erc-send-completed-hook 'erc-user-is-active)
(add-hook 'erc-server-001-functions 'erc-user-is-active))
(erc-track-add-to-mode-line erc-track-position-in-mode-line)
(erc-update-mode-line)
- (if (featurep 'xemacs)
- (defadvice switch-to-buffer (after erc-update (&rest args) activate)
- (erc-modified-channels-update))
- (add-hook 'window-configuration-change-hook
- 'erc-window-configuration-change))
+ (add-hook 'window-configuration-change-hook
+ 'erc-window-configuration-change)
(add-hook 'erc-insert-post-hook 'erc-track-modified-channels)
(add-hook 'erc-disconnected-hook 'erc-modified-channels-update))
;; enable the tracking keybindings
@@ -570,18 +553,13 @@ keybindings will not do anything useful."
(erc-track-remove-from-mode-line)
(if erc-track-when-inactive
(progn
- (if (featurep 'xemacs)
- (ad-disable-advice 'switch-to-buffer 'after
- 'erc-update-when-inactive)
- (remove-hook 'window-configuration-change-hook
- 'erc-user-is-active))
+ (remove-hook 'window-configuration-change-hook
+ 'erc-user-is-active)
(remove-hook 'erc-send-completed-hook 'erc-user-is-active)
(remove-hook 'erc-server-001-functions 'erc-user-is-active)
(remove-hook 'erc-timer-hook 'erc-user-is-active))
- (if (featurep 'xemacs)
- (ad-disable-advice 'switch-to-buffer 'after 'erc-update)
- (remove-hook 'window-configuration-change-hook
- 'erc-window-configuration-change))
+ (remove-hook 'window-configuration-change-hook
+ 'erc-window-configuration-change)
(remove-hook 'erc-disconnected-hook 'erc-modified-channels-update)
(remove-hook 'erc-insert-post-hook 'erc-track-modified-channels))
;; disable the tracking keybindings
@@ -671,9 +649,7 @@ ARGS are ignored."
(when removed-channel
(erc-modified-channels-display)))))
-(defvar erc-track-mouse-face (if (featurep 'xemacs)
- 'modeline-mousable
- 'mode-line-highlight)
+(defvar erc-track-mouse-face '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)