diff options
Diffstat (limited to 'lisp/erc/erc-track.el')
-rw-r--r-- | lisp/erc/erc-track.el | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index d53668e2666..e51e6056fb9 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -495,9 +495,6 @@ START is the minimum length of the name used." ;;;###autoload (define-minor-mode erc-track-minor-mode "Toggle mode line display of ERC activity (ERC Track minor mode). -With a prefix argument ARG, enable ERC Track minor mode if ARG is -positive, and disable it otherwise. If called from Lisp, enable -the mode if ARG is omitted or nil. ERC Track minor mode is a global minor mode. It exists for the sole purpose of providing the C-c C-SPC and C-c C-@ keybindings. @@ -542,7 +539,7 @@ keybindings will not do anything useful." ;;; Module -;;;###autoload (autoload 'erc-track-mode "erc-track" nil t) +;;;###autoload(autoload 'erc-track-mode "erc-track" nil t) (define-erc-module track nil "This mode tracks ERC channel buffers with activity." ;; Enable: @@ -633,8 +630,8 @@ only consider active buffers visible.") (if erc-track-when-inactive (when erc-buffer-activity; could be nil (and (erc-track-get-buffer-window buffer erc-track-visibility) - (<= (erc-time-diff erc-buffer-activity (erc-current-time)) - erc-buffer-activity-timeout))) + (not (time-less-p erc-buffer-activity-timeout + (erc-time-diff erc-buffer-activity nil))))) (erc-track-get-buffer-window buffer erc-track-visibility))) ;;; Tracking the channel modifications @@ -643,7 +640,7 @@ only consider active buffers visible.") (unless (minibuffer-window-active-p (minibuffer-window)) ;; delay this until command has finished to make sure window is ;; actually visible before clearing activity - (add-hook 'post-command-hook 'erc-modified-channels-update))) + (erc-modified-channels-update))) (defvar erc-modified-channels-update-inside nil "Variable to prevent running `erc-modified-channels-update' multiple @@ -672,8 +669,7 @@ ARGS are ignored." (erc-modified-channels-remove-buffer buffer)))) erc-modified-channels-alist) (when removed-channel - (erc-modified-channels-display))) - (remove-hook 'post-command-hook 'erc-modified-channels-update))) + (erc-modified-channels-display))))) (defvar erc-track-mouse-face (if (featurep 'xemacs) 'modeline-mousable @@ -932,14 +928,14 @@ relative to `erc-track-switch-direction'" offset) (when (< arg 0) (setq dir (pcase dir - (`oldest 'newest) - (`newest 'oldest) - (`mostactive 'leastactive) - (`leastactive 'mostactive) - (`importance 'oldest))) + ('oldest 'newest) + ('newest 'oldest) + ('mostactive 'leastactive) + ('leastactive 'mostactive) + ('importance 'oldest))) (setq arg (- arg))) (setq offset (pcase dir - ((or `oldest `leastactive) + ((or 'oldest 'leastactive) (- (length erc-modified-channels-alist) arg)) (_ (1- arg)))) ;; normalize out of range user input @@ -974,6 +970,7 @@ switch back to the last non-ERC buffer visited. Next is defined by ;;; erc-track.el ends here ;; ;; Local Variables: +;; generated-autoload-file: "erc-loaddefs.el" ;; indent-tabs-mode: t ;; tab-width: 8 ;; End: |