1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

352 Commits

Author SHA1 Message Date
F. Jason Park
4e312c07f7 Make ERC respect spaces in server passwords
* lisp/erc/erc.el (erc-login): Also known as connection passwords,
these are sent as the sole arg to the PASS command, which is nowadays
often overloaded with other semantics imposed by various entities to
convey things like bouncer or services creds.
2022-06-30 15:03:26 -07:00
F. Jason Park
ecafe1cbb5 Recognize ASCII and strict CASEMAPPINGs in ERC
* lisp/erc/erc.el (erc-downcase, erc--casemapping-rfc1459-strict,
erc--casemapping-rfc1459): Add new translation tables for the latter
two mappings and use them in `erc-downcase'.

* test/lisp/erc/erc-tests.el: Add test for `erc-downcase'.
2022-06-30 15:03:26 -07:00
F. Jason Park
c356f86b51 Update ISUPPORT handling in ERC
* lisp/erc/erc-backend (erc--isupport-params): Add new variable to
hold a hashmap of parsed `erc-server-parameters' in a more useful
format.  But keep `erc-server-parameters' around for public use.  We
currently lack dedicated local variables for certain discovered IRC
session properties, such as what prefix characters are supported for
channels, etc.  And the truth of this needs querying many times per
second at various points.  As such, caching here seems justified but
can be easily removed if deemed otherwise because all ingredients are
internal.
(erc--parse-isupport-value): Add helper function that parses an
ISUPPORT value and returns the component parts with backslash-x hex
escapes removed.  This can probably use some streamlining.
(erc--with-memoization): Add compat alias for use in internal ISUPPORT
getter.  Should be moved to `erc-compat.el' when that library is fully
reincorporated.
(erc--get-isupport-entry): Add internal getter to look up ISUPPORT
items.
(erc-server-005): Treat `erc-server-response' "command args" field as
read-only.  Previously, this field was set to nil after processing,
which was unhelpful to other parts of the library.  Also call above
mentioned helper to parse values.  And add some bookkeeping to handle
negation.

* lisp/erc/erc-capab.el (erc-capab-identify-send-messages): Use
internal ISUPPORT getter.

* lisp/erc/erc.el (erc-cmd-NICK, erc-parse-prefix,
erc-nickname-in-use): Use internal ISUPPORT getter.

* test/lisp/erc/erc-tests.el: Add tests for the above mentioned
changes in erc-backend.el.
2022-06-30 15:03:26 -07:00
F. Jason Park
485b84cb7c Require erc-networks in erc.el
* lisp/erc/erc.el: Require erc-networks.el, which ERC can't run
without these days.  To sidestep the circular dependency, require it
last, just after erc-goodies.  Remove the `declare-function' for
`erc-network-name' because it's not currently needed at load time.
(erc-log-irc-protocol, erc-hide-current-message-p): Remove `fboundp'
guard logic from `erc-network-name' invocations but preserve meaning
by interpreting `erc-network' being unset to mean module isn't loaded
or authoritative network detection has failed.
(erc-format-network): Likewise here.  At the moment, this function
always returns the empty string because the function
`erc-network-name' always returns non-nil, perhaps from the
fallback/failure sentinel "Unknown", perhaps from the printed form of
nil.

* lisp/erc/erc-networks.el (erc-network): This is called throughout
erc.el but was previously cumbersome to use on account of being
guarded by `fboundp'.  It now relies on the fact that its namesake
variable is set in target buffers as well.
2022-06-30 15:03:26 -07:00
F. Jason Park
de53d18a4d Don't set erc-server-announced-name unless known
* lisp/erc/erc.el (erc-open): whenever this function is called, the
variable `erc-server-announced-name' may be set locally in the calling
server buffer.  However, if that buffer's dialed server matches that
of the one being created, the announced name is copied over on faith.
But there's no guarantee that the name will match the one ultimately
emitted by the server during its introductory burst.  Beyond
potentially causing confusion in protocol logs, this behavior may
complicate debugging efforts.  Setting the variable to nil helps
ensure a consistent environment when preparing a buffer for all newly
dialed connections.  This commit also simplifies the setting of
`erc-server-connected', which is always nil when connecting and
vice-versa.
2022-06-30 15:03:26 -07:00
F. Jason Park
c5b78a3379 Customize displaying of ERC buffers on reconnect
* lisp/erc/erc-backend.el (erc--server-last-reconnect-count):
Add variable to record last reconnect tally.

* lisp/erc/erc.el (erc-reconnect-display): Add new option to specify
channel-buffer display behavior on reconnect.
(erc-setup-buffer): Use option `erc-reconnect-display' if warranted.
(erc-cmd-JOIN): Forget last reconnect count when issuing a manual
/JOIN command.
(erc-connection-established): Record reconnect count in internal var
before resetting.
(Bug#51753)
2022-06-30 15:03:26 -07:00
F. Jason Park
a63ed6f78a Remove duplicate ERC prompt on reconnect
* lisp/erc/erc-backend.el (erc--unhide-prompt, erc--hide-prompt,
erc--unhide-prompt-on-self-insert): Add functions to ensure prompt is
hidden on disconnect and shown when a user types /reconnect in a
disconnected server buffer.
(erc-process-sentinel): Register aforementioned function with
`pre-command-hook' when prompt is deleted after disconnecting.
(erc-server-PRIVMSG): Ensure prompt is showing when a new message
arrives from target.

* lisp/erc/erc.el (erc-hide-prompt): Repurpose unused option by
changing meaning slightly to mean "selectively hide prompt when
disconnected."  Also delete obsolete, commented-out code that at some
point used this option in its prior incarnation.
(erc-prompt-hidden): Add new option to specify look of prompt when
hidden.
(erc-unhide-query-prompt): Add option to force-reveal query prompts on
reconnect.
(erc-open): Augment earlier reconnect-detection semantics by
incorporating `erc--server-reconnecting'.  In existing buffers, remove
prompt-related hooks and reveal prompt, if necessary.
(erc-cmd-RECONNECT): Allow a user to reconnect when already
connected (by first disconnecting).
(erc-connection-established): Possibly unhide query prompts.
(Bug#54826)

* test/lisp/erc/erc-tests.el (erc-tests--test-prep,
erc-tests--set-fake-server-process): Factor out some common
buffer-prep boilerplate involving user input and the server process.
Shared with bug#54536.
2022-06-30 15:03:26 -07:00
F. Jason Park
4ae0707704 Accept user keyword arg in ERC entry-point commands
* lisp/erc/erc-backend.el (erc-server-reconnect): Reuse the username
argument from the previous session's USER command when reconnecting.
Also pass the existing client certificate, fixing an issue related to
bug#47788.
(erc-session-user-full-name): Move variable here from erc.el.
(erc-session-username): Add new local variable to store entry point
parameter.

* lisp/erc/erc.el (erc-session-user-full-name): Move variable to
erc-backend.
(erc-open, erc-determine-parameters, erc, erc-tls): Accept new
optional user parameter.
(erc-query): Preserve current `erc-session-username' when calling
`erc-open'.
(erc-login): Use `erc-session-username' instead of deriving it.
(erc-compute-user): Add new function to determine user name from
explicit argument or user options.
(Bug#54824)
2022-06-30 15:03:26 -07:00
F. Jason Park
54414ec846 Initialize erc-server-filter-data in erc-backend
* lisp/erc/erc-backend.el (erc-server-connect): Set
`erc-server-filter-data' to nil upon (re)connecting.

* lisp/erc/erc.el (erc-open): For the sake of clarity, don't
initialize `erc-server-filter-data' here because non-connect
invocations merely set up a target buffer and have no business
touching this variable.
2022-06-30 15:03:26 -07:00
F. Jason Park
0f52e7ac68 Rework mutual dependency between erc and erc-backend
* lisp/erc/erc.el: Declare needed variables exported by erc-backend.el
as special near the top of the file, and only require `erc-backend'
after providing `erc' as a feature at the very end.

* lisp/erc/erc-backend.el: Don't preemptively provide `erc-backend'.

* test/lisp/erc/erc-tests.el (erc--meta--backend-dependencies): Add
utility test to scrape for unused vars that may accumulate over time.
(Bug#54825)
2022-06-30 15:03:26 -07:00
Stefan Kangas
942bc9c8f5 Don't use obsolete yow library
* lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy):
Don't use obsolete yow library.
2022-05-13 23:17:16 +02:00
Lars Ingebrigtsen
2d71fd3b04 Further doc string quoting fixes
* test/lisp/progmodes/cperl-mode-tests.el (cperl--run-test-cases):
* lisp/simple.el (undo-equiv-table):
* lisp/shell.el (shell-mode):
(shell-mode):
* lisp/recentf.el (recentf-mode):
* lisp/org/ob-table.el (org-sbe):
* lisp/net/eudc.el (eudc-rfc5322-cctext-token):
* lisp/mail/ietf-drums-date.el (ietf-drums-date--slot-ranges):
* lisp/faces.el (color-luminance-dark-limit):
* lisp/erc/erc.el (erc-tls):
* lisp/emacs-lisp/pcase.el (pcase-setq): Further quoting fixes in
doc strings.
2022-04-22 17:16:42 +02:00
Guy Gastineau
f755daafb9 Remove redundant checks in erc--switch-to-buffer
* lisp/erc/erc.el (erc--switch-to-buffer): Commit
f925fc93ba "Add `predicate' arg to
`read-buffer' and use it for erc-iswitchb" meant to remove this, but
it was left behind. (Bug#53617)

Copyright-paperwork-exempt: yes
2022-03-19 01:47:06 -07:00
Amin Bandali
f4bfe7834a
ERC: Add new comaintainer, F. Jason Park
* lisp/erc/erc*.el: Add J.P. as my comaintainer to headers.
2022-01-24 10:59:05 -05:00
Sam Steingold
ad5cf84fa7 Add `auth-info-password' and use it instead of ad hoc code
* lisp/auth-source.el (auth-info-password):
  Extract from `auth-source-pick-first-password'.
(auth-source-pick-first-password, auth-source-secrets-create)
(auth-source-user-and-password): Use `auth-info-password'.
* lisp/erc/erc-services.el (erc-nickserv-get-password):
  Use `auth-source-pick-first-password'.
* lisp/erc/erc.el (erc-open, erc-server-join-channel): Likewise.
* lisp/gnus/mail-source.el (mail-source-set-1): Add a comment.
* lisp/gnus/nnimap.el (nnimap-credentials): Use `auth-info-password'.
* lisp/gnus/nntp.el (nntp-send-authinfo): Likewise.
* lisp/mail/rmail.el (rmail-get-remote-password): Likewise.
* lisp/mail/smtpmail.el (smtpmail-try-auth-methods): Likewise.
* lisp/net/sieve-manage.el (sieve-sasl-auth): Likewise.
* lisp/net/tramp.el (tramp-read-passwd): Likewise.
* lisp/net/rcirc.el (rcirc): Likewise (fixes a bug: the possibility
  that password might be a function was not handled).
2022-01-07 14:48:59 -05:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Stefan Kangas
4a3ba8528b Use substitute-command-keys for literal key sequences
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-help-for-help):
* lisp/calc/calc-mode.el (calc-auto-why):
* lisp/calc/calc.el (calc-do):
* lisp/calculator.el (calculator-mode):
* lisp/dired-aux.el (dired-create-files)
(dired-do-create-files-regexp, dired-create-files-non-directory):
* lisp/dired-x.el (dired-virtual):
* lisp/dired.el (dired-mark-region, dired-unmark-all-files):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/epa-ks.el (epa-ks--display-keys):
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol):
* lisp/files.el (save-some-buffers):
* lisp/gnus/gnus-dired.el (gnus-dired-find-file-mailcap)
(gnus-dired-print):
* lisp/gnus/gnus-group.el (gnus-keep-same-level):
* lisp/gnus/gnus-score.el (gnus-score-find-trace):
* lisp/gnus/gnus.el (to-list):
* lisp/gnus/message.el (message--send-mail-maybe-partially):
* lisp/mail/supercite.el (sc-set-variable):
* lisp/minibuffer.el (minibuffer-inactive-mode):
* lisp/progmodes/etags.el (select-tags-table):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-char-mode-loop):
* lisp/replace.el (query-replace-help):
* lisp/simple.el (set-variable):
* lisp/subr.el (read-char-from-minibuffer):
* lisp/textmodes/ispell.el (ispell-help, ispell-message):
* lisp/textmodes/reftex-global.el (reftex-find-duplicate-labels):
* lisp/textmodes/reftex-vars.el
(reftex-toc-include-file-boundaries)
(reftex-toc-include-labels, reftex-toc-include-index-entries)
(reftex-toc-include-context, reftex-toc-follow-mode)
(reftex-index-include-context, reftex-index-follow-mode)
(reftex-enable-partial-scans)
(reftex-auto-update-selection-buffers)
(reftex-highlight-selection):
* lisp/time.el (display-time-update):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-keep-variants):
* lisp/vc/ediff-ptch.el (ediff-fixup-patch-map)
(ediff-patch-file-internal):
* lisp/windmove.el (windmove-delete-default-keybindings): Use
'substitute-command-keys' for literal key sequences.

