aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/erc/erc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc/erc.el')
-rw-r--r--lisp/erc/erc.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 41d7516fbb4..8712113790b 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -57,12 +57,12 @@
57 57
58(load "erc-loaddefs" nil t) 58(load "erc-loaddefs" nil t)
59 59
60(eval-when-compile (require 'cl-lib)) 60(require 'cl-lib)
61(require 'font-lock) 61(require 'font-lock)
62(require 'format-spec)
62(require 'pp) 63(require 'pp)
63(require 'thingatpt) 64(require 'thingatpt)
64(require 'auth-source) 65(require 'auth-source)
65(require 'erc-compat)
66(require 'time-date) 66(require 'time-date)
67(require 'iso8601) 67(require 'iso8601)
68(eval-when-compile (require 'subr-x)) 68(eval-when-compile (require 'subr-x))
@@ -877,8 +877,8 @@ See `erc-server-flood-margin' for other flood-related parameters.")
877;; Script parameters 877;; Script parameters
878 878
879(defcustom erc-startup-file-list 879(defcustom erc-startup-file-list
880 (list (concat erc-user-emacs-directory ".ercrc.el") 880 (list (concat user-emacs-directory ".ercrc.el")
881 (concat erc-user-emacs-directory ".ercrc") 881 (concat user-emacs-directory ".ercrc")
882 "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc") 882 "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc")
883 "List of files to try for a startup script. 883 "List of files to try for a startup script.
884The first existent and readable one will get executed. 884The first existent and readable one will get executed.
@@ -1306,7 +1306,7 @@ Example:
1306 (enable (intern (format "erc-%s-enable" (downcase sn)))) 1306 (enable (intern (format "erc-%s-enable" (downcase sn))))
1307 (disable (intern (format "erc-%s-disable" (downcase sn))))) 1307 (disable (intern (format "erc-%s-disable" (downcase sn)))))
1308 `(progn 1308 `(progn
1309 (erc-define-minor-mode 1309 (define-minor-mode
1310 ,mode 1310 ,mode
1311 ,(format "Toggle ERC %S mode. 1311 ,(format "Toggle ERC %S mode.
1312With a prefix argument ARG, enable %s if ARG is positive, 1312With a prefix argument ARG, enable %s if ARG is positive,
@@ -1489,8 +1489,7 @@ Defaults to the server buffer."
1489(define-derived-mode erc-mode fundamental-mode "ERC" 1489(define-derived-mode erc-mode fundamental-mode "ERC"
1490 "Major mode for Emacs IRC." 1490 "Major mode for Emacs IRC."
1491 (setq local-abbrev-table erc-mode-abbrev-table) 1491 (setq local-abbrev-table erc-mode-abbrev-table)
1492 (when (boundp 'next-line-add-newlines) 1492 (set (make-local-variable 'next-line-add-newlines) nil)
1493 (set (make-local-variable 'next-line-add-newlines) nil))
1494 (setq line-move-ignore-invisible t) 1493 (setq line-move-ignore-invisible t)
1495 (set (make-local-variable 'paragraph-separate) 1494 (set (make-local-variable 'paragraph-separate)
1496 (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)")) 1495 (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)"))
@@ -2688,7 +2687,7 @@ displayed hostnames."
2688otherwise `erc-server-announced-name'. SERVER is matched against 2687otherwise `erc-server-announced-name'. SERVER is matched against
2689`erc-common-server-suffixes'." 2688`erc-common-server-suffixes'."
2690 (when server 2689 (when server
2691 (or (cdar (erc-remove-if-not 2690 (or (cdar (cl-remove-if-not
2692 (lambda (net) (string-match (car net) server)) 2691 (lambda (net) (string-match (car net) server))
2693 erc-common-server-suffixes)) 2692 erc-common-server-suffixes))
2694 erc-server-announced-name))) 2693 erc-server-announced-name)))
@@ -3725,8 +3724,9 @@ the message given by REASON."
3725 x-toolkit-scroll-bars))) 3724 x-toolkit-scroll-bars)))
3726 "") 3725 "")
3727 (if (featurep 'multi-tty) ", multi-tty" "")) 3726 (if (featurep 'multi-tty) ", multi-tty" ""))
3728 (if erc-emacs-build-time 3727 (if emacs-build-time
3729 (concat " of " erc-emacs-build-time) 3728 (concat " of " (format-time-string
3729 "%Y-%m-%d" emacs-build-time))
3730 ""))) 3730 "")))
3731 t) 3731 t)
3732 3732
@@ -4573,7 +4573,7 @@ See also: `erc-echo-notice-in-user-buffers',
4573 ((string-match "^-" mode) 4573 ((string-match "^-" mode)
4574 ;; Remove the unbanned masks from the ban list 4574 ;; Remove the unbanned masks from the ban list
4575 (setq erc-channel-banlist 4575 (setq erc-channel-banlist
4576 (erc-delete-if 4576 (cl-delete-if
4577 #'(lambda (y) 4577 #'(lambda (y)
4578 (member (upcase (cdr y)) 4578 (member (upcase (cdr y))
4579 (mapcar #'upcase 4579 (mapcar #'upcase
@@ -4594,7 +4594,7 @@ See also: `erc-echo-notice-in-user-buffers',
4594 "Group LIST into sublists of length N." 4594 "Group LIST into sublists of length N."
4595 (cond ((null list) nil) 4595 (cond ((null list) nil)
4596 ((null (nthcdr n list)) (list list)) 4596 ((null (nthcdr n list)) (list list))
4597 (t (cons (erc-subseq list 0 n) (erc-group-list (nthcdr n list) n))))) 4597 (t (cons (cl-subseq list 0 n) (erc-group-list (nthcdr n list) n)))))
4598 4598
4599 4599
4600;;; MOTD numreplies 4600;;; MOTD numreplies
@@ -6183,8 +6183,7 @@ non-nil value is found.
6183 output (apply #'format format-args)) 6183 output (apply #'format format-args))
6184 ;; Change all "1 units" to "1 unit". 6184 ;; Change all "1 units" to "1 unit".
6185 (while (string-match "\\([^0-9]\\|^\\)1 \\S-+\\(s\\)" output) 6185 (while (string-match "\\([^0-9]\\|^\\)1 \\S-+\\(s\\)" output)
6186 (setq output (erc-replace-match-subexpression-in-string 6186 (setq output (replace-match "" nil nil output 2)))
6187 "" output (match-string 2 output) 2 (match-beginning 2))))
6188 output)) 6187 output))
6189 6188
6190 6189