diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-20 01:44:19 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-20 12:51:39 +0200 |
commit | 9f4cced5db01b256dfcb78a8fa90f388ec32a840 (patch) | |
tree | 0e2cbd1e864af0754371afaefd2841cf6e9ae084 /lisp/erc/erc-track.el | |
parent | 45a0ce0905e495ae93b39e75cedb34ac95c6ea71 (diff) | |
download | emacs-9f4cced5db01b256dfcb78a8fa90f388ec32a840.tar.gz emacs-9f4cced5db01b256dfcb78a8fa90f388ec32a840.tar.bz2 emacs-9f4cced5db01b256dfcb78a8fa90f388ec32a840.zip |
Remove XEmacs compat code from erc
* lisp/erc/erc-button.el (button, erc-button-keymap)
(erc-button-setup, erc-button-add-button): Remove XEmacs compat code.
* lisp/erc/erc-compat.el (erc-replace-match-subexpression-in-string):
* lisp/erc/erc-log.el (erc-log-file-coding-system):
* lisp/erc/erc-menu.el (menu):
* lisp/erc/erc-stamp.el (erc-timestamp-use-align-to):
* lisp/erc/erc-track.el (erc-modified-channels-object, track)
(erc-track-mouse-face):
* lisp/erc/erc.el (erc-update-undo-list)
(erc-quit-reason-various, erc-part-reason-various, erc-cmd-SV)
(erc-input-message, erc-get-channel-mode-from-keypress)
(erc-update-mode-line-buffer):
Diffstat (limited to 'lisp/erc/erc-track.el')
-rw-r--r-- | lisp/erc/erc-track.el | 52 |
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) |