* lisp/userlock.el (userlock--fontify-key): Remove function.
(ask-user-about-lock, ask-user-about-lock-help)
(ask-user-about-supersession-threat)
(ask-user-about-supersession-help): Use 'substitute-command-keys' for
literal key sequences.

* lisp/ibuffer.el (ibuffer-unmark-all): Use 'substitute-command-keys'
for command.
2021-11-22 12:04:19 +01:00
Lars Ingebrigtsen
aa4cffccac Make erc-mode noninteractive
* lisp/erc/erc.el (erc-mode): Mark it as noninteractive, because
using it from `M-x' will only lead to problems (bug#51841).
2021-11-16 08:26:24 +01:00
Stefan Kangas
585e2103df erc: Don't announce broken functionality in /query docstring
* lisp/erc/erc.el (erc-cmd-QUERY): Be less enthusiastic about
announcing missing/broken functionality.  The comment "except this is
broken right now" has been there since 2008, and it's not obvious to
me that we should ever re-add it.
2021-11-11 18:43:32 +01:00
Stefan Kangas
104e90d936 Prefer locate-user-emacs-file
* lisp/cmuscheme.el (scheme-start-file):
* lisp/erc/erc.el (erc-startup-file-list):
* lisp/net/nsm.el (nsm-settings-file):
* lisp/net/tramp-crypt.el (tramp-crypt-config-file-name):
* lisp/org/org-clock.el (org-clock-persist-file):
* lisp/org/org-id.el (org-id-locations-file)
* lisp/shell.el (shell): Prefer 'locate-user-emacs-file' to fiddling
with 'user-emacs-directory' directly.
2021-11-09 07:51:27 +01:00
F. Jason Park
1b1d387b96 Don't send empty lines for unknown commands in ERC
* lisp/erc/erc.el (erc-cmd-default): prevent excess trailing newlines
from being sent.

* test/lisp/erc/erc-tests.el: Update `erc-process-input-line' test to
check for excess line feeds with unknown commands.
2021-11-06 19:13:35 +01:00
F. Jason Park
dedab1c30d Deprecate instead of redefine erc-server-reconnecting
* lisp/erc/erc-backend.el (erc-server-reconnecting,
erc--server-reconnecting): obsolete and replace the former with new
internal variant, which carries a simplified meaning.

(erc-server-reconnect-p, erc--server-reconnect-p): Obsolete and
replace the former with an internal function, and change behavior to
disregard `erc-server-reconnecting' when rendering verdict.

(erc-process-sentinel-2): ensure local var `erc--server-reconnecting'
is t when timers are scheduled or firing, and nil otherwise, including
after retries exhausted.  This agrees with the straightforward way
`erc-server-reconnecting' has always been used by `erc-cmd-RECONNECT'.

