summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* EUDC: Improve LDAP and BBDB testsThomas Fitzsimmons2022-11-242-1/+7
| | | | | | * test/lisp/net/eudc-tests.el (eudcb-ldap): Make slapd detection reliable. * test/lisp/net/eudc-resources/bbdb: Add another test contact.
* Add test scenarios for local ERC modulesF. Jason Park2022-11-235-0/+439
| | | | | | | | | * test/lisp/erc/erc-scenarios-base-local-modules.el: New file. * test/lisp/erc/resources/base/local-modules/first.eld: New file. * test/lisp/erc/resources/base/local-modules/fourth.eld: New file * test/lisp/erc/resources/base/local-modules/second.eld: New file. * test/lisp/erc/resources/base/local-modules/third.eld: New file. (Bug#57955.)
* Accept functions in place of passwords in ERCF. Jason Park2022-11-232-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-backend.el (erc-session-password): Add comment explaining type is now string, nil, or function. * lisp/erc/erc-compat.el (erc-compat--29-auth-source-pass-search): Use obfuscation from auth-source function when available. * lisp/erc/erc-sasl.el (erc-sasl--read-password, erc-server-AUTHENTICATE): Use `erc--unfun'. * lisp/erc/erc-services.el (erc-nickserv-get-password, erc-nickserv-send-identify): Use `erc--unfun'. * lisp/erc/erc.el (erc--unfun): New function for unwrapping a password couched in a getter. (erc--debug-irc-protocol-mask-secrets): Add variable to indicate whether to mask passwords in debug logs. (erc--mask-secrets): New function to swap masked secret with question marks in debug logs. (erc-log-irc-protocol): Conditionally mask secrets when `erc--debug-irc-protocol-mask-secrets' is non-nil. (erc--auth-source-search): Don't unwrap secret from function before returning. (erc-server-join-channel, erc-login): Use `erc--unfun'. * test/lisp/erc/erc-services-tests.el (erc-services-tests--wrap-search): Add helper for `erc--unfun'. (erc-services-tests--auth-source-standard, erc-services-tests--auth-source-announced, erc-services-tests--auth-source-overrides, erc-nickserv-get-password): Use `erc--unfun'. * test/lisp/erc/erc-tests.el (erc--debug-irc-protocol-mask-secrets): Add test for masking secrets with `erc--unfun' and friends.
* Add non-IRCv3 SASL module to ERCF. Jason Park2022-11-237-0/+670
| | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/erc.texi: Add SASL section in Advanced Usage chapter to document the new SASL module. * etc/ERC-NEWS: Mention addition of erc-sasl module for SASL support. * lisp/erc/erc-compat.el (erc-compat--29-sasl-scram-construct-gs2-header, erc-compat--29-sasl-scram-client-first-message, erc-compat--29-sasl-scram--client-final-message): Fix encoding bug and add minimal authorization support with copies of SASL functions introduced in Emacs 29. * lisp/erc/erc.el (erc-modules): Add `sasl'. * lisp/erc/erc-sasl.el: New file (bug#29108). * test/lisp/erc/erc-sasl-tests.el: New file. * test/lisp/erc/erc-scenarios-sasl.el: New file. * test/lisp/erc/resources/sasl/plain-failed.eld: New file. * test/lisp/erc/resources/sasl/plain.eld: New file. * test/lisp/erc/resources/sasl/scram-sha-1.eld: New file. * test/lisp/erc/resources/sasl/scram-sha-256.eld: New file. * test/lisp/erc/resources/sasl/external.eld: New file.
* Support local ERC modules in erc-mode buffersF. Jason Park2022-11-231-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/erc.texi: Mention local modules in Modules chapter. * etc/ERC-NEWS: Mention changes to `erc-update-modules'. * lisp/erc/erc.el (erc-migrate-modules): Add some missing mappings. (erc-modules): When a user removes a module, disable it and kill its local variable in all ERC buffers. (erc-update-modules): Move body of `erc-update-modules' to new internal function. (erc--update-modules): Add new function, a renamed and slightly modified version of `erc-update-modules'. Specifically, change return value from nil to a list of minor-mode commands for local modules. Use `custom-variable-p' to detect flavor. (erc--merge-local-modes): Add helper for finding local modules already active as minor modes in an ERC buffer. (erc-open): Replace `erc-update-modules' with `erc--update-modules'. Defer enabling of local modules via `erc--update-modules' until after buffer is initialized with other local vars. Also defer major-mode hooks so they can detect things like whether the buffer is a server or target buffer. Also ensure local module setup code can detect when `erc-open' was called with a non-nil `erc--server-reconnecting'. * lisp/erc/erc-common.el (erc--module-name-migrations, erc--features-to-modules, erc--modules-to-features): Add alists of old-to-new module names to support module-name migrations. (erc--assemble-toggle): Add new helper for constructing mode toggles, like `erc-sasl-enable'. (define-erc-modules): Defer to `erc--assemble-toggle' to create toggle commands. (erc--normalize-module-symbol): Add helper for `erc-migrate-modules'. * lisp/erc/erc-goodies.el: Require cl-lib. * test/lisp/erc/erc-tests.el (erc-migrate-modules, erc--update-modules): Add rudimentary unit tests asserting correct module-name mappings. (erc--merge-local-modes): Add test for helper. (define-erc-module--global, define-erc-module--local): Add tests asserting module-creation macro. (Bug#57955.)
* Don't set erc-networks--id until network is knownF. Jason Park2022-11-231-37/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-networks.el (erc-networks--id-given): Accept a null argument. (erc-networks--id-on-connect): Remove unused function. (erc-networks--id-equal-p): Add method for comparing initialized and unset IDs. (erc-networks--update-server-identity): Ensure `erc-networks--id' is set before continuing search. (erc-networks--init-identity): Don't assume `erc-networks--id' is non-nil. Add branch condition to reload ID on non-nil case. (erc-networks-on-MOTD-end): Let init-ID function handle renaming of server buffer. * lisp/erc/erc.el (erc-open): For continued sessions, try copying over the last network ID. (erc--auth-source-determine-params-default): Don't expect a network ID to have been initialized. (erc-set-current-nick): When connected, reload network ID. Leave comment warning that it may be unneeded. * lisp/erc/erc-backend.el (erc-server-NICK, erc-server-433): Unless already connected, schedule ID reload when server rejects or mandates a nick change. * test/lisp/erc/erc-scenarios-base-association-nick.el (erc-scenarios-base-association-nick-bumped, erc-scenarios-base-association-nick-bumped-mandated-renick): Update to reflect more liberal association behavior when renamed by IRCd.
* icalendar.el: Add test(s) for bug#56241Ulf Jasper2022-11-231-0/+43
| | | | | | * test/lisp/calendar/icalendar-tests.el (icalendar-tests--get-error-string-for-export): new. * icalendar-tests.el (icalendar-export-bug-56241-dotted-pair): new
* Restore tramp-achive's Emacs 26 compatibilityMichael Albinus2022-11-231-0/+3
| | | | | | | | * lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp): Special handling of Emacs 26. Simplify the other part. * test/lisp/net/tramp-tests.el (tramp-test48-unload): Special case of `tramp-register-archive-file-name-handler'.
* ; Fix typosStefan Kangas2022-11-235-5/+5
|
* ; Fix ERC test failure following recent typo fixF. Jason Park2022-11-212-2/+2
| | | | | | | | * test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el: Replace expected buffer content in test assertion. * test/lisp/erc/resources/erc-scenarios-common.el: Replace expected buffer content in test assertion. See also 40539c7587dc474b424cff732973fe8958eadf14 "; Fix typos".
* ; Fix typosStefan Kangas2022-11-221-1/+1
|
* Activate direct asynchronous processes for Tramp container methodsMichael Albinus2022-11-211-3/+4
| | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Remote processes): Mention also tramp-container.el. * lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Add `tramp-direct-async' to "mock" method. * lisp/net/tramp-container.el (tramp-methods) <docker, podman, kubernetes>: Add `tramp-direct-async'. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-handle-make-process): Handle `tramp-direct-async'. * test/lisp/net/tramp-tests.el (tramp-methods) <mock>: Add `tramp-direct-async'.
* ; Fix typosStefan Kangas2022-11-204-7/+7
|
* EUDC: Add BBDB testThomas Fitzsimmons2022-11-192-18/+39
| | | | | | * test/lisp/net/eudc-tests.el (eudcb-ldap): Call skip-unless with slapd check. (eudcb-bbdb): New test.
* EUDC: Add LDAP testsThomas Fitzsimmons2022-11-195-0/+78
| | | | | | | * test/lisp/net/eudc-resources/slapd.conf: New file. * test/lisp/net/eudc-resources/dc=gnu,dc=org.ldif: Likewise. * test/lisp/net/eudc-resources/dc=gnu,dc=org: New files. * test/lisp/net/eudc-tests.el (eudcb-ldap): New test.
* ; gnus-icalendar-tests: revert erroneous 'typo fix'Mattias Engdegård2022-11-181-1/+1
|
* ; Fix typosStefan Kangas2022-11-183-3/+3
|
* ; Fix typos (prefer US spelling)Stefan Kangas2022-11-182-3/+3
|
* Fix simple-tests when run noninteractivelyMattias Engdegård2022-11-181-9/+10
| | | | | | | * test/lisp/simple-tests.el (simple-execute-extended-command--describe-binding-msg): Bind text-quoting-style explicitly to ensure consistent behaviour whether or not the test is run interactively.
* Add missing elpa-package.eld to package test resourcesPhilip Kaludercic2022-11-176-0/+13
|
* Avoid raw control characters in two filesStefan Kangas2022-11-171-1/+1
| | | | | | | | * lisp/net/rcirc.el (rcirc-format, rcirc-unformat) (rcirc-format-bold, rcirc-format-italic, rcirc-format-underline) (rcirc-format-strike-trough, rcirc-format-fixed-width): * test/lisp/subr-tests.el (test-keymap-parse-macros): Don't use raw control characters.
* Improve new connections in erc-handle-irc-urlF. Jason Park2022-11-163-1/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/erc.texi: Add new Integrations section to the info manual under Advanced Usage. * etc/ERC-NEWS: Add new section mentioning improved UX when clicking on irc:// links. * lisp/erc/erc.el (erc-handle-irc-url): Add optional "scheme" parameter. Fix `erc-open' invocation so that the server buffer is named correctly by deferring to a new customizable opener. Arrange for JOINing a channel in a manner similar to ERC's autojoin module. (erc-url-connect-function): Add new option for creating a new ERC connection based on info parsed from a URL. (erc--url-default-connect-function): New function to serve as an interactive-only fallback when a user hasn't specified a URL connect function. * lisp/erc/erc-compat.el (erc-compat--29-browse-url--irc): Add new compatibility function for `browse-url-irc' and include it in `browse-url-default-handlers' on Emacs versions below 29. * test/lisp/erc/erc-tests.el (erc-tests--make-server-buf, erc-tests--make-client-buf): Add helpers for creating dummy ERC buffers. (erc-handle-irc-url): Add test. * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-handle-irc-url): Add new test. * test/lisp/erc/resources/join/legacy/foonet.eld: Relax timeout. (Bug#56514.)
* Add optional server param to erc-networks--determineF. Jason Park2022-11-161-0/+17
| | | | | | | * lisp/erc/erc-networks.el (erc-networks--determine): Accept optional `server' argument. * test/lisp/erc/erc-networks-tests.el (erc-networks--determine): Add test. (Bug#56514.)
* Default to TLS port when calling erc-tls from lispF. Jason Park2022-11-161-0/+42
| | | | | | | | | | | * lisp/erc/erc.el (erc-normalize-port): Add standard IANA port-name mappings for 6667 and 6697. (erc-open): Add note to doc string explaining that params `connect' and `channel' are mutually exclusive. (erc-tls): Call `erc-compute-port' with override. (erc-compute-port): Call `erc-normalize-port' with result'. * test/lisp/erc/erc-tests.el (erc-tls): Add simplistic test focusing on default parameters. (Bug#56514.)
* Refactor erc-select-read-argsF. Jason Park2022-11-161-0/+89
| | | | | | | | | | | | | | | | * lisp/erc/erc-backend.el (erc--server-connect-dumb-ipv6-regexp): Add liberal pattern for matching bracketed IPv6 addresses. (erc-server-connect): Remove brackets from IPv6 hosts before connecting. * lisp/erc/erc.el (erc--ensure-url): Add compat adapter to massage partial URLs given as input that may be missing the scheme:// portion. (erc-select-read-args): Keep bracketed IPv6 hosts intact. Make this function fully URL-aware (was only partially so). Accept optional `input' argument. * lisp/erc/erc-tests.el (erc-tests--ipv6-examples, erc--server-connect-dumb-ipv6-regexp, erc-select-read-args): Add test reading user input during interactive invocations of entry points. (Bug#56514.)
* Accommodate ircs:// URLs in url-irc and browse-urlF. Jason Park2022-11-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | * lisp/url/url-irc.el (url-irc-function): Change signature of function interface to expect a final "scheme" argument, such as "ircs". (url-irc): Call `url-irc-function' with new positional argument, the scheme extracted via `url-type' from the input URL. (url-irc-erc, url-irc-rcirc, url-irc-zenirc): Accept a URL scheme as a sixth positional arg. (url-ircs-default-port, url-ircs): Add new autoloaded constant and alias for `url-scheme-get-property' to recognize. Do this to avoid having to add another file. * lisp/net/browse-url.el (browse-url-irc-function): Add new option. (browse-url--irc): Add new function to call `browse-url-irc-function'. (browse-url-default-handlers): Add "irc://" entry. (browse-url-irc): Add new function to serve as general handler for "irc://" URLS. Accept trailing variadic args to accommodate non-browse-url interfaces as well. * test/lisp/net/browse-url-tests.el (browse-url-tests-select-handler-irc): Add test for "irc://" URL pattern. * etc/NEWS: Mention select browse-url and url-irc changes. (Bug#56514.)
* Improve auto-reconnect visibility in ERCF. Jason Park2022-11-161-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-backend.el (erc--server-reconnect-timer): New variable. (erc-server-reconnect-function): New user option. (erc-process-sentinel-2): Display time remaining until next reconnection attempt. Also remove condition case and move bulk of else condition logic to `erc-schedule-reconnect'. More importantly, no longer set `erc--server-reconnecting here'). (erc-server-connect): Initialize `erc--server-reconnect-timer' to nil. (erc-server-reconnect): Set `erc-server--reconnecting' here. (erc--mode-line-process-reconnecting): New constant to store value for "reconnect" state of `mode-line-process'. (erc--cancel-auto-reconnect-timer): New function to cancel auto-reconnect timer and print message. (erc-schedule-reconnect): New function for scheduling another reconnect attempt. * lisp/erc/erc.el (erc-open): Only update mode line for target buffers. For server buffers, let `erc-login' and/or process sentinels take care of it. (erc--cmd-reconnect, erc-cmd-RECONNECT): Rename latter to former, a new function, but repurpose existing to recognize newly allowed additional arguments and act accordingly. In new internal function, cancel an existing auto-reconnect timer, if any, before proceeding. Defer to `erc-server-reconnect' to set `erc--server-reconnecting'. Fix `with-suppressed-warnings' form. (erc-update-mode-line-buffer): Show "reconnecting in Ns" for `mode-line-process' when awaiting an automatic reconnect attempt. (erc-message-english-reconnecting, erc-message-english-reconnect-canceled): Add new message functions to English catalog. * lisp/erc/erc-pcomplete.el (pcomplete/erc-mode/RECONNECT): Perform completion for newly subcommand-aware `erc-cmd-RECONNECT'. * lisp/erc/erc-scenarios-base-reconnect (erc-scenarios-base-cancel-reconnect): Add new test case for canceling reconnect timers. (Bug#58840.)
* ; Make some ERC test fixtures a bit more courteousF. Jason Park2022-11-163-2/+5
| | | | | | | | | | | | * test/lisp/erc/erc-dcc-tests.el (erc-dcc-tests--pcomplete-common): Only emit messages when interactive. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-tests-with-server): Shadow `erc-after-connect' so `erc-autojoin-channels' doesn't affect other tests. test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--make-bindings): Shadow `erc-after-connect' here as well. Also require erc instead of erc-backend to silence some new compiler warnings the cropped up after the creation of erc-common.el.
* Support auth-source-pass in ERCF. Jason Park2022-11-161-3/+0
| | | | | | | | | | | | | | | | | | | | | * doc/misc/erc.texi: Mention that the auth-source-pass backend is supported. * lisp/erc/erc-compat.el (erc-compat--29-auth-source-pass-search, erc-compat--29-auth-source-pass--build-result-many, erc-compat--29-auth-source-pass--retrieve-parsed, erc-compat--29-auth-source-pass-backend-parse, erc-compat--auth-source-backend-parser-functions): Adapt some yet unreleased functions from auth-source-pass that mimic the netrc backend, and add forward declarations to support them. * lisp/erc/erc.el (erc--auth-source-search): Use own auth-source-pass erc-compat backend. * test/lisp/erc/erc-services-tests.el (erc-join-tests--auth-source-pass-entries): Remove useless items. (erc--auth-source-search--pass-standard, erc--auth-source-search--pass-announced, erc--auth-source-search--pass-overrides): Remove `ert-skip' guard. (Bug#58985.)
* Make auth-source-pass behave more like other backendsF. Jason Park2022-11-161-2/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source-pass.el (auth-source-pass-extra-query-keywords): Add new option to bring search behavior more in line with other backends. (auth-source-pass-search): Add new keyword params `max' and `require' and consider new option `auth-source-pass-extra-query-keywords' for dispatch. (auth-source-pass--match-regexp, auth-source-pass--retrieve-parsed, auth-source-pass--match-parts): Add supporting variable and helpers. (auth-source-pass--build-result-many, auth-source-pass--find-match-many): Add "-many" variants for existing workhorse functions. * test/lisp/auth-source-pass-tests.el: Require `ert-x'. (auth-source-pass-can-start-from-auth-source-search): Ensure `auth-source-pass-extra-query-keywords' is enabled around test body. (auth-source-pass-extra-query-keywords--wild-port-miss-netrc, auth-source-pass-extra-query-keywords--wild-port-miss, auth-source-pass-extra-query-keywords--wild-port-hit-netrc, auth-source-pass-extra-query-keywords--wild-port-hit, auth-source-pass-extra-query-keywords--wild-port-req-miss-netrc, auth-source-pass-extra-query-keywords--wild-port-req-miss, auth-source-pass-extra-query-keywords--netrc-akib, auth-source-pass-extra-query-keywords--akib, auth-source-pass-extra-query-keywords--netrc-host, auth-source-pass-extra-query-keywords--host, auth-source-pass-extra-query-keywords--baseline, auth-source-pass-extra-query-keywords--port-type, auth-source-pass-extra-query-keywords--hosts-first, auth-source-pass-extra-query-keywords--ambiguous-user-host, auth-source-pass-extra-query-keywords--suffixed-user, auth-source-pass-extra-query-keywords--user-priorities): Add juxtaposed netrc and extra-query-keywords pairs to demo optional extra-compliant behavior. * doc/misc/auth.texi: Add option `auth-source-pass-extra-query-keywords' to auth-source-pass section. * etc/NEWS: Mention `auth-source-pass-extra-query-keywords' in Emacs 29.1 package changes section. (Bug#58985.) Special thanks to Akib Azmain Turja <akib@disroot.org> for helping improve this patch.
* Enable/disable 'server-mode' when starting/stopping the serverJim Porter2022-11-161-0/+41
| | | | | | | | | * lisp/server.el (server-mode-map): New keymap... (server-mode): ... use it. (server-start): Update the 'server-mode' variable (and sync to 'global-minor-modes') when starting/stopping the server. * test/lisp/server-tests.el: New file (bug#58909).
* Fix suggest-key-bindings displaying key as commandStefan Kangas2022-11-131-0/+11
| | | | | | | | | * lisp/simple.el (execute-extended-command--describe-binding-msg): New function factored out from... (execute-extended-command): ...here. Fix bug where a key binding was displayed as a command with 'suggest-key-bindings'. (Bug#59247) * test/lisp/simple-tests.el (simple-execute-extended-command--describe-binding-msg): New test.
* New test for execute-extended-command helper defunStefan Kangas2022-11-131-0/+12
| | | | | * test/lisp/simple-tests.el (simple-execute-extended-command--shorter): New test.
* Fix &key parameters called without arguments (bug#58714)Gerd Möllmann2022-11-111-0/+6
| | | | | | * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing argument. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
* Fix indentation for multi-line block start in Python modekobarity2022-11-101-0/+17
| | | | | | | | * lisp/progmodes/python.el (python-info-dedenter-opening-block-positions): Fix for multi-line block start. * test/lisp/progmodes/python-tests.el (python-info-dedenter-opening-block-positions-6): New test. (Bug#59009)
* ; * test/lisp/dired-tests.el (dired-test-bug59047): Rename.Eli Zaretskii2022-11-101-10/+11
|
* Make 'dired-hide-details-mode' work after 'dired-hide-subdir'Gabriel do Nascimento Ribeiro2022-11-101-0/+10
| | | | | | | * lisp/dired.el (dired--unhide): Restore text properties. (Bug#59047) * test/lisp/dired-tests.el (dired-test-bugXXXX): New test.
* Teach thing-at-point to recognize bracketed IPv6 URLsF. Jason Park2022-11-091-0/+3
| | | | | | | | * lisp/thingatpt.el (thing-at-point-bounds-of-url-at-point): Allow IPv6 addresses as hosts. Overshoots in the case of bracketed markup but is rescued by `thing-at-point--bounds-of-well-formed-url'. * test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add cases for IPv6 URLs. Bug#56514.
* EUDC: Add ecomplete and mailabbrev backendsAlexander Adolf2022-11-083-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/eudc.texi (Overview): Add ecomplete and mailabbrev nodes. (ecomplete, mailabbrev): New nodes. (Installation): Add ecomplete and mailabbrev nodes. (LDAP Configuration): Use code formatting instead of quotes. (macOS Contacts Configuration): Likewise. (ecomplete Configuration): New node. (mailabbrev Configuration): Likewise. * etc/NEWS (EUDC): Mention ecomplete and mailabbrev backends, mention eudc-server-hotlist default change. * lisp/net/eudc-vars.el (eudc-known-protocols): Add ecomplete and mailabbrev. (eudc-server-hotlist): Add entries for ecomplete and mailabbrev. * lisp/net/eudcb-ecomplete.el: New EUDC backend file. * lisp/net/eudcb-mailabbrev.el: Likewise. * test/lisp/net/eudc-resources/ecompleterc, test/lisp/net/eudc-resources/mailrc: New eudc-tests resource files. * test/lisp/net/eudc-tests.el (eudc-test-rfc5322-quote-phrase) (eudc-test-make-address, eudcb-ecomplete, eudcb-mailabbrev): New test cases.
* Fix failing eshell alias testsStefan Kangas2022-11-061-9/+11
| | | | | * test/lisp/eshell/esh-var-tests.el (esh-var-test/alias/function) (esh-var-test/alias/symbol-pair): Fix tests. (Bug#59062)
* Add the "doas" alias to eshell.Brian Cully2022-11-051-0/+75
| | | | | | | | | | | | | * lisp/eshell/em-tramp.el (eshell/doas): new function. (eshell--method-wrap-directory): new function. (eshell/sudo): accept '-s'/'--shell' for interactive use. * test/lisp/eshell/em-tramp-tests.el (em-tramp-test/sudo-shell) (em-tramp-test/sudo-user-shell) (em-tramp-test/doas-basic) (em-tramp-test/doas-user) (em-tramp-test/doas-shell) (em-tramp-test/doas-user-shell): new tests. * etc/NEWS: mention new 'doas' eshell command. * doc/misc/eshell.texi: add 'doas' command documentation.
* Move ERC's core dependencies to separate filedickmao2022-11-042-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asking people to order require's is about as effective as asking kids to keep off the grass. * lisp/erc/erc-backend.el (erc--target, erc-auto-query, erc-channel-list, erc-channel-users, erc-default-nicks, erc-default-recipients, erc-format-nick-function, erc-format-query-as-channel-p, erc-hide-prompt, erc-input-marker, erc-insert-marker, erc-invitation, erc-join-buffer, erc-kill-buffer-on-part, erc-kill-server-buffer-on-quit, erc-log-p, erc-minibuffer-ignored, erc-networks--id, erc-nick, erc-nick-change-attempt-count, erc-prompt-for-channel-key, erc-prompt-hidden, erc-reuse-buffers, erc-verbose-server-ping, erc-whowas-on-nosuchnick): Forward-declare variables. (erc--open-target, erc--target-from-string, erc-active-buffer, erc-add-default-channel, erc-banlist-update, erc-buffer-filter, erc-buffer-list-with-nick, erc-channel-begin-receiving-names, erc-channel-end-receiving-names, erc-channel-p, erc-channel-receive-names, erc-cmd-JOIN, erc-connection-established, erc-current-nick, erc-current-nick-p, erc-current-time, erc-default-target, erc-delete-default-channel, erc-display-error-notice, erc-display-server-message, erc-emacs-time-to-erc-time, erc-format-message, erc-format-privmessage, erc-get-buffer, erc-handle-login, erc-handle-user-status-change, erc-ignored-reply-p, erc-ignored-user-p, erc-is-message-ctcp-and-not-action-p, erc-is-message-ctcp-p, erc-log-irc-protocol, erc-login, erc-make-notice, erc-network, erc-networks--id-given, erc-networks--id-reload, erc-nickname-in-use, erc-parse-user, erc-process-away, erc-process-ctcp-query, erc-query-buffer-p, erc-remove-channel-member, erc-remove-channel-users, erc-remove-user, erc-sec-to-time, erc-server-buffer, erc-set-active-buffer, erc-set-current-nick, erc-set-modes, erc-time-diff, erc-trim-string, erc-update-mode-line, erc-update-mode-line-buffer, erc-wash-quit-reason, erc-display-message, erc-get-buffer-create, erc-process-ctcp-reply, erc-update-channel-topic, erc-update-modes, erc-update-user-nick, erc-open, erc-update-channel-member): Forward-declare functions. (erc-response): Move to lisp/erc/erc-common.el. (erc-compat--with-memoization): Use "erc-compat-" prefixed macro. * lisp/erc/erc-common.el: New file. Change indentation for `erc-with-all-buffers-of-server' from 1 to 2. * lisp/erc/erc-compat.el (erc-compat--with-memoization): Migrate macro from `erc-backend' and rename. * lisp/erc/erc-goodies.el: Require `erc-common' instead of `erc'. (erc-controls-highlight-regexp, erc-controls-remove-regexp, erc-input-marker, erc-insert-marker, erc-server-process, erc-modules, erc-log-p): Forward declare variables. (erc-buffer-list, erc-error, erc-extract-command-from-line): Forward-declare functions. * lisp/erc/erc-networks.el (erc--target, erc-insert-marker, erc-kill-buffer-hook, erc-kill-server-hook, erc-modules, erc-rename-buffers, erc-reuse-buffers, erc-server-announced-name, erc-server-connected, erc-server-parameters, erc-server-process, erc-session-server): Forward declare variables. (erc--default-target, erc--get-isupport-entry, erc-buffer-filter, erc-current-nick, erc-display-error-notice, erc-error, erc-get-buffer, erc-server-buffer, erc-server-process-alive): Forward-declare functions. (erc-obsolete-var): Also suppress free-variable warnings. * lisp/erc/erc.el: Require `erc-networks', `erc-goodies', and `erc-backend' at top of file. Don't require `erc-compat'. (erc--server-last-reconnect-count, erc--server-reconnecting, erc-channel-members-changed-hook, erc-network, erc-networks--id, erc-server-367-functions, erc-server-announced-name, erc-server-connect-function, erc-server-connected, erc-server-current-nick, erc-server-lag, erc-server-last-sent-time, erc-server-process, erc-server-quitting, erc-server-reconnect-count, erc-server-reconnecting, erc-session-client-certificate, erc-session-connector, erc-session-port, erc-session-server, erc-session-user-full-name) Remove superfluous forward declarations. (erc-message-parsed, tabbar--local-hlf, motif-version-string): Relocate forward declares to central location. (erc-session-password): Move to `erc-backend'. (erc-downcase, erc-with-server-buffer, erc-server-user, erc-channel-user, erc-get-channel-user, erc-get-server-user): Move to lisp/erc/erc-common.el. (erc-add-server-user, erc-remove-server-user, erc-channel-user-owner-p, erc-channel-user-admin-p, erc-channel-user-op-p, erc-channel-user-halfop-p, erc-channel-user-voice-p): Convert from inline functions to normal functions. (define-erc-module, erc--target, erc--target-channel, erc--target-channel-local, erc-log, erc-log-aux, erc-with-buffer, erc-with-all-buffers-of-server): Move to lisp/erc/erc-common.el. (erc-channel-members-changed-hook): Relocate option to avoid compiler warning. (erc-input, erc--input-split): Move to lisp/erc/erc-common.el. (erc-controls-strip): Remove forward declaration temporarily until this file stops requiring `erc-goodies'. * test/lisp/erc/erc-networks-tests.el: Require `erc' instead of `erc-networks'. * test/lisp/erc/erc.el (erc--meta--backend-dependencies): Remove obsolete test. Don't require `erc-networks'. Bug#56340.
* Offer completions for GET subcommand flags in erc-dccF. Jason Park2022-11-041-1/+118
| | | | | | | | | | * lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC): Add /DCC GET switches. This is unfinished business from bug#54458. * test/lisp/erc/erc-dcc-tests.el (erc-dcc-tests--pcomplete-common, pcomplete/erc-mode/DCC--get-basic, pcomplete/erc-mode/DCC--get-1flag, pcomplete/erc-mode/DCC--get-2flags, pcomplete/erc-mode/DCC--get-2flags-reverse): Add helper and tests for completing /DCC GET switches.
* ; * test/lisp/erc/erc-services-tests.el: Remove cruft.F. Jason Park2022-11-041-16/+8
|
* Fix calling file name handler for `load'.Michael Albinus2022-11-041-4/+7
| | | | | | | | | | * lisp/net/ange-ftp.el (ange-ftp-load): Add MUST-SUFFIX argument. * lisp/net/tramp.el (tramp-handle-load): Adapt MUST_SUFFIX test. * src/lread.c (Fload): Call handler with must_suffix. * test/lisp/net/tramp-tests.el (tramp-test27-load): Extend test.
* Only strip newlines when stringifying a value for EshellJim Porter2022-11-031-0/+57
| | | | | | | | * lisp/eshell/esh-util.el (eshell-stringify): Use 'string-trim-right' instead of stripping the last character of the result of 'pp-to-string' (bug#58810). * test/lisp/eshell/esh-util-tests.el: New file.
* elide-head: Make trailing "/" in URL optionalStefan Kangas2022-10-301-5/+16
| | | | | | | * lisp/elide-head.el (elide-head-headers-to-hide): Make trailing "/" in the gnu.org URL optional for the GPL. * test/lisp/elide-head-tests.el (elide-head--test-headers-to-hide/gpl3-5): New test.
* cconv.el: Fix regression in cconv-tests-interactive-closure-bug51695Stefan Monnier2022-10-281-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | The new code to make interpreted closures safe-for-space introduced a regression in `cconv-tests-interactive-closure-bug51695`, only seen when using TEST_LOAD_EL. A few other issues were found and fixed along the way. * lisp/emacs-lisp/cconv.el (cconv-fv): Change calling convention and focus on finding the free variables. (cconv-make-interpreted-closure): New function. * lisp/loadup.el: Use `compiled-function-p` rather than `byte-code-function-p` so we also use safe-for-space interpreted closures when we build with native compilation. (internal-make-interpreted-closure-function): Use `cconv-make-interpreted-closure`. * src/eval.c (syms_of_eval): Rename `internal-filter-closure-env-function` to `internal-make-interpreted-closure-function`. (Ffunction): Let that new var build the actual closure. * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests-interactive-closure-bug51695): Test specifically the interpreted case.
* Fix failing test for package HierarchyWamm K. D2022-10-281-1/+1
| | | | | | | This fixes a typo in one of the tests of Hierarchy which was causing the test to fail. * test/lisp/emacs-lisp/hierarchy-tests.el (hierarchy-delayed-add-trees): Fix typo.
* ; Fix typos in symbol namesStefan Kangas2022-10-271-1/+1
|