summaryrefslogtreecommitdiff
path: root/lisp/erc
AgeCommit message (Collapse)Author
2026-05-21Merge from origin/emacs-31João Távora
655302cc212 Fix 'shr-outline-search' (bug#81073) 1754015c603 Improve auth-source-backend-parse 8f31ccbf823 Eglot: announce markdown support for completion docs aad170d1edf markdown-ts-mode: hide fence lines in view-mode (bug#81081) 133d1d591cb markdown-ts-mode: align default face definitions with mar... e0aeee2dc5f Fix markdown-ts-mode atx_heading face computation (bug#81... 997fc2cef77 Allow markdown-ts--run-command-in-code-block to ignore ou... 7d84e69a349 hideshow: Menu entry for 'hs-toggle-all' e90cafc2886 ; * doc/lispref/display.texi (Displaying Faces): Mention ... 520c5b7c71b ; * doc/lispref/text.texi (Special Properties): Fix last ... 8095fbef772 doc/lispref/text.texi: Add complement to commit f4a1c006569f 9436d92c5da Eglot: fix eglot--format-makrup when MARKUP just a string 9ba65aa9656 Fix missing margin face on display prop in erc-stamp
2026-05-18Fix missing margin face on display prop in erc-stampF. Jason Park
* lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Explicitly add face to right-hand stamp's `display' margin string. Commit d24b10ca "Introduce 'margin' face for window margin background" did away with the "fall-through" behavior in which a margin spec's string that lacks its own face property inherited whatever the associated `display' char happened to have. (Bug#80693) ;; The old language in "(elisp) Display Margins" said "if the ;; string to be displayed in the margin doesn't specify a face, its ;; face is determined using the same rules and priorities as it is ;; for strings displayed in the text area (see Displaying Faces)," ;; and that "if this results in undesirable 'leaking' of faces into ;; the margin, make sure the string has an explicit face specified ;; for it." It seems ERC and likely more than a few other packages ;; never came to heed this guidance and have erroneously depended ;; on such behavior for years if not decades. ;; ;; * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: ;; * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: ;; * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update ;; snapshot.
2026-05-12Run module setup in ERC query buffers on reconnectF. Jason Park
* etc/ERC-NEWS: Mention change. * lisp/erc/erc.el (erc-connection-established): Apply `erc--open-target' to all existing query buffers after they've been reassociated by the erc-networks logic.
2026-05-12; Make reconnect detection more readable in erc-openF. Jason Park
* lisp/erc/erc.el (erc-open): Bind `erc--server-reconnecting' instead of relying on a confusing single-use variable.
2026-05-12Preserve order of local ERC modules for activationF. Jason Park
* etc/ERC-NEWS: Add new section for ERC 5.7. * lisp/erc/erc.el (erc--update-modules): Reverse returned list. * test/lisp/erc/erc-tests.el (erc--update-modules/local): Update.
2026-05-12Improve source NUH handling in ERCF. Jason Park
* lisp/erc/erc.el (erc--user-nuh-message-types): New variable. (erc--shuffle-nuh-nickward, erc--interpret-nuh): Replace former with latter, whose behavior is easier to predict. * test/lisp/erc/erc-tests.el (erc--interpret-nuh): New test.
2026-05-12Refactor erc--warn-once-before-connectF. Jason Park
* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys): Ensure tail of let-bound `erc-insert-post-hook' is a list. * lisp/erc/erc-truncate.el (erc-truncate--warn-about-logging): Use `erc--warn-once-before-connect' instead of calling `erc-button--display-error-notice-with-keys-and-warn' directly. * lisp/erc/erc.el (erc--warn-once-before-connect-function) (erc--warn-once-before-connect-calls): New variables. (erc--warn-once-before-connect): Refactor for readability, incorporating new definitions above for flexibility and to help ensure uniqueness.
2026-05-12Improve isolation of some ERC test environmentsF. Jason Park
* lisp/erc/erc.el (erc--lwarn): During tests where the variable `erc--warnings-buffer-name' is non-nil, don't display the Warnings buffer, and inhibit messages for the benefit of batch runs. * test/lisp/erc/erc-tests.el (erc--modify-local-map): Protect various hooks from module-setup code. * test/lisp/erc/resources/erc-tests-common.el (erc-tests-common-equal-with-props): Act more like `equal-including-properties' in accepting arbitrary objects rather than just strings. (erc-tests-common-with-global-modules): New macro. (erc-tests-common-frozen-options): New variable. (erc-tests-common-with-frozen-options): New macro. (erc-tests-common-make-server-buf): Accept a buffer for the NAME arg. (erc-tests-common-assert-get-inserted-msg-readonly-with): Instead of shadowing, use macro to protect calling environment from effects of activating global module.
2026-05-12; Remove some forward declarations from ERC testsF. Jason Park
* lisp/erc/erc.el (erc--insert-before-markers-transplanting-hidden): Don't deliberately return anything because the return value is undefined. The only existing call site, in `erc-insert-line', invokes the function indirectly via `erc--insert-line-function' and discards the result. * test/lisp/erc/erc-scenarios-join-display-context.el: Require `erc-join'. * test/lisp/erc/erc-scenarios-log.el: Remove forward declarations and require `erc-stamp'. * test/lisp/erc/erc-scenarios-match.el: Require `erc-match'. * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-kill-server-track): Suppress unwanted newline in test output. * test/lisp/erc/erc-scenarios-sasl.el (erc-scenarios-sasl--plain-fail): Don't redundantly bind `erc--warnings-buffer-name' or create a buffer for it. Use literal value assigned by test fixture instead. * test/lisp/erc/erc-scenarios-services-misc.el: Require `erc-services'. * test/lisp/erc/erc-tests.el (erc-handle-irc-url): Remove redundant `save-excursion'. (erc-tests--modules): Reflow into single column for easier management of divergent WIP patch sets. This should help minimize manual surgery when applying them atop one another. * test/lisp/erc/resources/erc-scenarios-common.el: Remove unused `require's and forward declarations from top of file. (erc-scenarios-common--make-bindings): Remove the non-existent `erc-auth-source-parameters-join-function' and add `erc--warnings-buffer-name'. The latter's buffer, if created, will be killed automatically when the test body exits. (erc-scenarios-common-with-cleanup): Generate locally scoped defvars to be used in a manner similar to `dlet' for user options yet to be loaded. (erc-scenarios-common--assert-date-stamps): Don't run when `erc-stamp' isn't loaded.
2026-05-12Change ERC version to 5.7-gitF. Jason Park
* doc/misc/erc.texi: Change ERCVER to 5.7 without a "-git" suffix. * lisp/erc/erc.el (erc-version): Change working version to 5.7-git. Do the same for the package "Version" header. Bump required Compat version to 31. Add new 5.7 to Emacs 32.1 mapping in top-level modification of `customize-package-emacs-version-alist'.
2026-05-11Release ERC 5.6.2F. Jason Park
* lisp/erc/erc.el: Change "Version" package header from 5.6.2-git to 5.6.2. The ERCVER variable in doc/misc/erc.texi is already there. Retain `customize-package-emacs-version-alist' mapping to Emacs 31.1 even though master has already advanced to 32.0.50. (erc-version): Change version from 5.6.2-git to 5.6.2.
2026-05-11Change ERC version for Emacs 31 to 5.6.2.31.1F. Jason Park
* doc/misc/erc.texi: Change ERCVER to 5.6.2.31.1. * lisp/erc/erc.el: Change "Version" package header to 5.6.2.31.1. Don't update the `customize-package-emacs-version-alist' entry because this is not a GNU ELPA release. (erc-version): Change version to 5.6.2.31.1. Do not merge to master.
2026-04-30Only perform erc-log-insert-log-on-open setup onceF. Jason Park
* etc/ERC-NEWS: Add entry for option `erc-log-insert-log-on-open'. Mention deprecation of `erc-log-setup-logging'. * lisp/erc/erc-log.el (erc-log-insert-log-on-open): Expand type from boolean to choice of boolean, predicate, and new function item `erc-log-new-target-buffer-p'. (erc-log-mode, erc-log-enable, erc-log-disable): Replace `erc-log-setup-logging' on `erc-connect-pre-hook' with `erc-log--insert-log-on-open' at depth 80. Replace calls to `erc-log-setup-logging' with ones to `erc-log--setup'. (erc-log-new-target-buffer-p): New function. While the name could perhaps do more to indicate that it's only useful when called from `erc-open', that's the only place ERC typically sets up new target buffers. (erc-log-setup-logging): Deprecate and replace body with adapter that calls `erc-log--setup' and `erc-log--insert-log-on-open'. (erc-log--setup): New function whose body is mostly from the "nondestructive" portion of `erc-log-setup-logging'. Instead of moving the `erc-saved-last-position' marker to the old value, expect it not to have been initialized by `erc-initialize-log-marker' because `erc-connect-pre-hook' now runs after this code, which is now incorporated more judiciously into the module's "enable body". (erc-log--insert-log-on-open): New function whose body is mostly from the "destructive" portion of the previous incarnation of `erc-log-setup-logging'. Unlike the original, if option `erc-log-insert-log-on-open' is a function, call it to decide whether to insert a log file atop its buffer. Also, don't advance the marker `erc-last-saved-position' to the prompt area, where it can get stuck and prevent logs from being saved when `erc-log-insert-log-on-open' is non-nil. Thanks to Libera user Lionyx for reporting the bug, which has been around since at least ERC 5.4 and Emacs 28.1. (erc-log-disable-logging): Remove `erc-save-buffer-in-logs' from `write-file-functions' to undo its buffer-local addition in what is now `erc--log-setup'. * test/lisp/erc/erc-scenarios-log-options.el: New file. (Bug#79665)
2026-04-30Restore erc-last-saved-position from previous sessionF. Jason Park
* lisp/erc/erc-log.el (erc-log-setup-logging): Restore `erc-last-saved-position' from previous session. By default, a non-/QUIT disconnect does not write out any remaining buffer text to logs, instead leaving it until the buffer or Emacs is killed. But if a successful reconnect occurs beforehand, the uncommitted portion must be seen to somehow. Before this change, it would be lost because the function `erc-initialize-log-marker' remakes the marker at the prompt instead of recovering the previous value as now done here. Moreover, the traditional workaround of customizing `erc-log-write-after-insert' and `erc-log-write-after-send' to t should not be required to prevent gaps in any decent IRC client. * test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--reconnect): New function. (erc-scenarios-log--reconnect/auto, erc-scenarios-log--reconnect/manual): New tests. ;; * test/lisp/erc/resources/join/reconnect/foonet-again.eld: Add QUIT.
2026-04-30Define variable alias for erc-completion-modeF. Jason Park
* lisp/erc/erc-pcomplete.el (erc-completion-mode): New alias for the variable `erc-pcomplete-mode' to complement the function alias of the corresponding minor-mode command. Given that user code operating on the value of `erc-modules' needs to detect whether members are active, it only makes sense to address this specially. Before this change, applying `bound-and-true-p' to `erc-completion-mode' would always return nil, even when the module was active. For normal aliases, that's indeed expected because `define-erc-module' doesn't automatically define a mode variable for a non-nil ALIAS argument. Although in the long term it probably should, while also obsoleting the "new" alias simultaneously, that would likely break some user code and doubtless complicate things majorly for `pcomplete', the one in-tree outlier. The latter module would then require changing either its preferred name, the one advertised by `erc-modules' in its Custom definition, to `pcomplete' or its primary name to `completion'. Both are quite churn-inducing.
2026-03-23Fix erc-track-faces-normal-list regressionIvan
* lisp/erc/erc-track.el (erc-track--select-mode-line-face): Check whether ranked faces in the message appear in the value of the option `erc-track-faces-normal-list' rather than repeatedly checking if the current nominee does, usually the highest ranked face in the message. Failure to do so caused ERC to treat faces absent from the option's value as being present and thus eligible to replace ranked faces in the mode line segment. This bug was introduced in ERC 5.6 and is also part of 5.6.1. (Bug#80659) Copyright-paperwork-exempt: yes
2026-03-23Avoid nested erc-display-message in alert utilityF. Jason Park
* lisp/erc/erc.el (erc--warn-once-before-connect): Don't call `erc-display-message' from insertion hooks because doing so places an unnecessary burden on the caller to preserve the insertion marker and "msg prop" environment.
2026-03-04Rename 'any' to 'member-if' and deprecate 'cl-member-if'Sean Whitton
* lisp/subr.el (any): Rename from this ... (member-if): ... to this. All uses changed. (any): New function alias. * lisp/emacs-lisp/cl-seq.el (cl-member-if): Mark obsolete. * lisp/obsolete/cl.el (member-if): Delete obsolete function alias. * doc/lispref/lists.texi (List Elements): * doc/misc/cl.texi (Lists as Sets): * etc/NEWS: Document the change.
2026-03-03Revert "Rename 'any' to 'member-if' and deprecate 'cl-member-if'"Mattias Engdegård
This reverts commit 2bdf15f6d8293b21234cd236f39ce68f62e1f6c3. There is no consensus for this change.
2026-03-03Rename 'any' to 'member-if' and deprecate 'cl-member-if'Sean Whitton
* lisp/subr.el (any): Rename from this ... (member-if): ... to this. All uses changed. Implement '&key KEY-FN' for backwards compatibility. (any): New function alias. * lisp/emacs-lisp/cl-seq.el (cl-member-if): Make an alias for 'member-if'. * lisp/obsolete/cl.el (member-if): Delete obsolete function alias. * doc/lispref/lists.texi (List Elements): * doc/misc/cl.texi (Lists as Sets): * etc/NEWS: Document the change.
2026-01-11Use seq-doseq for iterating over strings in ERCF. Jason Park
* lisp/erc/erc-common.el (erc--doarray): Remove unused function. * lisp/erc/erc.el (erc--channel-mode-types, erc--process-channel-modes) (erc--parse-user-modes): Replace `erc--doarray' with `seq-doseq'. * test/lisp/erc/erc-tests.el (erc--doarray): Remove test.
2026-01-01; Add 2026 to copyright years.Sean Whitton
2025-12-26December 2025 spelling fixesPaul Eggert
Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
2025-10-27Fix regression involving erc-channel-user accessorsF. Jason Park
* etc/ERC-NEWS: New section for ERC 5.6.2 and new entry mentioning slight change in `erc-channel-user' accessor behavior. * lisp/erc/erc-common.el (erc-channel-user): Change type for status slot to natnum from integer. * lisp/erc/erc.el (erc-channel-user-signal-if-status-unknown): New variable. (erc--define-channel-user-status-compat-getter): Only use fallback in Non-ERC buffers because "obviously" a status flag is unusable if the server doesn't advertise it or, rather, advertises nonsupport via its absence. This regression was introduced in ERC 5.6. (erc-channel-begin-receiving-names): Sharp-quote function name. (erc--get-prefix-flag): Mention in doc that a return value of nil can also mean the status flag is not supported by the server. * test/lisp/erc/erc-tests.el (erc--parsed-prefix): Show that it returns nil in a non-ERC buffer. (erc-tests--make-combinations) (erc-tests--with-channel-user-status-accessors): New functions. (erc-channel-user/status-accessors/solo/default) (erc-channel-user/status-accessors/solo/ov) (erc-channel-user/status-accessors/multi/default) (erc-channel-user/status-accessors/multi/ov): New tests. (Bug#67220)
2025-10-27Change ERC version to 5.6.2-gitF. Jason Park
* doc/misc/erc.texi: Change ERCVER to 5.6.2. * lisp/erc/erc.el (erc-version): Change working version to 5.6.2-git. Do the same for the package Version header and the `customize-package-emacs-version-alist' mapping.
2025-10-21Release ERC 5.6.1F. Jason Park
* lisp/erc/erc.el: Change "Version" header from 5.6.1-git to 5.6.1. A `customize-package-emacs-version-alist' mapping to Emacs 31.1 was already added at some point during the course of development for this release. The ERCVER variable in doc/misc/erc.texi was updated when moving to the "-git" suffixed version. (erc-version): Change version from 5.6.1-git to 5.6.1.
2025-09-04Make function erc-scrolltobottom-mode idempotentF. Jason Park
* lisp/erc/erc-goodies.el (erc-scrolltobottom-mode) (erc-scrolltobottom-enable): Always remove hook functions whose membership hinges on the value of `erc-scrolltobottom-all'. In ERC 5.6, an init file's `setopt' form containing an `erc-modules' assignment before an `erc-scrolltobottom-all' one would result in conflicting sets of hook members come `erc-open'. Having such option-dependent branching in module setup, while difficult to maintain, is a long held ERC practice, as seen in functions like `erc-nickserv-identify-mode'. Making all new modules "local" may be the most manageable solution because existing global modules can't be made to require prior deactivation.
2025-09-04Don't touch window configuration in erc-fill prompt hookF. Jason Park
* lisp/erc/erc-fill.el (erc-fill--wrap-indent-prompt): While computing the prompt indentation's text size, don't bother saving and restoring the window configuration because unwanted scrolls are now believed to be unlikely because of other changes.
2025-08-25Remove scrolltobottom dependency from erc-fill moduleF. Jason Park
This mostly reverts 9668b4f97c2fc6bfff83258861d455a6d02516a8 "Make erc-fill-wrap depend on scrolltobottom". * etc/ERC-NEWS: Mention removal of formal dependency. * lisp/erc/erc-fill.el (erc-fill--wrap-scrolltobottom-exempt-p): Remove unused variable. (erc-fill--wrap-ensure-dependencies): Remove unused dependency check. (erc-fill-wrap-mode): Remove scrolltobottom dependency from doc string. * test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate): Remove unused binding from var list. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--make-bindings): Remove unused binding.
2025-08-25Prefer window-text-pixel-size in erc-fillF. Jason Park
* lisp/erc/erc-fill.el (erc-fill--wrap-measure): Using `buffer-text-pixel-size' for measuring text size in the selected window can end up triggering a scroll, which then requires imperfect countering by the scrolltobottom module, especially with regard to the option `erc-scrolltobottom-all'. Thanks to Alcor for reporting and helping with this bug, which was introduced along with fill-wrap in ERC 5.6.
2025-08-24Don't set bufbar cursor-type in erc-mode buffersF. Jason Park
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Set `cursor-type' in `erc-status-sidebar-mode' buffer instead. This bug was introduced along with the bufbar module for bug#63595 in ERC 5.6. It's a regression because it also affects the status-sidebar module.
2025-08-24Use existing X-Debbugs-CC header in erc-bugF. Jason Park
* lisp/erc/erc.el (erc-bug): On Emacs 30 and later, search for and ideally use an existing "X-Debbugs-CC" header instead of inserting a new one at the top. Section 4.5 Obsolete Header Fields of RFC 5322 says, "except for destination address fields (described in section 4.5.3), the interpretation of multiple occurrences of fields is unspecified." Anecdotal fiddling suggests the Savannah servers aren't confused by the second "empty" header field, so this change is probably just cosmetic.
2025-07-27; Improve some doc strings in erc-servicesF. Jason Park
* lisp/erc/erc-services.el: Fix shape of option in commentary example. Existing value didn't pass `setopt' validation and raised an error during successful lookup in `erc-nickserv-get-password'. (erc-nickserv-passwords, erc-nickserv-identify-autodetect): Update doc string by removing erroneous constraint, which was no longer applicable following c6eb114a42922af18818dce7317238e0af776958 "ERC: NickServ: Prompt for password last, overall simplifications (bug#46777)". (erc-nickserv-identify): Simplify doc and guarantee t as return value on success rather than rely on unadvertised behavior from other API functions.
2025-07-27Use function-valued variable for ERC query predicateF. Jason Park
* lisp/erc/erc-notify.el (erc-querypoll-mode, erc-querypoll-enable) (erc-querypoll-disable): Override `erc-query-table-synced-predicate' when mode is active. (erc--queries-current-p): Remove method. (erc--querypoll-active-p): New function. * lisp/erc/erc-speedbar.el (erc-speedbar-buttons) (erc-speedbar-insert-target): Call function-valued variable `erc--query-table-synced-predicate' instead of its now default value `erc--queries-current-p' directly. * lisp/erc/erc.el (erc--query-table-synced-predicate): New variable. (erc--queries-current-p, erc--query-participant-present-p): Convert former from method to normal function and rename to latter. Original was added as part of bug#70928.
2025-07-27Cancel ERC autojoin timer in the server bufferF. Jason Park
* lisp/erc/erc-join.el (erc-autojoin-channels-delayed): Only cancel `erc--autojoin-timer' in the server buffer in which it's local. After Emacs 28 brought commit fc66ec33226aeed0b745356363ed952c8ff1f7fd "Prefer defvar-local in erc", customizing `erc-autojoin-timing' to `ident' led to ERC emitting redundant JOINs before `erc-autojoin--join' was factored out. Additionally, don't bother binding options around the call to `erc-autojoin-channels' to shape its behavior, preferring instead to call the internal workhorse function directly. Ever since bug#5521 introduced those options, the logic in `erc-autojoin-channels' has ignored `erc-autojoin-delay' anyway, so long as `erc-autojoin-timing' isn't `ident'. This change may break third party advice. (erc-autojoin-after-ident): Restore code to cancel timer. It was erroneously deleted in 959fbcf34b5dd04e1b4bf87c0b73afd784a41f7f "favor network identities in erc-join". * test/lisp/erc/erc-join-tests.el: Require erc-tests-common atop file so tests can take advantage of common utilities. (erc-autojoin-channels--connect): Replace with a function and three separate tests. (erc-join-tests--autojoin-channels-connect): New function. (erc-autojoin-channels/server, erc-autojoin-channels/network) (erc-autojoin-channels/nomatch): New tests. (erc-autojoin-channels--delay): Replace with a function and three separate tests. Remove guard to skip test on Solaris. (erc-join-tests--autojoin-channels-ident): New function. (erc-autojoin-channels-delayed/server) (erc-autojoin-channels-delayed/network) (erc-autojoin-channels-delayed/nomatch): New tests. (erc-autojoin-channels--ident): Replace with function and two separate tests. (erc-join-tests--autojoin-after-ident): New function. (erc-autojoin-after-ident/server) (erc-autojoin-after-ident/network): New tests. (erc-join-tests--autojoin-add--common) (erc-join-tests--autojoin-add): Rename former to latter. (erc-autojoin-add--network) (erc-autojoin-add--network-extended-syntax) (erc-autojoin-add--network-id): Adjust arguments to fixture. (erc-autojoin-add--server): Use common utils. (erc-join-tests--autojoin-remove--common) (erc-join-tests--autojoin-remove): Rename former to latter. (erc-autojoin-remove--network) (erc-autojoin-remove--network-id): Adjust args for fixture. (erc-autojoin-remove--server): Use common utils. * test/lisp/erc/erc-scenarios-join-timing.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--run-in-term): In subprocess, don't use failure tally as exit status unless body form succeeds. * test/lisp/erc/resources/erc-tests-common.el (erc-tests-common-init-server-proc): Use `make-process' instead of `start-process'. (erc-tests-common-make-server-buf): Use `erc-server-current-nick' to create the `erc-networks--id' as a `erc-networks--id-qualifying' instance, which is more realistic than a "fixed" variant. * test/lisp/erc/resources/join/timing/connect-both.eld: New file. * test/lisp/erc/resources/join/timing/ident-both.eld: New file. (Bug#79017)
2025-04-16Don't round-trip auto-reconnect probe in ERCF. Jason Park
* lisp/erc/erc-backend.el (erc-server--reconnect-opened) (erc--server-reconnect-opened): Rename former to latter. Restore original buffer-local value of session connector for Emacs 29 and below. (erc--server-reconnect-timeout-check) (erc--server-reconnect-timeout-scale-function): Change from buffer-local to normal variables, which they should have been originally. (erc--recon-probe-reschedule): Ensure `erc-server-reconnect-timeout' is always non-nil to avoid seeing format specifier in admin message. Use current buffer when `proc' argument is nil. Perform cleanup when `proc' and `erc-server-process' differ. (erc-server-delayed-check-reconnect-reuse-process-p): New variable. (erc--recon-probe-sentinel): Run `erc--server-reconnect-opened' immediately because sending a speculative PING doesn't work on all servers and proxies, most crucially on ZNC, which replies with an error only after an extended timeout. (erc--recon-probe-filter): Remove unused function. (erc--recon-probe-check) Rework to not use fixed periodic timer, change second parameter to a Lisp time object. (erc-server-delayed-check-reconnect): Use realistic name when reusing process so that the session's process isn't "*erc-connectivity-check*". Set filter to `ignore'. Always run `erc--recon-probe-sentinel' when status is `open' or something other than `connect', but don't bother spawning a `erc--recon-probe-check' task as well because any problems creating the process should already be known. Handle quits during connect functions that perform blocking I/O, such as `socks-open-network-stream'. (erc-schedule-reconnect): Don't bother setting filter to nil. * test/lisp/erc/erc-scenarios-base-auto-recon.el (erc-scenarios-base-auto-recon-unavailable) (erc-scenarios-base-auto-recon-check/no-reuse): Rename former to latter. (erc-scenarios-base-auto-recon-no-proto) (erc-scenarios-base-auto-recon-check/reuse): Rename former to latter and rewrite not to expect a PING. * test/lisp/erc/resources/erc-d/erc-d.el (erc-d--forget-process): New function. (erc-d--process-sentinel): Stop serving when all dialogs have been exhausted. (Bug#62044)
2025-03-12Fix capitalization ELisp -> ElispSean Whitton
* configure.ac (libgccjit_not_found_err) (libgccjit_dev_not_found_err): * doc/emacs/buffers.texi (List Buffers): * doc/lispref/elisp.texi (Tree-sitter C API): * doc/lispref/functions.texi (What Is a Function): * doc/lispref/parsing.texi (Parsing Program Source) (Tree-sitter C API): * doc/misc/gnus.texi (The Gnus Registry): * etc/DEBUG: * etc/NEWS: * etc/NEWS.25: * etc/NEWS.26: * etc/NEWS.28: * etc/NEWS.30: * etc/TODO: * lib-src/emacsclient.c (print_help_and_exit): * lisp/auth-source.el (auth-source-search): * lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode): * lisp/cedet/semantic/wisent/comp.el (wisent-automaton-lisp-form): * lisp/cedet/srecode/el.el (srecode-semantic-apply-tag-to-dict): * lisp/editorconfig.el (editorconfig-get-local-variables-functions): * lisp/emacs-lisp/bindat.el (bindat-type): * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): * lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure): * lisp/emacs-lisp/cl-macs.el (cl--labels-convert): * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs) (lisp-fill-paragraphs-as-doc-string): * lisp/emacs-lisp/macroexp.el (macroexp--fgrep): * lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): * lisp/emacs-lisp/re-builder.el: * lisp/erc/erc-button.el (erc-emacswiki-lisp-url): * lisp/help-fns.el (help-fns--describe-function-or-command-prompt): * lisp/menu-bar.el (menu-bar-search-documentation-menu): * lisp/net/tramp-message.el (tramp-debug-font-lock-keywords): * lisp/org/org-capture.el (org-capture): * lisp/org/org.el (org-category, org-todo): * lisp/org/ox.el (org-export-async-start): * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): * lisp/progmodes/peg.el (peg-translate-exp): * lisp/progmodes/ruby-ts-mode.el: * lisp/woman.el (woman-mode, woman-parse-numeric-arg): * src/chartab.c (map_char_table_for_charset): * src/fns.c (extract_data_from_object): * src/frame.c (do_switch_frame): * src/keyboard.c (make_lispy_event): * test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-help-fns-examples-function-test): * test/manual/etags/c-src/emacs/src/keyboard.c (make_lispy_event): Fix capitalization ELisp -> Elisp.
2025-03-11Add erc-compat adapter for xml-escape-stringF. Jason Park
* lisp/erc/erc-compat.el (erc-compat--xml-escape-string): New macro to call `xml-escape-string' sans the NO-ERROR argument on Emacs 27. * lisp/erc/erc-desktop-notifications.el (erc-notifications-notify): Use compat macro.
2025-03-11Suppress log module when inserting date stamps in ERCF. Jason Park
* lisp/erc/erc-log.el (erc-truncate-buffer-on-save): Use `make-obsolete-variable' because `erc-truncate-buffer-on-save' is an option, not a function. Already mentioned in etc/ERC-NEWS. (erc-logging-enabled): Return nil if `log' appears in the `erc--skip' msg prop. * lisp/erc/erc-stamp.el (erc-stamp--defer-date-insertion-on-post-modify): Add `log' to `erc--skip' msg prop. This tells the log module to defer advancing the `erc-last-saved-position' marker until after stamps have been inserted, thus ensuring they're included in logs when `erc-log-write-after-insert' is non-nil. * test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--save-buffer-in-logs/truncate-on-save): Suppress warning for `erc-truncate-buffer-on-save'. (erc-scenarios-log--write-after-insert): New test. (Bug#76875)
2025-02-21Use .pem extension for client certs in ERC docsF. Jason Park
* doc/misc/erc.texi (Connecting): Change file-name extensions to .pem in all examples, and explain that the key and the cert can be combined into one file. (SASL): Use .pem extension for certs. * lisp/erc/erc.el (erc--warn-once-before-connect): Revise doc. (erc-tls): Use .pem extension for certs. (Bug#76278)
2025-02-21Don't kill window buffer in erc--split-lineF. Jason Park
* lisp/erc/erc-backend.el (erc--split-line): Restore original window buffer before killing temp buffer. (Bug#76404)
2025-02-17Prefer cl-evenp/cl-oddp in some placesStefan Kangas
* lisp/erc/erc.el (erc-format-message): * lisp/obsolete/thumbs.el (thumbs-emboss-image): * lisp/org/org-capture.el (org-capture-escaped-%): * lisp/org/org-element-ast.el (org-element-create): * lisp/org/org-macro.el (org-macro-extract-arguments): * lisp/org/org-persist.el (org-persist--get-collection): * lisp/org/ox-odt.el (org-odt-get-table-cell-styles): * lisp/org/ox.el (org-export--dispatch-ui): * lisp/progmodes/cperl-mode.el (cperl-forward-re) (cperl-find-pods-heres): Prefer 'cl-evenp/'cl-oddp' to free-coding them in some files that already depend on cl-lib in run-time.
2025-02-07More clearly define local module behavior in ERCF. Jason Park
* doc/misc/erc.texi (Modules): Label all local modules as being such. Move `querypoll' to the auxiliary section. Rework entire "Local Modules" portion. * lisp/erc/erc-goodies.el (erc-keep-place-indicator-mode) (erc-command-indicator-mode): Mention what buffer types they operate in. * lisp/erc/erc-nicks.el (erc-nicks-mode): Mention the mode is enabled in all buffers. * lisp/erc/erc-notify.el (erc-querypoll-mode): Mention which buffers it operates in. * lisp/erc/erc-sasl.el (erc-sasl-mode): Disable completely in target buffers so its mode variable is nil. * lisp/erc/erc-services.el (erc-services-regain-mode): Disable in target buffers. * lisp/erc/erc.el (erc-open): When activating local modules, skip those that have just been enabled by a fellow module. Do this even though their setup code is meant to be idempotent. * test/lisp/erc/erc-scenarios-base-local-modules.el (erc-scenarios-base-local-modules--toggle-helpers): Revise to assert current behavior. (Bug#57955)
2025-02-02Run erc-services-regain-mode callback on a timerF. Jason Park
* lisp/erc/erc-services.el (erc-services-regain-timeout-seconds): New variable. (erc-services-regain-mode): Mention CertFP in doc string. (erc--nickname-in-use-make-request): Ensure the 900 RPL_LOGGEDIN callback always runs after `erc-services-regain-timeout-seconds', even when SASL isn't being used. * test/lisp/erc/erc-scenarios-services-misc.el (erc-scenarios-services-misc--regain-command/oftc): New test. * test/lisp/erc/resources/services/regain/taken-regain-oftc.eld: New file.
2025-02-02; Remove obsolete :options value from erc-mode-hookF. Jason Park
* lisp/erc/erc.el (erc-mode-hook): Remove `erc-add-scroll-to-bottom' from :options list because the function has been deprecated.
2025-01-22Reuse client cert for connectivity probing in ERCF. Jason Park
* lisp/erc/erc-backend.el (erc--server-connect-function) (erc--server-post-dial-function): Rename former to latter because the existing name is better suited for the eventual generalizing of `erc-server-connect' in a future version. (erc-server-connect): Use new name for `erc--server-connect-function', `erc--server-post-dial-function'. (erc--recon-probe-reschedule, erc--recon-probe-sentinel) (erc--recon-probe-filter, erc--recon-probe-check): New functions factored out of `erc-server-delayed-check-reconnect'. (erc-server-delayed-check-reconnect): Refactor, splitting off lambdas into top-level functions for improved tracing. * lisp/erc/erc.el (erc-message-english-recon-probe-hung-up) (erc-message-english-recon-probe-nobody-home): New variables. (Bug#62044) Thanks to Libera.Chat user arjan for reporting this bug, which is new in ERC 5.6 and Emacs 30.1.
2025-01-22; Don't quote localp argument to define-erc-moduleF. Jason Park
* etc/ERC-NEWS: Rearrange some entries for 5.6.1. * lisp/erc/erc-fill.el (erc-fill-wrap-mode): * lisp/erc/erc-goodies.el (erc-keep-place-indicator-mode) (erc-command-indicator-mode): * lisp/erc/erc-nicks.el (erc-nicks-mode): * lisp/erc/erc-notify.el (erc-querypoll-mode): * lisp/erc/erc-sasl.el (erc-sasl-mode): * lisp/erc/erc-services.el (erc-services-regain-mode): Don't quote localp argument. * test/lisp/erc/erc-scenarios-misc.el (erc-nicks-track-faces/defer): Skip on Emacs 27 due to recent CI failures. * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood): Adjust timeout.
2025-01-07Improve use of Flyspell's API in erc-spellingF. Jason Park
* etc/ERC-NEWS: Announce deprecation of `erc-spelling-flyspell-verify' and `erc-spelling-unhighlight-word'. A slight behavioral change not worth mentioning is that, previously, ERC arranged for Flyspell to ignore any word immediately following a forward slash anywhere in the prompt input, even those for which the slash served as mere punctuation (a "stroke"), as in "something/misspelt." As of this change, Flyspell only unconditionally exempts an initial slash-prepended word, like "tableflip" in "ERC> /tableflip", and checks all others that follow against known slash commands. * lisp/erc/erc-spelling.el: Change top-level assignment of `erc-mode' symbol-property `flyspell-mode-predicate' from `erc-spelling-flyspell-verify' to `erc-spelling--flyspell-input-p'. (erc-spelling-mode, erc-spelling-disable): Remove local member from `flyspell-incorrect-hook'. (erc-spelling-init): Add `erc-spelling--flyspell-check' to `flyspell-incorrect-hook' locally. Don't bother explicitly setting `flyspell-generic-check-word-predicate' because Flyspell already does that for clients using the `flyspell-mode-predicte' interface. (erc-spelling-flyspell-verify, erc-spelling-unhighlight-word): Mark obsolete. (erc-spelling--flyspell-check, erc-spelling--flyspell-input-p): New functions, essentially the two halves of a reworked and bifurcated `erc-spelling-flyspell-verify'. Though used as a predicate, the first is not named as such because it performs side effects. * test/lisp/erc/erc-scenarios-spelling.el: New file. * test/lisp/erc/resources/spelling/auto-correct.eld: New file. (Bug#75327)
2025-01-07Fix regression in erc-nicks involving color poolsF. Jason Park
* lisp/erc/erc-nicks.el (erc-nicks-colors): Tweak doc. (erc-nicks--create-pool-function): On graphic displays, set value to `erc-nicks--create-culled-pool', the original default. This fixes a bug in which ERC mapped all pool members to a primary color, thus excluding the bulk of them. Thanks to Trevor Arjeski for discovering it. (erc-nicks--create-coerced-pool): Mention the text-terminal-only requirement in doc. (erc-nicks-refresh): Improve doc. * test/lisp/erc/erc-nicks-tests.el (erc-nicks-tests--track-faces): Enable `erc-track-mode' prior to running body.
2025-01-01Update copyright year to 2025Paul Eggert
Run "TZ=UTC0 admin/update-copyright".