(erc-server-connect): set `erc--server-reconnecting'.

* lisp/erc/erc.el (erc-cmd-RECONNECT): use `erc--server-reconnecting'
instead of `erc-server-reconnecting'.
2021-11-06 19:13:35 +01:00
F. Jason Park
4d656ea5ff Don't send empty lines for implicit targets in ERC
* erc.el (erc-send-input-line): Previously, any line typed into a
query or channel buffer without an explicit user-command
handler (meaning most lines), would be sent twice because a trailing
newline (linefeed) would be appended. This has been verified by
checking IRCd server logs. IRCds won't return an error upon receiving
an empty message, but they also won't forward them to channel
subscribers and DM pals.

* erc-tests.el: Add test for erc-process-input-line, which also
indirectly tests erc-send-input-line. It also tests the command
lookup and dispatch facility (bug#50008).
2021-11-06 03:09:43 +01:00
Amin Bandali
ca3d7234d3
Release ERC 5.4.1
* doc/misc/erc.texi (ERCVER): Bump to 5.4.1.
* etc/ERC-NEWS: Add entry for 5.4.1 with explanations.
* lisp/erc/erc.el (Version, erc-version): Bump to 5.4.1.
(customize-package-emacs-version-alist): Add entry for 5.4.1.
2021-10-15 16:51:59 -04:00
Lars Ingebrigtsen
3b3211c023 Mark def* macros for indentation
* lisp/widget.el (define-widget-keywords):
* lisp/vc/pcvs.el (defun-cvs-mode):
* lisp/subr.el (defvar-local):
(defvar-keymap):
* lisp/skeleton.el (define-skeleton):
* lisp/simple.el (define-alternatives):
* lisp/progmodes/gud.el (gdb-script-mode):
* lisp/progmodes/gdb-mi.el (def-gdb-preempt-display-buffer):
(def-gdb-auto-update-trigger):
(def-gdb-auto-update-handler):
(def-gdb-trigger-and-handler):
(def-gdb-thread-buffer-command):
(def-gdb-thread-buffer-simple-command):
(def-gdb-thread-buffer-gud-command):
(def-gdb-set-positive-number):
(def-gdb-memory-format):
(def-gdb-memory-unit):
(def-gdb-memory-show-page):
* lisp/progmodes/compile.el (define-compilation-mode):
* lisp/progmodes/cc-vars.el (defcustom-c-stylevar):
* lisp/obsolete/cl.el (define-setf-expander):
(defsetf):
(define-modify-macro):
* lisp/obsolete/cl-compat.el (defkeyword):
* lisp/net/hmac-def.el (define-hmac-function):
* lisp/international/mule-conf.el (define-iso-single-byte-charset):
* lisp/international/ccl.el (define-ccl-program):
* lisp/image.el (defimage):
* lisp/gnus/gmm-utils.el (defun-gmm):
* lisp/ezimage.el (defezimage):
* lisp/erc/erc.el (define-erc-module):
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/emacs-lisp/eieio-compat.el (defgeneric):
(defmethod):
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
(define-globalized-minor-mode):
* lisp/emacs-lisp/derived.el (define-derived-mode):
* lisp/emacs-lisp/byte-run.el (defsubst):
(define-obsolete-function-alias):
(define-obsolete-variable-alias):
* lisp/custom.el (defcustom):
(defface):
(defgroup):
(deftheme):
* lisp/cedet/semantic/wisent.el (define-wisent-lexer):
* lisp/cedet/semantic/lex.el (define-lex):
(define-lex-analyzer):
(define-lex-regex-analyzer):
(define-lex-simple-regex-analyzer):
(define-lex-block-analyzer):
(define-lex-keyword-type-analyzer):
(define-lex-sexp-type-analyzer):
(define-lex-regex-type-analyzer):
(define-lex-string-type-analyzer):
(define-lex-block-type-analyzer):
* lisp/cedet/semantic/lex-spp.el
(define-lex-spp-macro-declaration-analyzer):
(define-lex-spp-macro-undeclaration-analyzer):
(define-lex-spp-include-analyzer):
* lisp/cedet/semantic/dep.el
(defcustom-mode-local-semantic-dependency-system-include-path):
* lisp/cedet/semantic/decorate/mode.el
(define-semantic-decoration-style):
* lisp/cedet/mode-local.el (define-child-mode):
(define-overloadable-function):
(define-mode-local-override):
* lisp/calc/calc.el (defcalcmodevar):
(defmath): Explicitly mark all macros that have names that start
with "def" that should indent defunly-like (bug#43329).
2021-10-13 21:52:57 +02:00
Amin Bandali
ac06608878
Release ERC 5.4
* lisp/erc/erc.el (Version, erc-version): Bump to 5.4.
(customize-package-emacs-version-alist): Add entry for 5.4.
2021-10-11 10:29:35 -04:00
Amin Bandali
c480b68644
Add ERC entries for 'customize-package-emacs-version-alist'
* lisp/erc/erc.el (customize-package-emacs-version-alist): Add entries
for existing ERC versions.
2021-10-11 10:04:44 -04:00
F. Jason Park
31d60488ac
Backport: Add ERC version to protocol log
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol): Include the erc
version in the debug logs (bug#51107).

(cherry picked from commit 1341134620)
2021-10-11 09:29:01 -04:00
Amin Bandali
1100fffcd3
* lisp/erc/erc.el: Don't error if 'erc-loaddefs' does not exist.
That autoload file is created as part of the Emacs compilation
process, however we would like ERC to be usable if used outside
emacs.git (e.g. if installed from GNU ELPA).
2021-10-06 23:14:25 -04:00
Amin Bandali
8865fc02ab
Add 'erc-bug' command for reporting ERC bugs
* etc/ERC-NEWS: Announce the new command, and mention it at the top of
the file along with 'report-emacs-bug'.
* lisp/erc/erc.el (erc-bug): New command for reporting ERC bugs.  It
prompts for a subject, and passes it on to 'report-emacs-bug' along
with the current ERC version, with the ERC mailing list in Cc.
2021-10-06 23:02:09 -04:00
Amin Bandali
5afa07919e
Add 'erc-version' and use it to display ERC version consistently
* lisp/erc/erc.el (erc-version): New constant holding the current ERC
version, now used in the function with the same name to produce a
version string for use across ERC for consistency.  Also, add another
optional argument, 'bold-erc', which when non-nil, marks the "ERC"
portion of the string with the control character for bold display.
(erc-quit/part-reason-default): Use the 'erc-version' function for a
consistent version string.
(erc-cmd-SV): Mention the ERC version number from the 'erc-version'
constant.
(erc-ctcp-query-VERSION): Use the 'erc-version' function for a
consistent version string.
2021-10-06 22:06:01 -04:00
Stefan Kangas
595e506c82
* lisp/erc/erc.el (erc-user-mode): Set "+i" by default. 2021-10-03 23:06:14 -04:00
Amin Bandali
94c247d659
; Oops, fix up last commit 2021-10-01 01:32:48 -04:00
Stefan Kangas
88378acbfc
Rename arguments of ERC's '/whois' and simplify doc string
* lisp/erc/erc.el (erc-cmd-WHOIS): Rename arguments and reword the doc
string to further clarify and simplify.
2021-10-01 01:21:45 -04:00
Amin Bandali
dc94ca7b2b
Add new '/wii' convenience ERC command
* etc/NEWS: Announce the addition of the command.
* lisp/erc/erc.el (erc-cmd-WII): Add '/wii' convenience command which
calls the '/whois' command with the given nick as both arguments,
which is useful for displaying the whois information for the nick
along with idle time, even if the nick is on a different server than
the one we are currently connected to.
2021-09-29 23:11:49 -04:00
Amin Bandali
9fc1fdcbf3
Restore the previous order of ERC's '/whois' arguments
* etc/NEWS: Remove unneeded entry.
* lisp/erc/erc.el (erc-cmd-WHOIS): Restore the previous order of
arguments sent to the server, so that there's no change in the
function's behavior.  Instead, rename the arguments to be more
accurate, and expand upon them in the doc string.
2021-09-29 22:17:18 -04:00
Amin Bandali
081eb52e4d
Switch the order of ERC's '/whois' arguments sent to the server
* lisp/erc/erc.el (erc-cmd-WHOIS): Switch the order of 'server' and
'user' arguments sent to the server.  Per RFC 1459 and RFC 2812, the
optional 'server' argument command comes before the 'user' argument,
not after.  While at it, update the doc string to explain why one may
want to specify the 'server' argument.
* etc/NEWS: Announce the change.
2021-09-29 01:01:21 -04:00
Stefan Kangas
8772d81966 ; Some more docfixes for erc/*.el 2021-09-19 13:21:56 +02:00
Stefan Kangas
4fdb150769 ; Stylistic docfixes in erc/*.el found by checkdoc 2021-09-19 12:59:55 +02:00
Amin Bandali
bc59c98f09
Add new '/opme' and '/deopme' convenience ERC commands
* lisp/erc/erc.el (erc-cmd-OPME, erc-cmd-DEOPME): Add convenience
commands for setting and unsetting the operator status on the current
nick in the current channel.  'erc-cmd-OPME' relies on ChanServ for
obtaining the operator status (see doc string for more details).

* etc/NEWS: Announce the addition of the commands.
2021-09-18 23:37:37 -04:00
Amin Bandali
62e870691d
* lisp/erc/erc.el: Add Package-Requires and URL headers. 2021-09-17 21:54:15 -04:00
Stefan Kangas
63f419f133 ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
F. Jason Park
426c5fdfb2 Change the erc debug logging format to be more repeatable
* erc.el (erc-debug-irc-protocol): Fix line-ending mismatch between
incoming and outgoing logger lines without changing interface. Do this
by adding carriage returns to the latter to improve machine
readability. Change printed peer labels to most accurately reflect
logical endpoints.

(erc-debug-irc-protocol-time-format): Add new variable to support
timestamps in protocol logger output.

(erc-debug-irc-protocol-version): Add new variable to help tooling
track logging format independent of ERC and Emacs versions.

(erc-toggle-debug-irc-protocol): Add headers to protocol-log buffer
to aid future bug-reproduction tools. Clean up overlong lines (bug#50009).
2021-09-16 15:35:55 +02:00
F. Jason Park
fb2971e18e Fix erc nick trimming
* lisp/erc/erc.el (erc-lurker-maybe-trim): Prevent warning from
showing up in third-party code using this function by autoloading
rx.el when needed.  Remove trailing chars appended for uniquifying
purposes when a nick is already taken. Special thanks to Mattias
Engdegård for making this more respectable (Bug#50005).

* test/lisp/erc/erc-tests.el: Add tests for the above and require
erc-networks.
2021-09-16 15:25:18 +02:00
Amin Bandali
85d0ed097e
ERC: Use 'string-replace' only on Emacs 28 and later
* lisp/erc/erc-dcc.el (erc-dcc-unquote-filename):
* lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy)
(erc-update-mode-line-buffer, erc-message-english-PART): Use
'string-replace' only on Emacs 28 and later, otherwise use
'replace-regexp-in-string' on older Emacsen.
2021-09-12 14:32:13 -04:00
Amin Bandali
e20bae005e
ERC: Use 'string-search' only on Emacs 28 and later
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input): Use 'string-search' only on
Emacs 28 and later, otherwise use 'string-match' on older Emacsen.
2021-09-12 14:32:12 -04:00
Stefan Kangas
0cabf8bc36 ; Fix typos 2021-09-03 13:05:32 +02:00
Mattias Engdegård
3b7b181bde Use string-search instead of string-match[-p]
`string-search` is easier to understand, less error-prone, much
faster, does not pollute the regexp cache, and does not mutate global
state.  Use it where applicable and obviously safe (erring on the
conservative side).

* admin/authors.el (authors-canonical-file-name)
(authors-scan-change-log):
* lisp/apropos.el (apropos-command)
(apropos-documentation-property, apropos-symbols-internal):
* lisp/arc-mode.el (archive-arc-summarize)
(archive-zoo-summarize):
* lisp/calc/calc-aent.el (math-read-factor):
* lisp/calc/calc-ext.el (math-read-big-expr)
(math-format-nice-expr, math-format-number-fancy):
* lisp/calc/calc-forms.el (math-read-angle-brackets):
* lisp/calc/calc-graph.el (calc-graph-set-range):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-lang.el (tex, latex, math-read-big-rec):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-user-define-permanent, math-define-exp):
* lisp/calc/calc.el (calc-record, calcDigit-key)
(calc-count-lines):
* lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots)
(math-do-integral):
* lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum)
(calc-get-fit-variables):
* lisp/cedet/ede/speedbar.el (ede-tag-expand):
* lisp/cedet/semantic/java.el (semantic-java-expand-tag):
* lisp/cedet/semantic/sb.el (semantic-sb-show-extra)
(semantic-sb-expand-group):
* lisp/cedet/semantic/wisent/python.el
(semantic-python-instance-variable-p):
* lisp/cus-edit.el (get):
* lisp/descr-text.el (describe-text-sexp):
* lisp/dired-aux.el (dired-compress-file):
* lisp/dired-x.el (dired-make-relative-symlink):
* lisp/dired.el (dired-glob-regexp):
* lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand):
* lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list):
* lisp/emacs-lisp/warnings.el (display-warning):
* lisp/emulation/viper-ex.el (viper-ex-read-file-name)
(ex-print-display-lines):
* lisp/env.el (read-envvar-name, setenv):
* lisp/epa-mail.el (epa-mail-encrypt):
* lisp/epg.el (epg--start):
* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input):
* lisp/eshell/em-glob.el (eshell-glob-entries):
* lisp/eshell/esh-proc.el (eshell-needs-pipe-p):
* lisp/eshell/esh-util.el (eshell-convert):
* lisp/eshell/esh-var.el (eshell-envvar-names):
* lisp/faces.el (x-resolve-font-name):
* lisp/ffap.el (ffap-file-at-point):
* lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern):
* lisp/forms.el (forms--update):
* lisp/frameset.el (frameset-filter-unshelve-param):
* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc)
(gnus-inews-insert-gcc):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output)
(gnus-search--complete-key-data):
* lisp/gnus/gnus-spec.el (gnus-parse-simple-format):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-extract-address-components)
(gnus-newsgroup-directory-form):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-view):
* lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name):
* lisp/gnus/message.el (message-check-news-header-syntax)
(message-make-message-id, message-user-mail-address)
(message-make-fqdn, message-get-reply-headers, message-followup):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nnheader.el (nnheader-insert):
* lisp/gnus/nnimap.el (nnimap-process-quirk)
(nnimap-imap-ranges-to-gnus-ranges):
* lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix):
* lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path):
* lisp/gnus/nnrss.el (nnrss-match-macro):
* lisp/gnus/nntp.el (nntp-find-group-and-number):
* lisp/help-fns.el (help--symbol-completion-table-affixation):
* lisp/help.el (help-function-arglist):
* lisp/hippie-exp.el (he-concat-directory-file-name):
* lisp/htmlfontify.el (hfy-relstub):
* lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word)
(ido-exhibit):
* lisp/image/image-converter.el (image-convert-p):
* lisp/info-xref.el (info-xref-docstrings):
* lisp/info.el (Info-toc-build, Info-follow-reference)
(Info-backward-node, Info-finder-find-node)
(Info-speedbar-expand-node):
* lisp/international/mule-diag.el (print-fontset-element):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/linum.el (linum-after-change):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rmailkwd.el (rmail-set-label):
* lisp/mail/rmailsum.el (rmail-header-summary):
* lisp/mail/smtpmail.el (smtpmail-maybe-append-domain)
(smtpmail-user-mail-address):
* lisp/mail/uce.el (uce-reply-to-uce):
* lisp/man.el (Man-default-man-entry):
* lisp/mh-e/mh-alias.el (mh-alias-gecos-name)
(mh-alias-minibuffer-confirm-address):
* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject):
* lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output):
* lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter)
(mh-folder-completion-function):
* lisp/minibuffer.el (completion--make-envvar-table)
(completion-file-name-table, completion-flex-try-completion)
(completion-flex-all-completions):
* lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p)
(mpc-constraints-tag-lookup):
* lisp/net/ange-ftp.el (ange-ftp-send-cmd)
(ange-ftp-allow-child-lookup):
* lisp/net/mailcap.el (mailcap-mime-types):
* lisp/net/mairix.el (mairix-search-thread-this-article):
* lisp/net/pop3.el (pop3-open-server):
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
* lisp/net/socks.el (socks-filter):
* lisp/nxml/nxml-outln.el (nxml-highlighted-qname):
* lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1):
* lisp/obsolete/complete.el (partial-completion-mode)
(PC-do-completion):
* lisp/obsolete/longlines.el (longlines-encode-string):
* lisp/obsolete/nnir.el (nnir-compose-result):
* lisp/obsolete/terminal.el (te-quote-arg-for-sh):
* lisp/obsolete/tpu-edt.el (tpu-check-search-case):
* lisp/obsolete/url-ns.el (isPlainHostName):
* lisp/pcmpl-unix.el (pcomplete/scp):
* lisp/play/dunnet.el (dun-listify-string2, dun-get-path)
(dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface):
* lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment):
* lisp/progmodes/gdb-mi.el (gdb-var-delete)
(gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result):
* lisp/progmodes/gud.el (gud-find-expr):
* lisp/progmodes/idlw-help.el (idlwave-do-context-help1):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode)
(idlwave-shell-filter-hidden-output, idlwave-shell-filter):
* lisp/progmodes/idlwave.el (idlwave-skip-label-or-case)
(idlwave-routine-info):
* lisp/progmodes/octave.el (inferior-octave-completion-at-point):
* lisp/progmodes/sh-script.el (sh-add-completer):
* lisp/progmodes/sql.el (defun):
* lisp/progmodes/xscheme.el (xscheme-process-filter):
* lisp/replace.el (query-replace-compile-replacement)
(map-query-replace-regexp):
* lisp/shell.el (shell--command-completion-data)
(shell-environment-variable-completion):
* lisp/simple.el (display-message-or-buffer):
* lisp/speedbar.el (speedbar-dired, speedbar-tag-file)
(speedbar-tag-expand):
* lisp/subr.el (split-string-and-unquote):
* lisp/tar-mode.el (tar-extract):
* lisp/term.el (term-command-hook, serial-read-name):
* lisp/textmodes/bibtex.el (bibtex-print-help-message):
* lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter)
(ispell-parse-output, ispell-buffer-local-parsing):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-parse.el (reftex-notice-new):
* lisp/textmodes/reftex-ref.el (reftex-show-entry):
* lisp/textmodes/reftex.el (reftex-compile-variables):
* lisp/textmodes/tex-mode.el (tex-send-command)
(tex-start-tex, tex-append):
* lisp/thingatpt.el (thing-at-point-url-at-point):
* lisp/tmm.el (tmm-add-one-shortcut):
* lisp/transient.el (transient-format-key):
* lisp/url/url-auth.el (url-basic-auth)
(url-digest-auth-directory-id-assoc):
* lisp/url/url-news.el (url-news):
* lisp/url/url-util.el (url-parse-query-string):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/wid-browse.el (widget-browse-sexp):
* lisp/woman.el (woman-parse-colon-path, woman-mini-help)
(WoMan-getpage-in-background, woman-negative-vertical-space):
* lisp/xml.el:
* test/lisp/emacs-lisp/check-declare-tests.el
(check-declare-tests-warn):
* test/lisp/files-tests.el
(files-tests-file-name-non-special-dired-compress-handler):
* test/lisp/net/network-stream-tests.el (server-process-filter):
* test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode):
Use `string-search` instead of `string-match` and `string-match-p`.
2021-08-09 11:35:56 +02:00
Mattias Engdegård
051434fdef Use string-replace instead of replace-regexp-in-string
`string-replace` is easier to understand, less error-prone, much
faster, and results in shorter Lisp and byte code.  Use it where
applicable and obviously safe (erring on the conservative side).

* admin/authors.el (authors-scan-change-log):
* lisp/autoinsert.el (auto-insert-alist):
* lisp/calc/calc-prog.el (calc-edit-macro-combine-alg-ent)
(calc-edit-macro-combine-ext-command)
(calc-edit-macro-combine-var-name):
* lisp/calc/calc-units.el (math-make-unit-string):
* lisp/calendar/cal-html.el (cal-html-comment):
* lisp/calendar/cal-tex.el (cal-tex-comment):
* lisp/calendar/icalendar.el (icalendar--convert-string-for-export)
(icalendar--convert-string-for-import):
* lisp/calendar/iso8601.el (iso8601--concat-regexps)
(iso8601--full-time-match, iso8601--combined-match):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/todo-mode.el (todo-filter-items-filename):
* lisp/cedet/cedet-files.el (cedet-directory-name-to-file-name)
(cedet-file-name-to-directory-name):
* lisp/comint.el (comint-watch-for-password-prompt):
* lisp/dired-aux.el (dired-do-chmod):
* lisp/dired-x.el (dired-man):
* lisp/dired.el (dired-insert-directory, dired-goto-file-1):
* lisp/emacs-lisp/comp.el (comp-c-func-name):
* lisp/emacs-lisp/re-builder.el (reb-copy):
* lisp/erc/erc-dcc.el (erc-dcc-unquote-filename):
* lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy)
(erc-update-mode-line-buffer, erc-message-english-PART):
* lisp/files.el (make-backup-file-name-1, files--transform-file-name)
(read-file-modes):
* lisp/fringe.el (fringe-mode):
* lisp/gnus/gnus-art.el (gnus-button-handle-info-url):
* lisp/gnus/gnus-group.el (gnus-group-completing-read):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical):
* lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy):
* lisp/gnus/gnus-search.el (gnus-search-query-parse-date)
(gnus-search-transform-expression, gnus-search-run-search):
* lisp/gnus/gnus-start.el (gnus-dribble-enter):
* lisp/gnus/gnus-sum.el (gnus-summary-refer-article):
* lisp/gnus/gnus-util.el (gnus-mode-string-quote):
* lisp/gnus/message.el (message-put-addresses-in-ecomplete)
(message-parse-mailto-url, message-mailto-1):
* lisp/gnus/mml-sec.el (mml-secure-epg-sign):
* lisp/gnus/mml-smime.el (mml-smime-epg-verify):
* lisp/gnus/mml2015.el (mml2015-epg-verify):
* lisp/gnus/nnmaildir.el (nnmaildir--system-name)
(nnmaildir-request-list, nnmaildir-retrieve-groups)
(nnmaildir-request-group, nnmaildir-retrieve-headers):
* lisp/gnus/nnrss.el (nnrss-node-text):
* lisp/gnus/spam-report.el (spam-report-gmane-internal)
(spam-report-user-mail-address):
* lisp/ibuffer.el (name):
* lisp/image-dired.el (image-dired-pngnq-thumb)
(image-dired-pngcrush-thumb, image-dired-optipng-thumb)
(image-dired-create-thumb-1):
* lisp/info.el (Info-set-mode-line):
* lisp/international/mule-cmds.el (describe-language-environment):
* lisp/mail/rfc2231.el (rfc2231-parse-string):
* lisp/mail/rfc2368.el (rfc2368-parse-mailto-url):
* lisp/mail/rmail.el (rmail-insert-inbox-text)
(rmail-simplified-subject-regexp):
* lisp/mail/rmailout.el (rmail-output-body-to-file):
* lisp/mail/undigest.el (rmail-digest-rfc1153):
* lisp/man.el (Man-default-man-entry):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc--debug):
* lisp/net/browse-url.el (browse-url-mail):
* lisp/net/eww.el (eww-update-header-line-format):
* lisp/net/newst-backend.el (newsticker-save-item):
* lisp/net/rcirc.el (rcirc-sentinel):
* lisp/net/soap-client.el (soap-decode-date-time):
* lisp/nxml/rng-cmpct.el (rng-c-literal-2-re):
* lisp/nxml/xmltok.el (let*):
* lisp/obsolete/nnir.el (nnir-run-swish-e, nnir-run-hyrex)
(nnir-run-find-grep):
* lisp/play/dunnet.el (dun-doassign):
* lisp/play/handwrite.el (handwrite):
* lisp/proced.el (proced-format-args):
* lisp/profiler.el (profiler-report-header-line-format):
* lisp/progmodes/gdb-mi.el (gdb-mi-quote):
* lisp/progmodes/make-mode.el (makefile-bsdmake-rule-action-regex)
(makefile-make-font-lock-keywords):
* lisp/progmodes/prolog.el (prolog-guess-fill-prefix):
* lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes):
* lisp/progmodes/sql.el (sql-remove-tabs-filter, sql-str-literal):
* lisp/progmodes/which-func.el (which-func-current):
* lisp/replace.el (query-replace-read-from)
(occur-engine, replace-quote):
* lisp/select.el (xselect--encode-string):
* lisp/ses.el (ses-export-tab):
* lisp/subr.el (shell-quote-argument):
* lisp/term/pc-win.el (msdos-show-help):
* lisp/term/w32-win.el (w32--set-selection):
* lisp/term/xterm.el (gui-backend-set-selection):
* lisp/textmodes/picture.el (picture-tab-search):
* lisp/thumbs.el (thumbs-call-setroot-command):
* lisp/tooltip.el (tooltip-show-help-non-mode):
* lisp/transient.el (transient-format-key):
* lisp/url/url-mailto.el (url-mailto):
* lisp/vc/log-edit.el (log-edit-changelog-ours-p):
* lisp/vc/vc-bzr.el (vc-bzr-status):
* lisp/vc/vc-hg.el (vc-hg--glob-to-pcre):
* lisp/vc/vc-svn.el (vc-svn-after-dir-status):
* lisp/xdg.el (xdg-desktop-strings):
* test/lisp/electric-tests.el (defun):
* test/lisp/term-tests.el (term-simple-lines):
* test/lisp/time-stamp-tests.el (formatz-mod-del-colons):
* test/lisp/wdired-tests.el (wdired-test-bug32173-01)
(wdired-test-unfinished-edit-01):
* test/src/json-tests.el (json-parse-with-custom-null-and-false-objects):
Use `string-replace` instead of `replace-regexp-in-string`.
2021-08-08 19:25:26 +02:00
Amin Bandali
7a13ddfda0
Update a few more IRC-related references to point to Libera.Chat 2021-07-04 01:18:19 -04:00
Amin Bandali
8d957f2dd8
Merge from origin/emacs-27
348b2aed0c Update IRC-related references to point to Libera.Chat
b0e725e2fe Fix typo in c-macro-expand docstring

# Conflicts:
#	doc/misc/erc.texi
#	doc/misc/gnus-faq.texi
#	doc/misc/rcirc.texi
#	etc/NEWS
#	lisp/erc/erc-services.el
#	lisp/erc/erc.el
#	lisp/ldefs-boot.el
#	lisp/net/rcirc.el
2021-07-04 00:14:47 -04:00
Amin Bandali
348b2aed0c
Update IRC-related references to point to Libera.Chat
Per GNU and FSF's announcements [0, 1] of moving official IRC channels
to the Libera.Chat IRC network, as well as several Emacs-related
channels following suit [2], update IRC-related references to reflect
the migration.

[0]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00005.html
[1]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00007.html
[2]: https://lists.gnu.org/archive/html/info-gnu-emacs/2021-06/msg00000.html
2021-07-03 23:39:18 -04:00
Stefan Kangas
19ef864084 Fix an example in ERC docs
* doc/misc/erc.texi (Connecting):
* lisp/erc/erc.el (erc, erc-tls): Fix example to use J. Random Hacker
instead of Harry S. Truman.
2021-06-08 02:00:29 +02:00
Amin Bandali
c38b4a9bef
Tweak documentation relating to 'erc-tls'
* doc/misc/erc.texi (Connecting): Add a reference to the auth manual.
* etc/NEWS: Remove the verbose, detailed example of client certificate
specification and refer to the ERC manual instead.
* lisp/erc/erc.el (erc-tls): Fix leftover path example in docstring.
2021-05-10 21:36:33 -04:00
Amin Bandali
6a03e4cc4f
* lisp/erc/erc.el: Add past maintainer Michael Olson to Contributors. 2021-04-26 23:58:05 -04:00
Amin Bandali
344f769491
Add support for using a TLS client certificate with 'erc-tls' (bug#47788)
* lisp/erc/erc-backend.el (erc-session-client-certificate): New
buffer-local variable storing the TLS client certificate used for the
current connection.
(erc-open-network-stream): Use open-network-stream instead of
make-network-process, and pass any additional arguments to it.
(erc-server-connect): Add an optional client-certificate argument
that if present is passed with the :client-certificate keyword as part
of the arguments to erc-server-connect-function.
* lisp/erc/erc.el (erc-open): Add new optional client-certificate
argument, set it as erc-session-client-certificate, and pass it along
to erc-server-connect.
(erc): Clarify documentation string with respect to the full-name
argument.
(erc-tls): Add new client-certificate keyword argument and pass it in
the direct call to erc-open (instead of going through erc).
(erc-open-tls-stream): Pass any additional arguments (such as
:client-certificate) to open-network-stream.  Also allow overriding
:nowait if desired.

* doc/misc/erc.texi: Add documentation for erc-tls, including the new
:client-certificate argument.

* etc/NEWS: Announce the change.
2021-04-22 20:22:38 -04:00
Stefan Monnier
c45bfd3c4a * lisp/**/*.el: Avoid positional args to define-minor-mode
Back in Emacs-21.1, `define-minor-mode` grew keywords arguments to
replace its old positional arguments.  Let's make sure we don't use
the old-style any more.

* lisp/org/ox-beamer.el (org-beamer-mode-map): Move initialization
into declaration.
(org-beamer-mode):
* lisp/textmodes/tildify.el (tildify-mode):
* lisp/textmodes/sgml-mode.el (html-autoview-mode):
* lisp/textmodes/rst.el (rst-minor-mode):
* lisp/textmodes/remember.el (remember-notes-mode):
* lisp/textmodes/ispell.el (ispell-minor-mode):
* lisp/tar-mode.el (tar-subfile-mode):
* lisp/strokes.el (strokes-mode):
* lisp/so-long.el (so-long-minor-mode):
* lisp/shell.el (shell-dirtrack-mode):
* lisp/scroll-all.el (scroll-all-mode):
* lisp/ruler-mode.el (ruler-mode):
* lisp/rect.el (rectangle-mark-mode):
* lisp/progmodes/sh-script.el (sh-electric-here-document-mode):
* lisp/outline.el (outline-minor-mode):
* lisp/org/org.el (org-cdlatex-mode):
* lisp/org/org-table.el (org-table-header-line-mode)
(org-table-follow-field-mode, orgtbl-mode):
* lisp/org/org-src.el (org-src-mode):
* lisp/org/org-list.el (org-list-checkbox-radio-mode):
* lisp/org/org-indent.el (org-indent-mode):
* lisp/org/org-capture.el (org-capture-mode):
* lisp/obsolete/pc-select.el (pc-selection-mode):
* lisp/obsolete/iswitchb.el (iswitchb-mode):
* lisp/net/rcirc.el (rcirc-omit-mode, rcirc-multiline-minor-mode)
(rcirc-track-minor-mode):
* lisp/net/goto-addr.el (goto-address-mode, goto-address-prog-mode):
* lisp/image-mode.el (image-minor-mode):
* lisp/ibuf-ext.el (ibuffer-auto-mode):
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode):
* lisp/font-core.el (font-lock-mode):
* lisp/erc/erc.el (define-erc-module):
* lisp/erc/erc-track.el (erc-track-minor-mode):
* lisp/erc/erc-fill.el (erc-fill-mode):
* lisp/epa-mail.el (epa-mail-mode):
* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode):
* lisp/dirtrack.el (dirtrack-mode, dirtrack-debug-mode):
* lisp/dired-aux.el (dired-isearch-filenames-mode):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/decorate/mode.el (semantic-decoration-mode):
* lisp/autoarg.el (autoarg-mode, autoarg-kp-mode):
* lisp/vc/pcvs.el (cvs-minor-mode):
Avoid old-style positional args to `define-minor-mode`.
2021-04-11 23:47:14 -04:00
Stefan Kangas
3492cc36f2 Remove redundant #' before lambda in {calendar,erc,mh-e}/*.el
* lisp/calendar/icalendar.el (icalendar--get-most-recent-observance):
* lisp/calendar/parse-time.el (parse-time-rules):
* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC):
* lisp/erc/erc-track.el (erc-modified-channels-display):
* lisp/erc/erc.el (erc-toggle-debug-irc-protocol)
(erc-cmd-IGNORE, erc-cmd-JOIN, erc-default-server-handler)
(erc-banlist-update):
* lisp/mh-e/mh-search.el (mh-search, mh-mairix-convert-to-sop*)
(mh-index-create-sequences):
* lisp/mh-e/mh-thread.el (mh-toggle-threads, mh-thread-generate)
(mh-thread-prune-containers, mh-thread-sort-containers):
* lisp/mh-e/mh-utils.el (mh-sub-folders): Remove redundant #' before
lambda.
2021-04-09 00:04:13 +02:00
Stefan Kangas
49cbf2392b Delete empty "History" sections
* lisp/bs.el:
* lisp/calendar/timeclock.el:
* lisp/cedet/semantic/bovine/grammar.el:
* lisp/cedet/semantic/grammar.el:
* lisp/cedet/semantic/wisent.el:
* lisp/cedet/semantic/wisent/comp.el:
* lisp/cedet/semantic/wisent/java-tags.el:
* lisp/cedet/semantic/wisent/wisent.el:
* lisp/erc/erc.el:
* lisp/net/newst-treeview.el:
* lisp/recentf.el:
* lisp/ruler-mode.el:
* lisp/textmodes/remember.el:
* lisp/thumbs.el:
* lisp/tree-widget.el:
* lisp/vc/vc-hg.el: Delete empty "History" sections.

* lisp/cedet/semantic/grammar.el
(semantic-grammar-header-template): Don't add "History" section to
generated file.
2021-03-30 15:50:26 +02:00
Stefan Kangas
990e748cd0 Prefer https and fix broken links in ERC
* lisp/erc/erc-button.el (erc-button-rfc-url)
(erc-button-search-url): Prefer https.
* lisp/erc/erc-capab.el:
* lisp/erc/erc.el (erc-cmd-MODE): Fix broken links.
2021-03-20 10:00:28 +01:00
Stefan Monnier
f463633f00 lisp/erc: Use lexical-binding
Also remove various redundant `:group` arguments.

* lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare`
after the docstring.

