summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Allow creating processes where only one of stdin or stdout is a PTYJim Porter2022-08-051-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (emacs_spawn): * src/callproc.c (emacs_spawn): Add PTY_IN and PTY_OUT arguments to specify which streams should be set up as a PTY. (call_process): Adjust call to 'emacs_spawn'. * src/process.h (Lisp_Process): Replace 'pty_flag' with 'pty_in' and 'pty_out'. * src/process.c (is_pty_from_symbol): New function. (make-process): Allow :connection-type to be a cons cell, and allow using a stderr process with a PTY for stdin/stdout. (create_process): Handle creating a process where only one of stdin or stdout is a PTY. * lisp/eshell/esh-proc.el (eshell-needs-pipe, eshell-needs-pipe-p): Remove. (eshell-gather-process-output): Use 'make-process' and set ':connection-type' as needed by the value of 'eshell-in-pipeline-p'. * lisp/net/tramp.el (tramp-handle-make-process): * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't signal an error when ':connection-type' is a cons cell. * test/src/process-tests.el (process-test-sentinel-wait-function-working-p): Allow passing PROC in, and rework into... (process-test-wait-for-sentinel): ... this. (process-test-sentinel-accept-process-output) (process-test-sentinel-sit-for, process-test-quoted-batfile) (process-test-stderr-filter): Use 'process-test-wait-for-sentinel'. (make/process/test-connection-type): New function. (make-process/connection-type/pty, make-process/connection-type/pty-2) (make-process/connection-type/pipe) (make-process/connection-type/pipe-2) (make-process/connection-type/in-pty) (make-process/connection-type/out-pty) (make-process/connection-type/pty-with-stderr-buffer) (make-process/connection-type/out-pty-with-stderr-buffer): New tests. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test--detect-pty-cmd): New variable. (esh-proc-test/pipeline-connection-type/no-pipeline) (esh-proc-test/pipeline-connection-type/first) (esh-proc-test/pipeline-connection-type/middle) (esh-proc-test/pipeline-connection-type/last): New tests. * doc/lispref/processes.texi (Asynchronous Processes): Document new ':connection-type' behavior. (Output from Processes): Remove caveat about ':stderr' forcing 'make-process' to use pipes. * etc/NEWS: Announce this change (bug#56025).
* Fix namespace problem in saveplace.elStefan Kangas2022-08-051-1/+1
| | | | | | * lisp/saveplace.el (save-place-load-alist-from-file): Rename from 'load-save-place-alist-from-file'. Retain old name as an obsolete alias. Update callers.
* * test/lisp/env-tests.el: New file.Stefan Kangas2022-08-051-0/+40
|
* Move netrc tests to auth-source-tests.elLars Ingebrigtsen2022-08-045-67/+25
|
* Fix Tramp testMichael Albinus2022-08-041-1/+1
| | | | | | * test/lisp/net/tramp-tests.el (tramp-test48-unload): Ignore autoload functions in `tramp-file-name' structure tests, since `tramp-file-name-handler' is also autoloaded.
* Reorganize TrampMichael Albinus2022-08-031-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-write-region): Handle special case that START is "". (tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-adb-handle-make-process): Use `with-tramp-saved-connection-properties'. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Use `tramp-archive-handle-file-exists-p'. (tramp-archive-handle-file-exists-p): New defun. (tramp-archive-file-name-handler): Add ;;;###tramp-autoload cookie. * lisp/net/tramp-cache.el (tramp-compat, tramp-loaddefs) (time-stamp): Require. (tramp-get-file-property, tramp-set-file-property) (tramp-flush-file-property, tramp-flush-file-upper-properties) (tramp-flush-file-properties): Use `tramp-file-name-unify'. Adapt message. (tramp-flush-directory-properties): Simplify. (tramp-flush-file-function): Add ;;;###tramp-autoload cookie. Don't use `with-parsed-tramp-file-name', it isn't exposed. (with-tramp-file-property, with-tramp-connection-property) (with-tramp-saved-connection-property): Macros moved from tramp.el. (with-tramp-saved-file-property) (with-tramp-saved-file-properties) (with-tramp-saved-connection-properties): New defmacros. * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Flush "/". * lisp/net/tramp-crypt.el (tramp-crypt-handle-set-file-modes) (tramp-crypt-handle-set-file-times) (tramp-crypt-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-ftp.el (tramp-archive-file-name-handler): Don't declare. * lisp/net/tramp-gvfs.el (tramp-gvfs-info): New defun. (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file, tramp-gvfs-get-root-attributes) (tramp-gvfs-handle-make-directory): Use it. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Expand TARGET when flushing file properties. (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-sh-handle-file-name-all-completions): Protect, when connection is not established yet. (tramp-do-copy-or-rename-file-directly): Flush file properties of NEWNAME when constructing a new remote file name. (tramp-do-copy-or-rename-file-out-of-band, tramp-sh-handle-make-process): Use `with-tramp-saved-connection-properties'. (tramp-sh-handle-delete-file): Flush file properties only after deleting, otherwise we get a false alarm. (tramp-sh-handle-process-file): Flush "/". (tramp-sh-handle-write-region): Handle special case that START is "". * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process): Use `with-tramp-saved-connection-properties'. (tramp-smb-remote-acl-p): New defun. (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl): Use it. (tramp-smb-handle-set-file-modes): Use `tramp-skeleton-set-file-modes-times-uid-gid'. (tramp-smb-handle-process-file, tramp-smb-maybe-open-connection): Flush "/". * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file): Flush "/". (tramp-sshfs-handle-set-file-modes) (tramp-sshfs-handle-set-file-times): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes) (tramp-sudoedit-handle-set-file-times) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-skeleton-set-file-modes-times-uid-gid'. * lisp/net/tramp.el (tramp-archive-file-name-handler): Don't declare. (tramp-verbose, tramp-file-name-unify, tramp-tramp-file-p) (tramp-file-local-name, tramp-dissect-file-name) (tramp-make-tramp-file-name, tramp-get-connection-buffer) (tramp-get-buffer-string, tramp-debug-message) (tramp-inhibit-progress-reporter, tramp-message): Add ;;;###tramp-autoload cookie. (tramp-file-name): Expose defstruct to tramp-loaddefs.el (tramp-file-name-unify): New optional arg FILE. (tramp-get-default-directory, tramp-get-buffer-string) (tramp-message, tramp-backtrace, tramp-error-with-buffer) (tramp-with-demoted-errors, tramp-barf-if-file-missing) (tramp-skeleton-copy-directory, tramp-skeleton-delete-directory) (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-file-local-copy, tramp-skeleton-write-region): Remove `tramp-suppress-trace' property, it isn't needed for defmacros and defsubsts. (with-tramp-file-property, with-tramp-connection-property) (with-tramp-saved-connection-property): Move macros to tramp-cache.el. (tramp-skeleton-directory-files-and-attributes): Fix implementation. (tramp-skeleton-file-local-copy): Fix docstring. (tramp-skeleton-set-file-modes-times-uid-gid): New defmacro. (tramp-skeleton-write-region): Set "file-exists-p" cache property. (tramp-handle-file-exists-p): Use cached value. (tramp-process-sentinel): Flush "/". (tramp-make-tramp-temp-file): Suppress also `tramp-smb-remote-acl-p'. (tramp-get-connection-buffer): * test/lisp/net/tramp-tests.el (tramp-test10-write-region) (tramp-test20-file-modes, tramp-test22-file-times): Extend tests.
* Add face to mouse buttons in command substitutionsStefan Kangas2022-08-031-1/+3
| | | | | | | | * lisp/help.el (substitute-command-keys): Add help-key-binding face to mouse buttons in literal key substitutions. * test/lisp/help-tests.el (help-tests-substitute-command-keys/literal-key-sequence): Expand test for above change.
* Consider built-in packages to be installedMatt Armstrong2022-08-021-0/+15
| | | | | * lisp/emacs-lisp/package.el (package-installed-p): Check for built-in packages before initialization. (bug#56877).
* Add tests for url-{hexify,unhex}-stringStefan Kangas2022-08-021-0/+20
| | | | | * test/lisp/url/url-util-tests.el (url-unhex-string-tests) (url-hexify-string-tests): New tests.
* ; Use values instead of trying to ignore themMattias Engdegård2022-07-311-5/+8
| | | | | | | | * test/lisp/subr-tests.el (test-print-unreadable-function): * test/src/print-tests.el (test-print-unreadable-function-buffer): Instead of binding the value of nominally side-effect-free expressions to an ignored variable (_), make use of them. This is more robust and provides useful extra checks in the test.
* ; Silence byte-compiler in two testsStefan Kangas2022-07-311-1/+2
| | | | | | * test/lisp/subr-tests.el (test-print-unreadable-function): * test/src/print-tests.el (test-print-unreadable-function-buffer): Pacify byte-compiler.
* Move a test from subr-tests to print-testsLars Ingebrigtsen2022-07-301-10/+0
|
* ; * test/lisp/subr-tests.el (string-comparison-test): Add more tests.Eli Zaretskii2022-07-281-0/+2
|
* a couple more `string-equal-ignore-case' test casesSam Steingold2022-07-281-0/+2
|
* Convert ffap comments to testsStefan Kangas2022-07-281-0/+19
| | | | | * test/lisp/ffap-tests.el (ffap-file-remote-p, ffap-machine-p): New tests.
* Add support for user-customizable iconsLars Ingebrigtsen2022-07-281-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Specific Customization): Mention it. * doc/emacs/display.texi (Icons): New node. * doc/lispref/display.texi (Icons): New node. * lisp/button.el (buttonize): (button--properties, buttonize-region): Allow not overriding faces. * lisp/cus-edit.el (custom-save-all): Save icons. (custom-icon): New widget. (custom-icon-value-create, custom-toggle-hide-icon) (custom--icons-widget-value, custom-icon-set): Helper functions for the widget. (customize-icon): Main command. (custom-icon-state-set, custom-icon-state): Helper functions. (custom-theme-set-icons): Function to be used by theme writers. (custom-set-icons): Function to be used in .emacs. (custom-save-icons): New function. * lisp/custom.el (custom-push-theme): Add icons. * lisp/emacs-lisp/icons.el: New file. * test/lisp/emacs-lisp/icons-tests.el: Add some tests.
* Ensure that we don't call print-unreadable-function from " prin1"Lars Ingebrigtsen2022-07-281-0/+10
| | | | | | | | * src/print.c (PRINTPREPARE): Bind the current buffer so that we can retrieve it later. (print_vectorlike): Use it (bug#56773). (syms_of_print): New internal `print--unreadable-callback-buffer' variable.
* New test ffap-replace-file-componentStefan Kangas2022-07-281-0/+5
| | | | * test/lisp/ffap-tests.el (ffap-replace-file-component): New test.
* Remove Tramp instrumentationMichael Albinus2022-07-271-12/+3
|
* Further Tramp instrumentationMichael Albinus2022-07-271-1/+1
| | | | | ; * test/infra/test-jobs.yml (test-lisp-net-inotify): ; Revert instrumentation.
* Avoid mutating default value of erc-server-last-peersF. Jason Park2022-07-271-0/+82
| | | | | | | | | | | | * lisp/erc/erc-backend.el (erc-server-last-peers): Leave default as nil instead of a quoted constant. (erc-server-connect): Initialize `erc-server-last-peers' to a new value local to a server buffer. (erc-message): Operate on server's local `erc-server-last-peers' value instead of the global default. Prefer replacing value instead of mutating CDR to make for easier testing. (erc-server-PRIVMSG): Create a new `erc-server-last-peers' for easier testing. (Bug#56449)
* Fix CTCP regression in erc-server-PRIVMSGF. Jason Park2022-07-273-0/+65
| | | | | | | | | | | * lisp/erc/erc-backend.el (erc-server-PRIVMSG): Don't create a query buffer for non-ACTION CTCP messages. * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-dcc-chat-accept): Add test for basic DCC CHAT accept dialog. * test/lisp/erc/resources/dcc/chat/accept-dcc.eld: New file. * test/lisp/erc/resources/dcc/chat/accept.eld: New file.
* Allow non-IRC line delimiters with ERC test serverF. Jason Park2022-07-273-28/+72
| | | | | | | | | | | | | * test/lisp/erc/resources/erc-d/erc-d.el (erc-d-server-fqdn, erc-d--initialize-client, erc-d--log, erc-d--send, erc-d--filter, erc-d-run): Add new variable and use it. Also optionally accept keyword arguments in `erc-d-run'. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-direct-foreign-protocol): Add test demoing newline-only line-wise protocol. * test/lisp/erc/resources/erc-d/resources/foreign.eld: New file.
* ; Instrument Tramp testsMichael Albinus2022-07-271-1/+9
| | | | | ; * test/infra/test-jobs.yml (test-lisp-net-inotify): Run expensive. ; * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Instrument.
* Update test-print-unreadable-function after fixLars Ingebrigtsen2022-07-271-1/+0
| | | | | * test/lisp/subr-tests.el (test-print-unreadable-function): Update test after fix.
* Add a test for python-mode comment/else problemLars Ingebrigtsen2022-07-271-0/+29
| | | | Based on a patch from kobarity <kobarity@gmail.com>
* string-equal-ignore-case: new functionSam Steingold2022-07-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add `string-equal-ignore-case'. * lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'. * lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise. * lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'. * lisp/files.el (file-truename): Use `string-equal-ignore-case'. (file-relative-name): Likewise. * lisp/gnus/gnus-art.el (article-hide-boring-headers): Use `string-equal-ignore-case' instead of `gnus-string-equal'. * lisp/gnus/gnus-util.el (gnus-string-equal): Remove, use `string-equal-ignore-case' instead. * lisp/international/mule-cmds.el (describe-language-environment): Use `string-equal-ignore-case'. (locale-charset-match-p): Likewise. * lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'. * lisp/minibuffer.el (completion--string-equal-p): Remove, use `string-equal-ignore-case' instead. (completion--twq-all): Use `string-equal-ignore-case'. (completion--do-completion): Likewise. * lisp/net/browse-url.el (browse-url-default-windows-browser): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/org/ob-core.el (org-babel-results-keyword): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (org-babel-insert-result): Likewise. * lisp/org/org-compat.el (string-equal-ignore-case): Define unless defined already. (org-mode-flyspell-verify): Use `string-equal-ignore-case'. * lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise. * lisp/org/ox.el (org-export-resolve-radio-link): Use `string-equal-ignore-case' and `string-clean-whitespace'. * lisp/progmodes/flymake-proc.el (flymake-proc--check-patch-master-file-buffer): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag): Use `string-equal-ignore-case' instead of explicit `compare-strings'. * lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'. (string-equal-ignore-case): Compare strings ignoring case. * lisp/textmodes/bibtex.el (bibtex-string=): Remove. (bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry) (bibtex-print-help-message, bibtex-validate, bibtex-validate-globally) (bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url): Use `string-equal-ignore-case' instead of `bibtex-string='. * lisp/textmodes/sgml-mode.el (sgml-get-context): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (sgml-calculate-indent): Likewise * test/lisp/subr-tests.el (string-comparison-test): Add tests for `string-equal-ignore-case'.
* Add a test for print-unreadable-functionLars Ingebrigtsen2022-07-261-1/+10
| | | | | * test/lisp/subr-tests.el (test-print-unreadable-function): Add failing test (bug#56773).
* Add duplicate-dwim (bug#56418)Mattias Engdegård2022-07-261-0/+38
| | | | | | | | | | | | Like duplicate-line but duplicates the region instead if active. Rectangular regions are duplicated on the right-hand side. The region remains active afterwards, to facilitate further duplication or other operations on the same text. * lisp/rect.el (rectangle--duplicate-right): * lisp/misc.el (duplicate-dwim): New. * test/lisp/misc-tests.el (misc--duplicate-dwim): New test. * etc/NEWS: Announce.
* ; * test/lisp/net/tramp-tests.el (tramp--test-enabled): fix regexpMattias Engdegård2022-07-251-1/+1
|
* Fix regexp in tramp-tests.elMichael Albinus2022-07-251-1/+1
| | | | | * test/lisp/net/tramp-tests.el (tramp--test-enabled): Fix regexp for Tramp test files.
* ; Instrument tramp-tests.elMichael Albinus2022-07-251-1/+2
|
* Fix typo in x-dnd-tests.elPo Lu2022-07-251-2/+2
| | | | | * test/lisp/x-dnd-tests.el (x-begin-drag): Avoid extra leading / in file names. (bug#56712)
* Refactor TrampMichael Albinus2022-07-242-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-adb-handle-get-remote-gid' and `tramp-adb-handle-get-remote-uid'. (tramp-adb-handle-file-attributes): Use `tramp-convert-file-attributes'. (tramp-do-parse-file-attributes-with-ls): Remove ID-FORMAT. (tramp-adb-handle-directory-files-and-attributes): Use `tramp-skeleton-directory-files-and-attributes'. (tramp-adb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-adb-handle-copy-file, tramp-adb-handle-rename-file): Use `tramp-barf-if-file-missing'. (tramp-adb-handle-get-remote-uid) (tramp-adb-handle-get-remote-gid): New defuns. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Use `tramp-archive-handle-directory-files'. (tramp-archive-handle-directory-files): New defun. * lisp/net/tramp-cache.el (tramp-file-property-p): New defun. * lisp/net/tramp-compat.el (tramp-compat-take): New defalias. * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-crypt-handle-directory-files): Use `tramp-skeleton-directory-files'. * lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files): Use `tramp-skeleton-directory-files'. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. * lisp/net/tramp-sh.el (tramp-readlink-file-truename) (tramp-stat-file-attributes) (tramp-stat-directory-files-and-attributes): New defconsts. (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Adapt. (tramp-sh-handle-make-symbolic-link): Flush TARGET file properties. (tramp-sh-handle-file-truename): Use `tramp-readlink-file-truename' (tramp-sh-handle-file-exists-p) (tramp-sh-handle-file-executable-p) (tramp-sh-handle-file-readable-p) (tramp-sh-handle-file-directory-p) (tramp-sh-handle-file-writable-p): Adapt check of file properties. (tramp-sh-handle-file-attributes): Simplify. (tramp-do-file-attributes-with-ls): Remove ID-FORMAT. Combine two remote commands. Compute both versions of uid and gid together. (tramp-do-file-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-perl): Remove ID-FORMAT. (tramp-do-file-attributes-with-stat): Remove ID-FORMAT. Use `tramp-stat-file-attributes'. (tramp-sh-handle-directory-files-and-attributes): Use `tramp-skeleton-directory-files-and-attributes'. (tramp-do-directory-files-and-attributes-with-stat): Remove ID-FORMAT. Use `tramp-stat-directory-files-and-attributes'. (tramp-sh-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-sh-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-sh-handle-write-region): Combine two remote commands. (tramp-sh-gio-monitor-process-filter): Simplify `cond' call. (tramp-expand-script): Extend for ls, readling and stat. (tramp-open-connection-setup-interactive-shell): Do not set `tramp-end-of-output'. (tramp-open-connection-setup-interactive-shell): Do not send prompt formatting command, it's superfluous. (tramp-send-command-and-check): Rearrange in order to accept also heredoc scripts. (tramp-convert-file-attributes): Move function to tramp.el. (tramp-get-remote-id): Set connection property. (tramp-get-remote-uid-with-id): Use it. (tramp-get-remote-python): Don't check for python2 anymore. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use `tramp-handle-directory-files'. (tramp-smb-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-smb-handle-directory-files): Remove. (tramp-smb-handle-file-attributes): Use `tramp-convert-file-attributes'. (tramp-smb-do-file-attributes-with-stat): Remove ID-FORMAT. (tramp-smb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'. (tramp-sudoedit-file-attributes): New defconst. (tramp-sudoedit-handle-file-attributes): Simplify code. * lisp/net/tramp.el (tramp-setup-debug-buffer): Set debug buffer as not modified. (tramp-barf-if-file-missing, tramp-skeleton-copy-directory) (tramp-skeleton-directory-files) (tramp-skeleton-directory-files-and-attributes) (tramp-skeleton-file-local-copy): New macros. (tramp-handle-copy-directory): Use `tramp-skeleton-copy-directory'. (tramp-handle-directory-files): Use `tramp-skeleton-directory-files'. (tramp-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'. (tramp-handle-insert-file-contents): Use `tramp-barf-if-file-missing'. (tramp-get-process-attributes, tramp-action-out-of-band): Simplify `cond' call. (tramp-check-cached-permissions): Simplify. (tramp-make-tramp-temp-file): Reimplement. * test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit): Don't set. * test/lisp/net/tramp-tests.el (tramp--test-enabled): Remove superfluous test files. (tramp-test21-file-links): Protect file name deletion.
* Throw errors in XDS handler directlyPo Lu2022-07-241-1/+4
| | | | | | | | | * lisp/x-dnd.el (x-dnd-xds-testing): New defvar. (x-dnd-handle-direct-save): Signal errors directly if it is true. * test/lisp/x-dnd-tests.el (x-dnd-xds-testing): New defvar. (x-dnd-tests-do-direct-save-internal): Bind it to t around x-begin-drag. (bug#56712)
* Fix `lsh` warning shortcomings (bug#56641)Mattias Engdegård2022-07-231-17/+19
| | | | | | | | | | | | | Reported by Basil Contovounesios. * etc/NEWS: Mention how to suppress the warning. * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Amend doc string. * lisp/subr.el: Use `macroexp-warn-and-return` to delay the warning until codegen time (which makes it suppressible) and to prevent repeated warnings. * test/lisp/international/ccl-tests.el (shift): * test/src/data-tests.el (data-tests-ash-lsh): Suppress warning in tests of `lsh` itself.
* Fix Python navigation problem with a line continuation using backslashkobarity2022-07-231-0/+26
| | | | | * lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix line continuation using backslash in nested defun (bug#56615).
* Fix off-by-one error in string-truncate-leftLars Ingebrigtsen2022-07-231-0/+5
| | | | | * lisp/emacs-lisp/subr-x.el (string-truncate-left): Fix off-by-one error (bug#56685).
* Fix srcset parsing in shrLars Ingebrigtsen2022-07-231-0/+15
| | | | | | * lisp/net/shr.el (shr--preferred-image): Factor out srcset parsing for easier testing. (shr--parse-srcset): Don't misparse URLs with commas in them.
* Merge from origin/emacs-28Stefan Kangas2022-07-231-3/+3
|\ | | | | | | | | | | | | | | | | | | | | ae1ace1cf4 Adjust help-fns.el tests for recent change 04bdcf4aaa * src/terminal.c (Fframe_terminal): Use active voice 7fa491a9e9 Improve 'terminal-live-p' docstring some more b9ac8c29ae Improve terminal-live-p docstring 0b4c81a152 * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): F... 8f8373170f * lisp/progmodes/cperl-mode.el: Don't mention obsolete arc... 25bc330a6d Make 'describe-function' say "byte-compiled" when appropriate 2b31e667be ;Improve documentation of locale-specific string comparison
| * Adjust help-fns.el tests for recent changeStefan Kangas2022-07-231-3/+3
| | | | | | | | | | * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun) (help-fns-test-lisp-defsubst): Adjust tests for recent change.
* | Merge from origin/emacs-28Stefan Kangas2022-07-201-6/+6
|\| | | | | | | | | | | | | cb911febc6 ; Fix typos # Conflicts: # test/lisp/net/tramp-tests.el
| * ; Fix typosStefan Kangas2022-07-191-6/+6
| |
* | Speed up `butlast`Mattias Engdegård2022-07-191-0/+17
| | | | | | | | | | | | * lisp/subr.el (butlast): Don't duplicate the removed part. * test/lisp/subr-tests.el (subr-tests--butlast-ref, subr-butlast): Add test.
* | Adapt Tramp new test macrosMichael Albinus2022-07-181-0/+3
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat) (tramp--test-deftest-with-perl, tramp--test-deftest-with-ls): Skip for all methods but those from tramp-sh.el.
* | Speed up `seq-subseq` for lists (bug#56521)Mattias Engdegård2022-07-181-1/+28
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-subseq): Make faster by using `take` instead of a lisp loop, and more importantly by not front-loading the error text formatting. * test/lisp/emacs-lisp/seq-tests.el (seq-tests--list-subseq-ref) (test-seq-subseq): Test `seq-subseq` for lists more thoroughly.
* | Merge from origin/emacs-28Stefan Kangas2022-07-172-6/+6
|\| | | | | | | | | f5218385c0 Fix obsoletion of nntp-authinfo-file 10b6919870 ; Fix typos
| * ; Fix typosStefan Kangas2022-07-162-6/+6
| |
* | Fix python navigation problem with an empty line in nested defunkobarity2022-07-161-2/+32
| | | | | | | | | | * lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix bug when point is on an empty line (bug#56600).
* | Comment docstrings in tramp-test macrosMichael Albinus2022-07-161-22/+12
| | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat) (tramp--test-deftest-with-perl, tramp--test-deftest-with-ls) (tramp--test-deftest-direct-async-process): Comment docstring, it doesn't work this way. Use `tramp-test-vec' if appropriate.