summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix substitute-command-keys for global binding lookupRobert Pluim2022-09-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | The previous change forgot to account for the (rare) case of doing a lookup for a global binding when a specific keymap is in force. * lisp/help.el (substitute-command-keys): Redo lookup in global map if lookup in specific map fails. * test/lisp/help-tests.el (help-tests-substitute-command-keys/keymap-change): Add testcase for specific map overriding advertised-binding.
* | Recognize the backslash operator in perl-modeMauro Aranda2022-09-202-0/+38
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Add new rule to detect a backslash operator. (Bug#11996) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-11996): New test. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-11996.pl: New file.
* | Bury new ERC buffers by defaultF. Jason Park2022-09-191-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc.el (erc-join-buffer): Change default value to `bury'. (erc-setup-buffer): Make `window-noselect' behave more like its description and abstain from ever replacing the current buffer. * test/lisp/erc/erc-scenarios-base-reconnect.el (erc-scenarios-common-base-reconnect-options): Update helper to handle new default value for option `erc-join-buffer'. (erc-scenarios-base-reconnect-options--buffer): Update and rename function `erc-scenarios-base-reconnect-options--default'. (erc-scenarios-base-reconnect-options--default): Update and rename function `erc-scenarios-base-reconnect-options--bury'. * etc/ERC-NEWS: Update existing display-buffers section for 5.5. (Bug#51753)
* | Offer to regexp-quote new items in erc-match commandsF. Jason Park2022-09-191-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-match.el (erc-match-quote-when-adding) Add new option to quote new items added to match lists. (erc-add-entry-to-list): Add optional `alt' parameter indicating whether to flip the behavior indicated by `erc-match-quote-when-adding'. (erc-add-pal, erc-add-fool, erc-add-keyword, erc-add-dangerous-host): Pass universal arg to `erc-add-entry-to-list' as `alt' argument. (erc-match-pal-p, erc-match-fool-p, erc-match-keyword-p, erc-match-dangerous-host-p): Don't bother matching when list is nil. * lisp/erc/erc.el (erc-list-match (lst str): Join input list as regexp union instead of looping over items. * etc/ERC-NEWS: Update misc-UX section for 5.5. * test/lisp/erc/erc-match-tests.el: New file. (Bug#56450)
* | Stabilize channels variant of erc-reuse-buffers testF. Jason Park2022-09-192-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-networks.el (erc-networks--id-sort-buffers): Use `buffer-local-value' instead of `with-current-buffer'. * test/lisp/erc/erc-scenarios-base-reuse-buffers.el (erc-scenarios-common--base-reuse-buffers-channel-buffers): Wait for buffers to be created by server-initiated JOINs. (erc-scenarios-base-reuse-buffers-channel-buffers--disabled): Remove `:unstable' tag. * test/lisp/erc-tests.el (erc-ring-previous-command): Remove unnecessary `goto-char'.
* | ; Tag some ERC test-server tests as being :unstableF. Jason Park2022-09-196-8/+8
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/erc/resources/base/assoc/samenet/chester.eld: Relax timeout. * test/lisp/erc/resources/base/assoc/samenet/tester.eld: Relax timeout. * test/lisp/erc/resources/base/assoc/samenet/tester2.eld: Relax timeout. * test/lisp/erc/resources/base/netid/samenet/chester.eld: Relax timeout. * test/lisp/erc/resources/base/netid/samenet/tester.eld: Relax timeout. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-linger, erc-d-run-linger-fail, erc-d-run-linger-direct): Mark some tests as being unstable.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMichael Albinus2022-09-192-0/+23
|\ \
| * | perl-mode: / is a regexp match if there's nothing before itMauro Aranda2022-09-191-0/+12
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): A "/" that starts the first statement is a regexp match. (Bug#997) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-997): New test.
| * | Improve check for misleading 'cl-case' cases (Bug#57915).Philipp Stephani2022-09-191-0/+11
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Check that the case is of the form (quote FOO), not just (quote). * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-no-warning): New unit test.
* | | Revert change in Tramp inotifywaitMichael Albinus2022-09-191-7/+6
|/ / | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Revert use of "-P", it doesn't exist in older inotifywait versions. * test/lisp/filenotify-tests.el: Deactivate instrumentation.
* | Extract support of OSC escape sequences from comintMatthias Meulien2022-09-181-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/comint.el (osc): Now requires osc.el. (comint-osc-directory-tracker): Alias to osc-directory-tracker. (comint-osc-hyperlink-handler): Alias to osc-hyperlink-handler. (comint-osc-hyperlink-map): Alias to osc-hyperlink-map. (comint-osc-handlers): Alias to osc-handlers. (comint-osc-hyperlink): Alias to osc-hyperlink. (comint-osc-process-output): Rewritten to call osc-apply-on-region. * lisp/osc.el (osc-handlers): Clone comint-osc-handlers. (osc--marker): Clone comint-osc--marker. (osc-apply-on-region): Implementation taken from comint-osc-process-output. (osc-directory-tracker): Clone from comint-osc-directory-tracker. (osc-hyperlink-map): Clone from comint-osc-hyperlink-map. (osc-hyperlink): Clone from comint-osc-hyperlink. (osc-hyperlink--state): Clone from comint-osc-hyperlink--state. (osc-hyperlink-handler): Clone from comint-osc-hyperlink-handler. * test/lisp/osc-tests.el (osc): Test osc-apply-region (bug#57821).
* | ; Instrument filenotify-testsMichael Albinus2022-09-181-1/+1
| | | | | | | | Author:
* | ; Instrument filenotify-testsMichael Albinus2022-09-181-1/+7
| |
* | Fix recent filenotify-tests changesMichael Albinus2022-09-171-4/+25
| | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Use "-P". * test/lisp/filenotify-tests.el (file-notify-test11-symlinks): Adapt test.
* | Update Unicode support to Unicode version 15.0.0 (bug#57846)समीर सिंह Sameer Singh2022-09-171-34/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/BidiBrackets.txt * admin/unidata/BidiMirroring.txt * admin/unidata/Blocks.txt * admin/unidata/IVD_Sequences.txt * admin/unidata/IdnaMappingTable.txt * admin/unidata/NormalizationTest.txt * admin/unidata/PropertyValueAliases.txt * admin/unidata/ScriptExtensions.txt * admin/unidata/Scripts.txt * admin/unidata/SpecialCasing.txt * admin/unidata/UnicodeData.txt * admin/unidata/confusables.txt * admin/unidata/copyright.html * admin/unidata/emoji-data.txt * admin/unidata/emoji-sequences.txt * admin/unidata/emoji-test.txt * admin/unidata/emoji-zwj-sequences.txt * test/manual/BidiCharacterTest.txt: Updated files from Unicode 15.0. * admin/unidata/unidata-gen.el (unidata-file-alist): Add new ranges. * lisp/international/fontset.el (script-representative-chars): Add new scripts. (otf-script-alist): Update from latest version. (setup-default-fontset): Add new scripts. * lisp/international/characters.el: Update syntax and category tables for new characters and scripts. (char-width-table): Update for changes in Unicode 15.0. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--failing-lines-part1) (ucs-normalize-tests--failing-lines-part2): Update per the test results. * doc/lispref/nonascii.texi (Character Properties): Update Unicode version number. * etc/NEWS: Announce support for Unicode 15.0.
* | Accept more wide function signatures in docstringsStefan Kangas2022-09-162-0/+8
| | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-ignore-function-signature.el"): New test. * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Make regexp more allowing to silence warning. * test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el: New file.
* | Enable `dont-follow' for inotify file notificationsMichael Albinus2022-09-161-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (File Notifications): Symlinks aren't followed. * lisp/filenotify.el (file-notify--add-watch-inotify): Add `dont-follow' flag. * lisp/net/tramp.el (tramp-handle-file-notify-rm-watch): Suppress errors when reading process output. * test/lisp/filenotify-tests.el (file-notify-test11-symlinks) (file-notify-test11-symlinks-remote): New tests.
* | Faster and more robust list-of-strings-pMattias Engdegård2022-09-161-1/+2
| | | | | | | | | | | | * lisp/subr.el (list-of-strings-p): Speed up by a factor 4 (approx.) and don't crash on dotted lists. * test/lisp/subr-tests.el (test-list-of-strings-p): Extend test.
* | Fix cperl list indentation problemLars Ingebrigtsen2022-09-162-0/+29
| | | | | | | | | | * lisp/progmodes/cperl-mode.el (cperl-calculate-indent): Indent foo:bar() in lists correctly (bug#57829).
* | Add new predicate list-of-strings-pLars Ingebrigtsen2022-09-161-0/+7
| | | | | | | | * lisp/subr.el (list-of-strings-p): New function.
* | Allow using a symbol as an index into an alist in EshellJim Porter2022-09-141-4/+8
| | | | | | | | | | | | | | | | | | * lisp/eshell/esh-var.el (eshell-index-value): If INDEX is a symbol, use 'assoc' for indexing. * test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-assoc) (esh-var-test/quoted-interp-var-assoc): Add checks for indexing via symbol (bug#57787).
* | pcomplete: Generate completions from --help messagesAugusto Stoffel2022-09-141-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/pcomplete.el (pcomplete-from-help): New function (and hash table) to get pcomplete candidates from help messages. (pcomplete-here-using-help): Helper function to define pcomplete for simple commands (pcomplete-completions-at-point): Provide annotation-function and company-docsig properties. * lisp/pcmpl-git.el: New file, provides pcomplete for Git. * lisp/pcmpl-gnu.el: Add pcomplete for awk, gpg and gdb, emacs and emacsclient. * lisp/pcmpl-linux.el: Add pcomplete for systemctl and journalctl. * lisp/pcmpl-rpm.el: Add pcomplete for dnf. * lisp/pcmpl-unix.el: Add pcomplete for sudo and most commands found in GNU Coreutils. * lisp/pcmpl-x.el: Add pcomplete for tex, pdftex, latex, pdflatex, rigrep and rclone. * test/lisp/pcomplete-tests.el (pcomplete-test-parse-gpg-help, pcomplete-test-parse-git-help): Tests for the new functions.
* | Fix more misleading cl-case quoting in testsBasil L. Contovounesios2022-09-142-11/+11
| | | | | | | | | | | | | | * test/lisp/dnd-tests.el (x-begin-drag): * test/lisp/so-long-tests/so-long-tests-helpers.el (so-long-tests-assert-active, so-long-tests-assert-reverted): Remove misleading quoting in cl-case clauses (bug#51368).
* | Add new function xdg-current-desktop to xdg.elStefan Kangas2022-09-141-0/+10
| | | | | | | | | | * lisp/xdg.el (xdg-current-desktop): New function. * test/lisp/xdg-tests.el (xdg-current-desktop): New test.
* | Fix recently-added cl-macs testsLars Ingebrigtsen2022-09-141-32/+34
| | | | | | | | | | * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-error) (cl-case-warning): Fix warning matches.
* | Have 'cl-case' warn about suspicious casesPhilipp Stephani2022-09-131-0/+32
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil key list (which would never match). Warn about quoted symbols that should probably be unquoted. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit test (bug#51368).
* | Signal an error if a fallback cl-case is misplacedPhilipp Stephani2022-09-131-0/+11
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil key list (which would never match). Warn about quoted symbols that should probably be unquoted. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit test (bug#51368).
* | Fix whitespace-tests on macOSGerd Möllmann2022-09-131-5/+5
| | | | | | | | | | | | * test/lisp/whitespace-tests.el (whitespace-tests--empty-bob): (whitespace-tests--empty-eob): Use C-a/C-e instead of <home>/<end> (bug#57763).
* | Consider key=val labels when renumberingArash Esbati2022-09-121-0/+173
| | | | | | | | | | | | | | | | | | * lisp/textmodes/reftex-global.el (reftex-translate): Recognize key=val labels given in the optional or mandatory argument of environments (AUCTeX bug#57720). * test/lisp/textmodes/reftex-tests.el (reftex-renumber-simple-labels): New Test.
* | Restrict replace-*-in-region to the bounds defined by callerKévin Le Gouguec2022-09-111-2/+30
| | | | | | | | | | | | | | | | * lisp/subr.el (replace-string-in-region, replace-regexp-in-region): Narrow to region before iterating over matches, instead of giving a bound to the search functions. * test/lisp/subr-tests.el (test-replace-string-in-region): Add regression tests (bug#57733).
* | whitespace: Redo BoB/EoB empty line highlightingRichard Hansen2022-09-111-0/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/whitespace.el (whitespace--empty-at-bob-matcher, whitespace--empty-at-eob-matcher, whitespace--update-bob-eob, whitespace-color-off, whitespace-color-on, whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp, whitespace-looking-back, whitespace-post-command-hook): Redo the `empty' line highlighting logic to ensure that a buffer change causes all affected `empty' lines to become (un)highlighted (bug#37467). Also, for improved UX, don't highlight BoB empty lines at or below point (not just when point is at 1), or EoB empty lines at or above point (not just when point is `eobp'). (whitespace-bob-marker, whitespace-eob-marker): Clarify documentation. * test/lisp/whitespace-tests.el (whitespace--with-test-buffer, whitespace--fu, whitespace-tests--empty-bob, whitespace-tests--empty-eob): Add tests.
* | ert-x: New `ert-with-test-buffer-selected' convenience macroRichard Hansen2022-09-111-0/+15
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected): New convenience macro that extends `ert-with-test-buffer' by displaying the test buffer in a temporary selected window. This makes it easier to simulate user input in the body via `execute-kbd-macro'. * test/lisp/emacs-lisp/ert-x-tests.el (ert-test-test-buffer-selected/*): Add tests.
* | New function substitute-quotesStefan Kangas2022-09-101-16/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/help.el (substitute-quotes): New function. (Bug#51040) * doc/lispref/help.texi (Keys in Documentation): Document substitute-quotes. * test/lisp/help-tests.el (help-tests-substitute-quotes): New test. * lisp/cedet/srecode/srt-mode.el (srecode-macro-help): * lisp/cus-theme.el (describe-theme-1): * lisp/emacs-lisp/cl-extra.el (cl--describe-class): * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): * lisp/emacs-lisp/package.el (describe-package-1): * lisp/help-fns.el (help-fns--parent-mode, help-fns--var-risky) (help-fns--var-file-local, help-fns--var-bufferlocal) (describe-face): * lisp/help.el (substitute-command-keys): * lisp/progmodes/octave.el (octave-help): Use the new function instead of 'substitute-command-keys'.
* | Fix "warn-lambda-malformed-interactive-spec.el" even moreLars Ingebrigtsen2022-09-091-1/+1
| | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-lambda-malformed-interactive-spec.el"): Adjust test further.
* | Don't bind `s' in the normal backtrace mapLars Ingebrigtsen2022-09-091-1/+2
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/backtrace.el (backtrace-mode-map): Don't bind the "s" command, because it's meaningless outside modes that have set the backtrace-goto-source-functions variable (and only edebug does that) (bug#57674). * lisp/emacs-lisp/edebug.el (edebug-pop-to-backtrace): Use it. (edebug-backtrace-mode-map, edebug-backtrace-mode): New mode.
* | Update a bytecomp testLars Ingebrigtsen2022-09-091-1/+1
| | | | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-lambda-malformed-interactive-spec.el"): Update test to code change.
* | Make use of rx in Tramp backward compatobleMichael Albinus2022-09-092-54/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-rx--runtime-params): New defvar. (tramp-compat-rx--transform-items) (tramp-compat-rx--transform-item, tramp-compat-rx--transform): New defuns. Suggested by Mattias Engdegård <mattiase@acm.org>. (tramp-compat-rx): New defalias or defmacro. (tramp-compat-string-replace, tramp-compat-string-search): Use regexp-quote. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-cmds.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `tramp-compat-rx' where indicated. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `tramp-compat-rx' where indicated.
* | ; Fix a race condition in an Eshell testJim Porter2022-09-081-2/+4
| | | | | | | | | | | | * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/sigpipe-exits-process): Use "|&" when creating the pipeline to prevent an extra pipe process from being started.
* | test: Remove redundant "" arg to `mapconcat`Stefan Monnier2022-09-089-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/process-tests.el (process-test-stderr-filter): * test/src/print-tests.el (print-tests-continuous-numbering): * test/src/fns-tests.el (fns-tests-mapconcat): * test/src/data-tests.el (test-bool-vector-to-hex-string): * test/src/casefiddle-tests.el (casefiddle-tests-char-properties) (casefiddle-tests-case-table, casefiddle-tests-casing-character): * test/lisp/tabify-tests.el (tabify-tests--test-changes): * test/lisp/subr-tests.el (subr-tests-bug22027): * test/lisp/sort-tests.el (sort-tests-random-word): * test/lisp/net/hmac-md5-tests.el (hmac-md5-test-encode-string): * test/lisp/md4-tests.el (md4-tests-digest->hex): * test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map): * test/lisp/dired-tests.el (dired-test-directory-files): * test/lisp/char-fold-tests.el (char-fold--random-word): * test/lisp/ansi-color-tests.el (ansi-color-incomplete-sequences-test): Remove redundant "" arg to `mapconcat`.
* | Make call of remote `id' more performant in TrampMichael Albinus2022-09-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p): New defun. (tramp-adb-file-name-handler-alist): Use it. (tramp-adb-handle-file-executable-p) (tramp-adb-handle-file-readable-p) (tramp-adb-handle-file-writable-p) (tramp-adb-handle-get-remote-uid) (tramp-adb-handle-get-remote-gid) (tramp-adb-handle-get-remote-groups): Use caches consequently. * lisp/net/tramp-sh.el (tramp-perl-id, tramp-python-id): New defconsts. (tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid) (tramp-sh-handle-get-remote-groups): Use caches consequently. (tramp-sh-handle-file-writable-p): Use `file-writable-p'. (tramp-expand-script): Handle also "python" expansion. (tramp-get-remote-id): Do not set connection property anymore, this is done differently now. (tramp-get-remote-uid-with-id, tramp-get-remote-uid-with-perl) (tramp-get-remote-uid-with-python, tramp-get-remote-gid-with-id) (tramp-get-remote-gid-with-perl) (tramp-get-remote-gid-with-python): Remove. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p) (tramp-sudoedit-handle-file-exists-p) (tramp-sudoedit-handle-file-readable-p) (tramp-sudoedit-handle-file-writable-p): (tramp-sudoedit-handle-get-remote-uid) (tramp-sudoedit-handle-get-remote-gid) (tramp-sudoedit-handle-get-remote-groups): Use caches consequently. * lisp/net/tramp.el (tramp-check-cached-permissions): Call `tramp-get-remote-groups' only if needed. (tramp-get-remote-groups): Do not return default value. (tramp-read-id-output): New defun. * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-perl): Suppress also remote `id'.
* | Apply syntax highlighting for all python f-stringsLaurence Warne2022-09-061-4/+8
| | | | | | | | | | | | * lisp/progmodes/python.el (python--f-string-p) (python--font-lock-f-strings): Edit functions to use a regular expression matching all f-strings (bug#56757).
* | Use secondary groups when checking permissions in Tramp (Bug#57044)Michael Albinus2022-09-062-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-check-cached-permissions): Check also for secondary groups. (Bug#57044) (tramp-get-remote-groups): * lisp/net/tramp-adb.el (tramp-adb-handle-get-remote-groups): * lisp/net/tramp-sh.el (tramp-sh-handle-get-remote-groups): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-get-remote-groups): New defuns. * lisp/net/tramp.el (tramp-file-name-for-operation): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-groups'. * lisp/net/tramp.el: * lisp/net/tramp-adb.el: * lisp/net/tramp-cache.el: * lisp/net/tramp-crypt.el: * lisp/net/tramp-fuse.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-sh.el: * lisp/net/tramp-smb.el: * lisp/net/tramp-sudoedit.el: Use `blank' in `rx' forms. * test/lisp/net/tramp-archive-tests.el: * test/lisp/net/tramp-tests.el: Use `blank' in `rx' forms.
* | cl-symbol-macrolet: Fix recent regressionStefan Monnier2022-09-062-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent fix for bug#57397 introduced a regression, breaking the `cl-lib-symbol-macrolet-hide` test. It turned out that the origin of the problem was that `gv.el` uses `macroexpand-1` which does not (can't) use `macroexpand` but `cl-symbol-macrolet` failed to advise `macroexpand-1` the way it advised `macroexpand`. To fix this, we change `cl-symbol-macrolet` so it advises both, and we do that with a new `macroexpand` advice which delegates the bulk of the work to `macroexpand-1`. Along the way, I bumped into another bug in the interaction between `cl-letf` and `cl-symbol-macrolet`, which I tried to fix in `cl-letf`. I hear the war on `cl-symbol-macrolet` was a failure. Maybe ... just say no? * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand-1): New function, extracted from `cl--sm-macroexpand`. (cl--sm-macroexpand): Rewrite completely. (cl-symbol-macrolet): Advise both `macroexpand` and `macroexpand-1`. (cl--letf): Don't use the "simple variable" code for symbol macros. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide): Revert last change because the test was right. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet): Add a test case.
* | Disable failing cl-lib-symbol-macrolet-hide test for nowLars Ingebrigtsen2022-09-061-0/+3
| | | | | | | | | | * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide): Disable until code is fixed.
* | Let external Eshell processes send stdout and stderr to different placesJim Porter2022-09-041-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/esh-proc.el (eshell-put-process-properties): Pass INDEX. (eshell-gather-process-output): Create a pipe process for stderr when stderr goes somewhere different than stdout. (eshell-insertion-filter, eshell-sentinel): Consult ':eshell-handle-index' property. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/output/stdout-to-buffer) (esh-proc-test/output/stderr-to-buffer) (esh-proc-test/exit-status/with-stderr-pipe): New tests (bug#21605).
* | Put Eshell's bookkeeping data for external processes on the process objectJim Porter2022-09-041-12/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows tracking this information for process objects not recorded in 'eshell-process-list', which will be useful for pipe processes for stderr output. * lisp/eshell/esh-proc.el (eshell-process-list): Add docstring. (eshell-record-process-object): Only record the process object and whether it's a subjob. (eshell-remove-process-entry): Adapt to changes in 'eshell-record-process-object'. (eshell-record-process-properties): New function... (eshell-gather-process-output): ... call it. (eshell-insertion-filter, eshell-sentinel): Use new process properties, don't require process to be in 'eshell-process-list'. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test--output-cmd): New variable. (esh-proc-test--detect-pty-cmd): Add docstring. (esh-proc-test/output/to-screen) (esh-proc-test/output/stdout-and-stderr-to-buffer) (esh-proc-test/exit-status/success, esh-proc-test/exit-status/failure) (esh-proc-test/kill-process/foreground-only): New tests. (esh-proc-test/kill-background-process): Rename to... (esh-proc-test/kill-process/background-prompt): ... this, and use 'eshell-wait-for-subprocess' instead of 'sit-for'.
* | Add support for more kinds of redirect operators in EshellJim Porter2022-09-041-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/esh-arg.el: Require cl-lib. (eshell-finish-arg): Allow passing multiple ARGUMENTS. (eshell-quote-argument): Handle the case when 'eshell-finish-arg' was passed multiple arguments. * lisp/eshell/esh-cmd.el (eshell-do-pipelines) (eshell-do-pipelines-synchronously): Only set stdout output handle. * lisp/eshell/esh-io.el (eshell-redirection-operators-alist): New constant. (eshell-io-initialize): Prefer sharp quotes for functions. (eshell-parse-redirection, eshell-strip-redirections): Add support for more redirection forms. (eshell-copy-output-handle, eshell-set-all-output-handles): New functions. * test/lisp/eshell/esh-io-tests.el (esh-io-test/redirect-all/overwrite, esh-io-test/redirect-all/append) (esh-io-test/redirect-all/insert, esh-io-test/redirect-copy) (esh-io-test/redirect-copy-first, esh-io-test/redirect-pipe): New tests. * doc/misc/eshell.texi (Redirection): Document new redirection syntax. (Pipelines): Document '|&' syntax. (Bugs and ideas): Update item about redirection syntax. * etc/NEWS: Announce this change.
* | Simplify Eshell handle functions and add tests/documentationJim Porter2022-09-044-19/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/esh-arg.el (eshell-parse-argument-hook): Explain how to use 'eshell-finish-arg'. * lisp/eshell/esh-io.el (eshell-create-handles): Only call 'eshell-get-target' for stderr if necessary. (eshell-protect-handles): Use 'dotimes'. (eshell-set-output-handle): Pass HANDLES and fix an edge case with setting a duplicate TARGET. * test/lisp/eshell/eshell-tests-helpers.el (eshell-with-temp-buffer): New macro. * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/quoted-lisp-form) (esh-cmd-test/backquoted-lisp-form) (esh-cmd-test/backquoted-lisp-form/splice): New tests. * test/lisp/eshell/eshell-tests.el (eshell-test/redirect-buffer) (eshell-test/redirect-buffer-escaped): Move to... * test/lisp/eshell/esh-io-tests.el: ... here, and add other I/O tests. * doc/misc/eshell.texi (Arguments): Add documentation for special argument types. (Input/Output): Expand documentation for redirection and pipelines.
* | Mark some filenotify tests unstable on EMBALars Ingebrigtsen2022-09-041-2/+6
| | | | | | | | | | | | * test/lisp/filenotify-tests.el (file-notify-test03-events) (file-notify-test09-watched-file-in-watched-dir): Mark as unstable on EMBA, because they seem to fail regularly.
* | Fix rx forms in TrampMichael Albinus2022-09-042-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-echoed-echo-mark-regexp) (tramp-login-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-antispoof-regexp) (tramp-build-completion-file-name-regexp) (tramp-debug-outline-regexp) (tramp-use-absolute-autoload-file-names) (tramp-lock-file-info-regexp, tramp-shell-quote-argument): * lisp/net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls) * lisp/net/tramp-cache.el (tramp-flush-file-function): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp) (info-lookup-maybe-add-help): * lisp/net/tramp-sh.el (tramp-default-user-alist, tramp-sunos-unames) (tramp-scp-direct-remote-copying, tramp-get-remote-locale): * lisp/net/tramp-smb.el (tramp-smb-prompt, tramp-smb-wrong-passwd-regexp) (tramp-smb-errors, tramp-smb-get-localname) (tramp-smb-read-file-entry): Simplify rx forms. * lisp/net/tramp.el (tramp-handle-find-backup-file-name) (tramp-handle-lock-file, tramp-handle-make-auto-save-file-name): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times) (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes-with-gvfs-ls-regexp): * lisp/net/tramp-sh.el (tramp-open-shell, tramp-find-shell): Do not use `eval-when-compile'. * lisp/net/tramp-cmds.el (tramp-rename-files, tramp-rename-these-files): Use rx. * lisp/net/tramp-gvfs.el (tramp-gvfs-password-tcrypt): New defonst. (tramp-gvfs-handle-file-attributes): Use `number-to-string'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test17-insert-directory): * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory) (tramp--test-share-p): Simplify rx forms.