* lisp/erc/erc-capab.el: Use lexical-binding.
(erc-capab-identify-activate): Simplify with `member`.

* lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition,
which refers to it.
(erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`.

* lisp/erc/erc-imenu.el: Use lexical-binding.
(erc-create-imenu-index): Remove unused var `prev-pos`.

* lisp/erc/erc-match.el: Use lexical-binding.
(erc-match-message): Remove unused var `old-pt`.
(erc-match-message): Strength-reduce `eval` to `symbol-value`.

* lisp/erc/erc-page.el: Use lexical-binding.
(erc-page): Move Custom group before `erg-page-mode` which refers to it.

* lisp/erc/erc-replace.el: Use lexical-binding.
(erc-replace-insert): Use `functionp`.

* lisp/erc/erc-status-sidebar.el: Use lexical-binding.
(erc-status-sidebar-open): Remove unused var `sidebar-window`.

* lisp/erc/erc.el: Fix header to use the customary 3 semi-colons.
(erc-fill-column): Declare variable.

* lisp/erc/erc-autoaway.el: Use lexical-binding.
* lisp/erc/erc-ezbounce.el: Use lexical-binding.
* lisp/erc/erc-fill.el: Use lexical-binding.
* lisp/erc/erc-goodies.el: Use lexical-binding.
* lisp/erc/erc-ibuffer.el: Use lexical-binding.
* lisp/erc/erc-identd.el: Use lexical-binding.
* lisp/erc/erc-join.el: Use lexical-binding.
* lisp/erc/erc-lang.el: Use lexical-binding.
* lisp/erc/erc-log.el: Use lexical-binding.
* lisp/erc/erc-menu.el: Use lexical-binding.
* lisp/erc/erc-netsplit.el: Use lexical-binding.
* lisp/erc/erc-networks.el: Use lexical-binding.
* lisp/erc/erc-pcomplete.el: Use lexical-binding.
* lisp/erc/erc-ring.el: Use lexical-binding.
* lisp/erc/erc-speedbar.el: Use lexical-binding.
* lisp/erc/erc-spelling.el: Use lexical-binding.
* lisp/erc/erc-truncate.el: Use lexical-binding.
* lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
Stefan Monnier
fb779e9857 * lisp/erc/erc.el: Fix problem pointed out by compiler warning
[ Also use `read-string` instead of `read-from-minibuffer`.  ]

(erc-part-from-channel): Comment out improbable
reference to the formal argument from within the interactive spec.
2021-03-07 19:06:06 -05:00
Stefan Kangas
856a0a913a Remove additional items obsolete since Emacs 22/23
* lisp/speedbar.el (speedbar-update-speed)
(speedbar-navigating-speed): Remove variables obsolete since Emacs 23.
(speedbar-dir-follow, speedbar-directory-buttons-follow): Don't use
above removed variables.

* lisp/erc/erc.el (erc-announced-server-name, erc-process)
(erc-default-coding-system, erc-send-command): Remove variables and
functions obsolete since Emacs 22.

; * etc/NEWS: List removed items.
2021-03-07 06:41:33 +01:00
Stefan Kangas
97f8ab359e Remove some references to Emacs 21
* lisp/erc/erc-track.el (erc-track-position-in-mode-line):
* lisp/erc/erc.el (erc-header-line-format):
* lisp/ibuffer.el (ibuffer-mode):
* lisp/ruler-mode.el: Remove some references to Emacs 21.
2021-03-07 05:51:39 +01:00
Lars Ingebrigtsen
7ac99eeefe Change defcustom types of two non-standard hooks
* lisp/erc/erc.el (erc-before-connect, erc-after-connect): Change
type from 'hook to 'function (bug#34657).
2021-02-27 05:43:06 +01:00
Stefan Kangas
574f71b739 Remove Emacs 20 compat code for header-line-format
* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-mode):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/ibuffer.el (ibuffer-use-header-line): Remove Emacs 20 compat
code; header-line-format is always defined starting with Emacs 21.
2021-02-05 01:33:25 +01:00
Stefan Kangas
fc66ec3322 Prefer defvar-local in erc
* lisp/erc/erc-backend.el (erc-server-current-nick)
(erc-server-process, erc-session-server, erc-session-connector)
(erc-session-port, erc-server-announced-name)
(erc-server-version, erc-server-parameters)
(erc-server-connected, erc-server-reconnect-count)
(erc-server-quitting, erc-server-reconnecting)
(erc-server-timed-out, erc-server-banned)
(erc-server-error-occurred, erc-server-lines-sent)
(erc-server-last-peers, erc-server-last-sent-time)
(erc-server-last-ping-time, erc-server-last-received-time)
(erc-server-lag, erc-server-filter-data, erc-server-duplicates)
(erc-server-processing-p, erc-server-flood-last-message)
(erc-server-flood-queue, erc-server-flood-timer)
(erc-server-ping-handler):
* lisp/erc/erc-capab.el (erc-capab-identify-activated)
(erc-capab-identify-sent):
* lisp/erc/erc-dcc.el (erc-dcc-byte-count, erc-dcc-entry-data)
(erc-dcc-file-name):
* lisp/erc/erc-ezbounce.el (erc-ezb-session-list):
* lisp/erc/erc-join.el (erc--autojoin-timer):
* lisp/erc/erc-netsplit.el (erc-netsplit-list):
* lisp/erc/erc-networks.el (erc-network):
* lisp/erc/erc-notify.el (erc-last-ison, erc-last-ison-time):
* lisp/erc/erc-ring.el (erc-input-ring, erc-input-ring-index):
* lisp/erc/erc-stamp.el (erc-timestamp-last-inserted)
(erc-timestamp-last-inserted-left)
(erc-timestamp-last-inserted-right):
* lisp/erc/erc.el (erc-session-password, erc-channel-users)
(erc-server-users, erc-channel-topic, erc-channel-modes)
(erc-insert-marker, erc-input-marker, erc-last-saved-position)
(erc-dbuf, erc-active-buffer, erc-default-recipients)
(erc-session-user-full-name, erc-channel-user-limit)
(erc-channel-key, erc-invitation, erc-channel-list)
(erc-bad-nick, erc-logged-in, erc-default-nicks)
(erc-nick-change-attempt-count, erc-send-input-line-function)
(erc-channel-new-member-names, erc-channel-banlist)
(erc-current-message-catalog): Prefer defvar-local.
2021-01-31 04:44:30 +01:00
Stefan Monnier
42c3f7a134 * lisp/erc/erc.el (erc-process-input-line): Undo confused last change 2021-01-04 15:25:29 -05:00
Stefan Monnier
0c599ee2e2 * lisp/erc/erc.el: Use run-hook-with-args for erc-pre-send-functions
(erc-process-input-line): A function can be `listp`.
(erc-send-input): Use `run-hook-with-args` for `erc-pre-send-functions`.
(erc-display-command): Comment out, unused.
2021-01-04 00:21:02 -05:00
Paul Eggert
8bc552ffa5 Merge from origin/emacs-27
74a77ef299 Improve documentation of 'network-lookup-address-info'
c6d5555646 Display messages sent using ERC's /say
c156723769 Fix Rmail summary display when From: header is malformed
2021-01-01 01:14:58 -08:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
8c1fe1e5ef Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2021-01-01 00:32:32 -08:00
Amin Bandali
c6d5555646
Display messages sent using ERC's /say
* lisp/erc/erc.el (erc-cmd-SAY): Call `erc-display-msg' to display the
user's message in the buffer, just like other [non-command] messages.

https://lists.gnu.org/r/help-gnu-emacs/2020-12/msg00066.html
2020-12-28 16:45:41 -05:00
Stefan Kangas
b3d315efc2 Prefer setq-local in erc
* lisp/erc/erc-goodies.el (erc-imenu-setup):
* lisp/erc/erc-list.el (erc-list-install-322-handler, erc-cmd-LIST):
* lisp/erc/erc-pcomplete.el (pcomplete-erc-setup):
* lisp/erc/erc.el (erc-mode, erc-update-mode-line-buffer):
Prefer setq-local.
2020-12-04 11:14:26 +01:00
Stefan Kangas
ea218f424a Don't set XEmacs only properties start-open and end-open
* lisp/epa.el (epa-sign-region, epa-encrypt-region):
* lisp/erc/erc.el (erc-display-prompt):
* lisp/gnus/message.el (message-forward-make-body-mime):
* lisp/net/eudc-bob.el (eudc-bob-display-jpeg)
(eudc-bob-display-audio, eudc-bob-display-generic-binary):
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Don't set XEmacs
only properties start-open and end-open.
2020-11-20 16:43:57 +01:00
Stefan Kangas
51b9acbecc Assume font-lock is provided; it's preloaded since 22.1
* lisp/cedet/semantic/format.el (semantic--format-colorize-text):
* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
* lisp/net/dig.el (dig-mode):
* lisp/progmodes/cperl-mode.el (cperl-pod-here-fontify):
* lisp/progmodes/idlw-help.el (idlwave-help-fontify):
* lisp/progmodes/idlwave.el (idlwave-completion-fontify-classes):
Don't check for feature 'font-lock; it has been preloaded since 22.1.
* lisp/cedet/semantic/format.el (font-lock):
* lisp/epa.el (font-lock):
* lisp/erc/erc.el (font-lock):
* lisp/generic-x.el (font-lock):
* lisp/net/sieve-mode.el (font-lock):
* lisp/progmodes/prolog.el (font-lock):
* lisp/textmodes/rst.el (font-lock): Remove unnecessary require.
2020-11-19 04:37:37 +01:00
Amin Bandali
694c82ab1a
Replace irc.freenode.net with chat.freenode.net
chat.freenode.net has been the preferred address for connecting to the
freenode IRC network for years now.  Replace the occurrences of
irc.freenode.net with chat.freenode.net.
2020-10-31 14:09:29 -04:00
Lars Ingebrigtsen
d5cb3cb9a4 Make erc expand the final abbrev
* lisp/erc/erc.el (erc-send-current-line): Expand abbrevs at the
end of lines (bug#42854).
2020-10-16 17:36:26 +02:00
Glenn Morris
726eb835dd Merge from origin/emacs-27
78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
#	lisp/allout.el
#	lisp/progmodes/ebrowse.el
2020-10-02 09:38:24 -07:00
Stefan Kangas
78eacf31e8 ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
Lars Ingebrigtsen
660d13bd7b Use format-prompt in calls to completing-read with a default value
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/tab-bar.el (tab-bar-switch-to-tab):
* lisp/profiler.el (profiler-start):
* lisp/frame.el (set-frame-font):
* lisp/erc/erc.el (erc-join-channel):
* lisp/emacs-lock.el (emacs-lock--set-mode):
* lisp/emacs-lisp/elp.el (elp-set-master):
* lisp/emacs-lisp/checkdoc.el ()
(checkdoc-this-string-valid-engine):
* lisp/calendar/todo-mode.el (todo-find-filtered-items-file):
* lisp/calendar/calendar.el (calendar-set-date-style): Use
`format-prompt' in calls to completing-read that has a default
value, but didn't mention that in the prompt.
2020-09-06 20:35:11 +02:00
Lars Ingebrigtsen
87ded4c96d Remove some compat code from erc
* lisp/erc/erc.el (erc-mode): next-line-add-newlines is always
defined, so remove the check.
2020-08-19 11:32:56 +02:00
Stefan Kangas
32cb84974f
Make erc-compat.el obsolete
* lisp/erc/erc-compat.el: Move from here...
* lisp/obsolete/erc-compat.el: ...to here.
* lisp/erc/erc-backend.el:
* lisp/erc/erc-pcomplete.el:
* lisp/erc/erc-stamp.el:
* lisp/erc/erc-track.el:
* lisp/erc/erc.el: Don't require 'erc-compat'.

* lisp/erc/erc-backend.el (erc-decode-string-from-target):
* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC):
* lisp/erc/erc-fill.el (erc-fill-mode):
* lisp/erc/erc-goodies.el (erc-controls-interpret):
* lisp/erc/erc-log.el (erc-log-setup-logging):
* lisp/erc/erc-notify.el (erc-notify-QUIT):
* lisp/erc/erc.el (erc-startup-file-list, define-erc-module)
(erc-canonicalize-server-name, erc-cmd-SV, erc-banlist-update)
(erc-group-list, erc-seconds-to-string): Adjust callers.
* lisp/erc/erc.el: Require cl-lib and format-spec.

* etc/NEWS: Add entry announcing erc-compat.el being marked as
obsolete.
2020-08-13 19:31:54 -04:00
Mingde (Matthew) Zeng
88567ca8ec Fix erc-reuse-buffers behavior
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fixes behavior 1,
also determines if the '#channel/server' buffer already exists
and will reuse that buffer when joining on the same
server. Additionally when creating a new buffer with
'#channel/serverB', the existing buffer '#channel' on 'severA' will be
renamed to '#channel/serverA' for the sake of consistency (bug#40121).

* lisp/erc/erc-join.el (erc-autojoin-channels): The logic is
simplified ensuring that when autojoining channels specified in
erc-autojoin-channels-alist, if there exists an erc buffer with the
same channel name but a different server, it will create a new buffer
to join the channel. The current logic is very weak that will skip
joining same channel on different servers altogether.

By the definition of erc-reuse-buffers, if non-nil it should create a
new buffer when joining channels with same names on different
servers. The current behavior of erc-reuse-buffers is:
1. when non-nil, it will always reuse the same channel buffer,
resulting in server A's channel gets reconnected to the channel with
the same name of server B.
2. when nil, the buffer-name of the joined channel is
'#channel/server'. However if one tries to '/join #channel' from the
server buffer, it creates a new empty buffer with buffer-name
'#channel', instead of opening the already-joined channel buffer.
2020-08-12 13:09:40 +02:00
Stefan Kangas
7ed61d6193 Make more erc function aliases obsolete
* lisp/erc/erc-compat.el (erc-propertize, erc-view-mode-enter)
(erc-function-arglist, erc-delete-dups)
(erc-replace-regexp-in-string): Make these aliases obsolete.

* lisp/erc/erc-capab.el (erc-capab-identify-add-prefix)
(erc-capab-identify-remove/set-identified-flag):
* lisp/erc/erc-dcc.el (erc-dcc-chat-parse-output)
(erc-dcc-unquote-filename, pcomplete/erc-mode/DCC):
* lisp/erc/erc-list.el (erc-list-menu-mode, erc-list-button)
(erc-list-make-string):
* lisp/erc/erc-log.el (erc-log-standardize-name):
* lisp/erc/erc-match.el (erc-log-matches-make-buffer):
* lisp/erc/erc-networks.el (erc-server-select):
* lisp/erc/erc.el (erc-message-english-PART)
(erc-update-mode-line-buffer, erc-format-my-nick)
(erc-format-@nick, erc-get-user-mode-prefix, erc-display-prompt)
(erc-part-reason-zippy, erc-quit-reason-zippy, erc-get-arglist)
(erc-toggle-debug-irc-protocol, erc-log-irc-protocol)
(erc-migrate-modules): Adjust callers.
2020-08-07 14:02:01 +02:00
Kevin Brubeck Unhammer
c72b734c91 Further fix for erc-generate-new-buffer-name
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix buffer name
generation when there's two networks on the same
server:port (bug#40121).
2020-08-05 11:13:51 +02:00
Lars Ingebrigtsen
a59296d998 Make the erc /ignore command prompt for a timeout
* lisp/erc/erc.el (erc--unignore-user): Separate into own function
(bug#40137).
(erc-cmd-IGNORE): Ask if the user wants a timeout.
(erc--read-time-period): New function.
2020-08-05 10:27:40 +02:00
Lars Ingebrigtsen
6f94c2405f Fix erc bug when there's two channels with the same name
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix logic when
there's two channels with the same name from two different servers
(bug#40121).
2020-08-02 09:43:41 +02:00
Philip K
bcf486c604 Make the erc-header-line default to header-line
* lisp/erc/erc.el (erc-header-line): Inherit from header-line (the
old values were very similar in light mode, but very different
in dark mode) (bug#41095).
2020-07-29 06:54:05 +02:00
Basil L. Contovounesios
0185d76e74 Fix and extend format-spec (bug#41758)
* lisp/format-spec.el: Use lexical-binding.  Remove dependence on
subr-x.el.
(format-spec-make): Clarify docstring.
(format-spec--parse-modifiers): Rename to...
(format-spec--parse-flags): ...this and simplify.  In particular,
don't bother parsing :space-pad which is redundant and unused.
(format-spec--pad): Remove, replacing with...
(format-spec--do-flags): ...this new helper function which performs
more of format-spec's supported text manipulation.
(format-spec): Autoload.  Allow optional argument to take on special
values 'ignore' and 'delete' for more control over what happens when
a replacement for a format specification isn't provided.  Bring back
proper support for a precision modifier similar to that of 'format'.

* lisp/battery.el (battery-format): Rewrite in terms of format-spec.
(battery-echo-area-format, battery-mode-line-format): Mention
support of format-spec syntax in docstrings.

* doc/lispref/strings.texi (Custom Format Strings):
* etc/NEWS: Document and announce these changes.

* lisp/dired-aux.el (dired-do-compress-to):
* lisp/erc/erc-match.el (erc-log-matches):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/gnus/gnus-sieve.el (gnus-sieve-update):
* lisp/gnus/gssapi.el (open-gssapi-stream):
* lisp/gnus/mail-source.el (mail-source-fetch-file)
(mail-source-fetch-directory, mail-source-fetch-pop)
(mail-source-fetch-imap):
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/image-dired.el:
* lisp/net/eww.el:
* lisp/net/imap.el (imap-kerberos4-open, imap-gssapi-open)
(imap-shell-open):
* lisp/net/network-stream.el (network-stream-open-shell):
* lisp/obsolete/tls.el (open-tls-stream):
* lisp/textmodes/tex-mode.el:
Remove extraneous loads and autoloads of format-spec now that it is
autoloaded and simplify its uses where possible.

* test/lisp/battery-tests.el (battery-format): Test new format-spec
support.
* test/lisp/format-spec-tests.el (test-format-spec): Rename to...
(format-spec) ...this, extending test cases.
(test-format-unknown): Rename to...
(format-spec-unknown): ...this, extending test cases.
(test-format-modifiers): Rename to...
(format-spec-flags): ...this.
(format-spec-make, format-spec-parse-flags, format-spec-do-flags)
(format-spec-do-flags-truncate, format-spec-do-flags-pad)
(format-spec-do-flags-chop, format-spec-do-flags-case): New tests.
2020-06-18 12:46:21 +01:00
Amin Bandali
9e832ba91b
* lisp/erc/erc.el: Add URL to the new ERC page on the Emacs site 2020-04-16 15:11:11 -04:00
Amin Bandali
38f7538d8f
New function erc-switch-to-buffer-other-window
* lisp/erc/erc.el (erc-switch-to-buffer): Factor out the buffer choice
implementation from here ...
(erc--switch-to-buffer): ... to here.
(erc-switch-to-buffer-other-window): New function, like
`erc-switch-to-buffer', but uses `switch-to-buffer-other-window'
instead, to open the buffer in another window.
2020-04-13 23:35:34 -04:00
Amin Bandali
1aa1529301
ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
Amin Bandali
5cb312b5b9
Update ERC mailing list address
* lisp/erc/erc.el (erc-official-location): As part of bringing ERC
under the Emacs umbrella, erc-discuss has been renamed to emacs-erc,
and will be *the* mailing list for discussions and announcements about
ERC going forward.  The other two lists, erc-announce and erc-commit,
are now retired.  For more details, see the announcement at
<https://lists.gnu.org/archive/html/emacs-erc/2020-03/msg00001.html>.
2020-03-06 13:03:12 -05:00
Amin Bandali
36a4068105
ERC: New maintainer.
* admin/MAINTAINERS: Add entries for Amin Bandali, new maintainer for
ERC, and interested in maintaining Eshell.
* lisp/erc/*: New maintainer.
2020-01-17 21:45:10 -05:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Lars Ingebrigtsen
925872ee7b Make ERC respect erc-channel-hide-list
* lisp/erc/erc.el (erc-hide-current-message-p): Make
erc-channel-hide-list work (bug#37879) by getting matching on the
channel name instead of the ERC client name.
2019-10-28 15:31:39 +01:00
Lars Ingebrigtsen
b7037662e1 Ensure that the prompt is kept on the final line
* lisp/erc/erc-goodies.el (erc-possibly-scroll-to-bottom): New
function.
(scrolltobottom): Add to erc-insert-done-hook.

* lisp/erc/erc.el (erc-insert-done-hook): New hook (bug#11697).
(erc-display-line-1): Use it.
2019-10-23 11:55:13 +02:00
Lars Ingebrigtsen
496202d00e Make erc-cmd-CLEAR do what its doc string says
* lisp/erc/erc.el (erc-cmd-CLEAR): Delete the buffer contents
instead of recentering (bug#31743).
2019-10-23 11:13:54 +02:00