diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-08-22 00:06:45 -0400 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-08-22 00:06:45 -0400 |
| commit | d0fcaff514d2be16ccf73817f658318cf85221e3 (patch) | |
| tree | 4487e4c21b07bdb58fdbf8a5a9b4512d05fbd310 /lisp/erc/erc-track.el | |
| parent | 8352b530871b89683c6a64e76ff22ed26e1701fd (diff) | |
| download | emacs-d0fcaff514d2be16ccf73817f658318cf85221e3.tar.gz | |
* lisp/erc/erc.el: Use lexical-binding.
(erc-user-full-name): Minor CSE simplification.
(erc-mode-map): Assume command-remapping is available.
(erc-once-with-server-event): Replace `forms' arg with a function arg.
(erc-once-with-server-event-global): Remove.
(erc-ison-p): Adjust to change in erc-once-with-server-event.
(erc-get-buffer-create): Remove arg `proc'.
(iswitchb-make-buflist-hook): Declare.
(erc-setup-buffer): Use pcase; avoid ((lambda ..) ..).
(read-passwd): Assume it exists.
(erc-display-line, erc-cmd-IDLE): Avoid add-to-list, adjust to change
in erc-once-with-server-event.
(erc-cmd-JOIN, erc-set-channel-limit, erc-set-channel-key)
(erc-add-query): Minor CSE simplification.
(erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Adjust to change
in erc-once-with-server-event.
(erc-echo-notice-in-user-and-target-buffers): Avoid add-to-list.
* lisp/erc/erc-track.el: Use lexical-binding.
(erc-make-mode-line-buffer-name): Use closures instead of `(lambda...).
(erc-faces-in): Avoid add-to-list.
* lisp/erc/erc-notify.el: Use lexical-binding.
(erc-notify-timer): Adjust to change in erc-once-with-server-event.
(erc-notify-QUIT): Use a closure instead of `(lambda...).
* lisp/erc/erc-list.el: Use lexical-binding.
(erc-list-install-322-handler, erc-cmd-LIST): Adjust to change in
erc-once-with-server-event.
* lisp/erc/erc-button.el: Use lexical-binding.
(erc-button-next-function): Use a closure instead of `(lambda...).
Diffstat (limited to 'lisp/erc/erc-track.el')
| -rw-r--r-- | lisp/erc/erc-track.el | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 054c135fa67..e6d5b3119a2 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -1,4 +1,4 @@ -;;; erc-track.el --- Track modified channel buffers +;;; erc-track.el --- Track modified channel buffers -*- lexical-binding:t -*- ;; Copyright (C) 2002-2013 Free Software Foundation, Inc. @@ -710,7 +710,7 @@ inactive." to consider when `erc-track-visibility' is set to only consider active buffers visible.") -(defun erc-user-is-active (&rest ignore) +(defun erc-user-is-active (&rest _ignore) "Set `erc-buffer-activity'." (when erc-server-connected (setq erc-buffer-activity (erc-current-time)) @@ -745,7 +745,7 @@ only consider active buffers visible.") times. Without it, you cannot debug `erc-modified-channels-display', because the debugger also cases changes to the window-configuration.") -(defun erc-modified-channels-update (&rest args) +(defun erc-modified-channels-update (&rest _args) "This function updates the information in `erc-modified-channels-alist' according to buffer visibility. It calls `erc-modified-channels-display' at the end. This should usually be @@ -791,19 +791,19 @@ If FACES are provided, color STRING with them." (int-to-string count)) (copy-sequence string)))) (define-key map (vector 'mode-line 'mouse-2) - `(lambda (e) - (interactive "e") - (save-selected-window - (select-window - (posn-window (event-start e))) - (switch-to-buffer ,buffer)))) + (lambda (e) + (interactive "e") + (save-selected-window + (select-window + (posn-window (event-start e))) + (switch-to-buffer buffer)))) (define-key map (vector 'mode-line 'mouse-3) - `(lambda (e) - (interactive "e") - (save-selected-window - (select-window - (posn-window (event-start e))) - (switch-to-buffer-other-window ,buffer)))) + (lambda (e) + (interactive "e") + (save-selected-window + (select-window + (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) @@ -976,8 +976,9 @@ is in `erc-mode'." cur) (while (and (setq i (next-single-property-change i 'face str m)) (not (= i m))) - (when (setq cur (get-text-property i 'face str)) - (add-to-list 'faces cur))) + (and (setq cur (get-text-property i 'face str)) + (not (member cur faces)) + (push cur faces))) faces)) (cl-assert |
