summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Mark proced-refine-with-update-test :unstable (bug#63550)Mattias Engdegård2023-05-171-0/+1
| | | | | | * test/lisp/proced-tests.el (proced-refine-with-update-test): This test seems racy and often fails randomly in parallel `make check`.
* Add :vc keyword to use-package for VC package supportTony Zorman2023-05-161-0/+54
| | | | | | | | | | | | | | | | | | | | | | * lisp/use-package/use-package-core.el (use-package-keywords): Add :vc. (use-package-handler/:load-path): Insert 'load-path' into 'state'. (use-package-vc-install): Install the package with package-vc.el. (use-package-handler/:vc): Handler for the :vc keyword. (use-package-normalize--vc-arg): Normalization for more complex arguments to 'use-package-normalize/:vc', in order to make them compatible with the specification of 'package-vc-selected-packages'. (use-package-normalize/:vc): Normalizer for the :vc keyword. (use-package): Document :vc. * lisp/use-package/use-package-ensure.el (use-package-handler/:ensure): Do not ensure a package when :vc is used in the declaration. * test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1): (use-package-test/:vc-2): (use-package-test/:vc-3): (use-package-test/:vc-4): (use-package-test/:vc-5): (use-package-test-normalize/:vc): Add tests for :vc. * etc/NEWS: Mention change. (Bug#60418)
* Tweak tramp-test45-asynchronous-requestsMichael Albinus2023-05-161-0/+12
| | | | | | * test/lisp/net/tramp-tests.el (tramp-use-connection-share): Declare. (tramp--test-putty-p): New defun. (tramp-test45-asynchronous-requests): Tweak test.
* Fix some minor Tramp problemsMichael Albinus2023-05-151-2/+11
| | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-handle-file-exists-p): New defun. (tramp-crypt-file-name-handler-alist): Add it. * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): Flush proper file properties. * test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs28-p): New defun. (tramp-archive-test48-auto-load): Extend test.
* Optionally add spacing between ERC messagesF. Jason Park2023-05-132-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | * etc/ERC-NEWS: Mention option `erc-fill-line-spacing'. * lisp/erc/erc-fill.el (erc-fill-line-spacing, erc-fill-spaced-commands): Add options to allow for extra spacing between messages. (erc-fill--function): Internal var allowing modules to override user option `erc-fill-function'. (erc-fill): Add extra line-spacing on certain types of messages. Prefer `erc-fill--function', when set, over `erc-fill-function'. (erc-fill--make-module-dependency-msg, erc-fill--wrap-ensure-dependencies): Rename former to latter and make more useful. (erc-fill-wrap-mode, erc-fill-wrap-enable, erc-fill-wrap-disable): Refactor. (erc-fill--wrap-fix): Remove unused function. (erc-fill-wrap-nudge): Remove reference to nonexistent function in doc string. * test/lisp/erc/erc-fill-tests.el: (erc-fill-tests--graphic-dir): New variable. (erc-fill-tests--compare): Look in `erc-fill-tests--graphic-dir' for graphical snapshots ignored by Git. (erc-fill-line-spacing): New test. * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: New file. (Bug#60936)
* Add helper for restoring local session vars in ERCF. Jason Park2023-05-132-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-common.el (erc--input-split): Suppress warning for obsolete variable `erc-send-this' in init form. * lisp/erc/erc-goodies.el (erc--keep-place-indicator-setup): Use macro `erc--restore-initialize-priors' to preserve last session's indicator position, if any. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Use convenience function to show missing-dependency notice. * lisp/erc/erc-sasl.el (erc-sasl-auth-source-password-as-host): Merge redundant `when' forms for clarity. (erc-sasl--init): Remove unused function. (erc-sasl-mode, erc-sasl-enable): Use helper to restore `erc-sasl--options', essentially inlining the body of the now defunct `erc-sasl--init'. * lisp/erc/erc.el (erc--restore-initialize-priors): New macro to help local modules and mode hooks prefer existing state over initializing anew. (erc--warn-once-before-connect): Add helper function to display an "error notice" just after module setup. (erc-accidental-paste-threshold-seconds) Improve doc string. * test/lisp/erc/erc-goodies-tests.el (erc-controls-highlight--examples, erc-controls-highlight--inverse, erc-controls-highlight--motd, erc-keep-place-indicator-mode): Remove feature check. For the latter, also start fake process and shadow `erc-connect-pre-hook'. * test/lisp/erc/erc-tests.el (erc--restore-initialize-priors): New test. Also see test/lisp/erc/erc-scenarios-base-local-modules.el for a more realistic exercising of this functionality. (Bug#60936)
* Don't mutate constants in testsMattias Engdegård2023-05-138-17/+19
| | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet): * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-ellipsis-circular): * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-persist-interior-lists): * test/lisp/textmodes/reftex-tests.el (reftex-all-used-citation-keys): * test/src/xdisp-tests.el (xdisp-tests--minibuffer-resizing): * test/src/fns-tests.el (test-vector-delete): Mutate created objects, not constants. * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-test-add-display-text-property): Mutate a created string, and compare using `equal-including-properties` without which the test was rather meaningless. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test16-directory-files): Don't mutate.
* Use `mutate-constant` as warning identifierMattias Engdegård2023-05-131-5/+5
| | | | | | | | | | | * etc/NEWS: * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings) (byte-compile-form): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test--with-suppressed-warnings): Use the new warning name `mutate-constant` instead of using the somewhat overloaded `suspicious`.
* Byte-compiler warning about mutation of constant valuesMattias Engdegård2023-05-131-0/+30
| | | | | | | | | | | | | | | | | | When we can easily detect mutation of constants (quoted lists, strings and vectors), warn. For example, (setcdr '(1 . 2) 3) (nreverse [1 2 3]) (put-text-property 0 3 'face 'highlight "moo") Such code can result in surprising behaviour and problems that are difficult to debug. * lisp/emacs-lisp/bytecomp.el (byte-compile-form, mutating-fns): Add the warning and a list of functions to warn about. * etc/NEWS: Announce. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test--with-suppressed-warnings): Add test cases.
* Fix files-tests broken by a recent changeEli Zaretskii2023-05-121-1/+1
| | | | | | | * test/lisp/files-tests.el (files-tests-safe-local-variable-directories): Fix this test: since we are now using 'file-equal-p' the directory used as a safe one should actually exist. (Bug#61901)
* Add safe-local-variable-directories variable.Antero Mejr2023-05-111-0/+21
| | | | | | | | | | | | | | | | | This variable can be set to automatically load risky dir-local variables from a list of trusted directories. * lisp/emacs-lisp/files.el (safe-local-variable-directories, hack-local-variables-filter, hack-local-variables-confirm): New variable and associated logic. * test/lisp/files-tests.el (files-tests-safe-local-variable-directories): Add tests for same. * doc/emacs/custom.texi (Safe File Variables): Add documentation for same. * doc/lispref/variables.texi (File Local Variables): Add documentation for same. * etc/NEWS (Lisp Changes in Emacs 30.1): Add news entry for same. (Bug#61901)
* Clean up files created by arc-mode-testsMattias Engdegård2023-05-101-13/+25
| | | | | * test/lisp/arc-mode-tests.el (arc-mode-test-zip-ensure-ext): Remove created files at the end of the test.
* ; * test/src/treesit-tests.el: declare functions to silence warningsMattias Engdegård2023-05-091-0/+3
|
* Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsDmitry Gutov2023-05-0613-178/+1289
|\
| * Revise FORM-as-function interface in erc-button-alistF. Jason Park2023-05-051-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-button.el (erc-button-alist): Remove redundant "<URL: foo>" entry, which adds nothing beyond highlighting the surrounding bookends at the expense of doubling up on face properties for no reason. Revise the FORM-as-function interface by removing the dynamic binding of face options and treating all implementers as replacements for `erc-button-add-button'. (erc-button--maybe-warn-arbitrary-sexp): Make more robust by having it handle all accepted FORM types other than booleans. (erc-button-add-buttons-1): Rework to only check FORM field once. (erc-button--substitute-command-keys-in-region, erc-button--display-error-with-buttons): Rename former as latter and change signature to conform to new `erc-button-add-buttons' interface. (erc-button--display-error-notice-with-keys): Call renamed helper. * test/lisp/erc/erc-button-tests.el (erc-button-alist--url, erc-button-tests--form, erc-button-tests--some-var, erc-button-tests--erc-button-alist--function-as-form, erc-button-alist--function-as-form, erc-button-tests--erc-button-alist--nil-form, erc-button-alist---nil-form): Add tests and helpers. (Bug#60933)
| * Preprocess prompt input linewise in ERCF. Jason Park2023-05-051-5/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/ERC-NEWS: Mention revised role of `erc-pre-send-functions' relative to line splitting. * lisp/erc/erc-common.el (erc-input): Add new slot `refoldp' to allow `erc-pre-send-functions' members to indicate that splitting should occur a second time after all members have had their say. (erc--input-split): Specify some defaults for overridden slots and explicitly declare some types for good measure. * lisp/erc/erc-goodies.el (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Replace `erc-pre-send-functions' with `erc--input-review-functions'. * lisp/erc/erc-ring.el (erc-ring-enable, erc-ring-disable, erc-ring-mode): Subscribe to `erc--input-review-functions' instead of `erc-pre-send-functions' for `erc--add-to-input-ring'. * lisp/erc/erc.el (erc-pre-send-functions): Note some nuances regarding line splitting in doc string and note that a new slot is available. (erc--pre-send-split-functions, erc--input-review-functions): Rename former to latter, while also obsoleting. Remove large comment. Add new default member `erc--run-input-validation-checks'. (erc-send-modify-hook): Replace the obsolete `erc-send-pre-hook' and `erc-send-this' with `erc-pre-send-functions' in doc string. (erc--check-prompt-input-for-excess-lines): Don't trim trailing blanks. Rework to also report overages in characters as well as lines. (erc--run-input-validation-hooks): New function to adapt an `erc--input-split' object to `erc--check-prompt-input-functions'. (erc-send-current-line): Run `erc--input-review-functions' in place of the validation hooks they've subsumed. Call `erc--send-input-lines' instead of the now retired but not deprecated `erc-send-input'. (erc--run-send-hooks, erc--send-input-lines): New functions that together form an alternate version of `erc-send-input'. They operate on input linewise but make accommodations for older interfaces. * test/lisp/erc/erc-tests.el (erc-ring-previous-command): Replace `erc-pre-send-functions' with `erc--input-review-functions'. (erc-tests--with-process-input-spy): Shadow `erc--input-review-functions'. (erc-check-prompt-input-for-excess-lines): Don't expect trailing blanks to be trimmed. (erc--run-send-hooks): New test. (Bug#62947)
| * Redo line splitting for outgoing messages in ERCF. Jason Park2023-05-056-4/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-backend.el (erc--reject-unbreakable-lines): New variable, an escape hatch for somewhat regaining pre-5.6 line-splitting behavior. (erc--split-line): New utility function that doesn't rely on column-oriented filling. * lisp/erc/erc.el (erc--pre-send-split-functions): Append `erc--split-lines' to value. (erc--split-lines): New function to re-split current selection of lines. (erc-send-input): Hard-code line preparation instead of calling `erc--pre-send-split-functions', in order to bake in traditional behavior before move to "pre-splitting". * test/lisp/erc/erc-scenarios-base-split-line.el: New file. * test/lisp/erc/erc-tests.el (erc--split-line): New test. (erc-send-current-line): Don't expect a flood argument when interpreting a command because it's not passed along to the command's handler. This was previously misleading because it assigned undue significance to something that had no bearing on the fate of a command. * test/lisp/erc/resources/base/flood/ascii.eld: New file. * test/lisp/erc/resources/base/flood/koi8-r.eld: New file. * test/lisp/erc/resources/base/flood/utf-8.eld: New file. * test/lisp/erc/resources/erc-d/erc-d.el: Don't decode input. (Bug#62947)
| * Don't send multiline commands as messages in ERCF. Jason Park2023-05-051-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc.el (erc-command-regexp): Relocate from further down in same file. (erc--check-prompt-input-for-multiline-command): Reject slash commands containing multiple lines during input validation and before running additional hooks. (erc--discard-trailing-multiline-nulls): Don't mark input that begins with a possible "slash command" as constituting a plain message just because it has a trailing newline. It's relatively easy to add a newline by accident, which can result in the unintended sharing of a command line. Also, ERC already has a /SAY command that allows a user to send a message starting a literal command. * test/lisp/erc/erc-tests.el (erc-send-whitespace-lines): Fix test to expect validation error when non-blank lines follow a slash command. (Bug#62947)
| * Restore module var toggles in ERC's Custom buffersF. Jason Park2023-05-051-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-common.el (erc--neuter-custom-variable-state): Remove function. ERC famously toggles global minor-mode vars during normal operations, which adds noise to its customization buffers because `customize-variable-state' always sees an activated module's mode variable as having "CHANGED". To suppress this annoyance, a workaround was employed that used a dishonest `:get' function to simply return the "saved value," when present. While this improved the Customize experience, it also misled users, which likely wasn't justified. (erc--make-show-me-widget): Add helper to avoid forward declarations. (erc--prepare-custom-module-type): Don't deprive users of a working minor-mode toggle. (erc--find-feature): New function to guess the feature of a module's containing library. (define-erc-module): Remove `:get' keyword. Specify `:require' instead, whose value may be nil. Users who currently have mode vars in their `custom-file' won't be impacted by this addition because those `custom-set-variables' entries will still lack a REQUEST list and hence won't incur a startup penalty. And new users intent on using the toggle will hopefully do so with the knowledge they're opting in to requiring ERC on startup, which is not the case if they follow the recommended practice of using `erc-modules' instead. (erc-with-server-buffer): Inline `erc-server-buffer'. * test/lisp/erc/erc-tests.el (erc-process-input-line): Use helper. (define-erc-module--global): Change expected expansion. (Bug#60935)
| * Simplify erc-button movement commandsF. Jason Park2023-05-053-61/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/ERC-NEWS: Mention TAB being bound to new command `erc-tab' and `erc-previous-button' now stopping at the start of buttons. * lisp/erc/erc-button.el (erc-button-mode, erc-button-enable, erc-button-disable): Add and remove `erc-button-next' to `erc--tab-functions' hook, which is tantamount to binding the command in the read-only area of an ERC buffer. (erc-button-next-function): Deprecate and remove from client code path because this module doesn't concern itself with prompt input and thus no longer needs to conform to the `completion-at-point-functions' interface. (erc-button--prev-next-predicate-functions): New variable, a hook to determine whether to continue searching for a button. Other modules should utilize this as needed. (erc-button--end-of-button-p): Add function to serve as default value for `erc-button--continue-predicate'. (erc--button-next): Add generalized button-movement function. (erc-button-next, erc-button-previous): Make `erc-button-previous' behave more predictably by having it land at the beginning of buttons. And remove roundabout appeal to HOF in `erc-button-next'. (erc-button-previous-of-nick): New command to jump to previous appearance of nick at point. * lisp/erc/erc-fill.el (erc-fill-wrap, erc-fill-wrap-enable, erc-fill-wrap-disable): Add and remove merge-related hookee from `erc-button--prev-next-predicate-functions'. (erc-fill--wrap-merged-button-p): New function to detect redundant speakers. * lisp/erc/erc.el (erc-complete-functions): Quote TAB in doc string. (erc-mode-map): Bind `erc-tab' to TAB. (erc--tab-functions, erc-tab): Add new command and hook to serve as unified dispatch for TAB-related operations. It calls `c-a-p' in the input area and defers to module code in the read-only message area. * test/lisp/erc/erc-button-tests.el: New file. * test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate): Run finalizer for transient keymap timer. * test/lisp/erc/erc-tests.el (erc-button--display-error-notice-with-keys): Move to new dedicated test file for erc-button and fix expected behavior of `erc-button-previous'. (Bug#62834)
| * Ignore erc-reconnect-display after a timeoutF. Jason Park2023-05-051-45/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-backend.el (erc--server-reconnect-display-timer): New variable to store active timer that, upon firing, zeroes out `erc--server-last-reconnect-count'. (erc--server-last-reconnect-on-disconnect): New function to run on `erc-disconnected-hook'. (erc--server-last-reconnect-display-reset): New function to ensure the reconnect-display period ends. * lisp/erc/erc.el (erc-reconnect-display-timeout): New option to control how long `erc-reconnect-display' affects the displaying of new buffers following an automatic reconnection. (erc-process-input-line): Ensure user input marks the end of the reconnect-display period. (erc-cmd-JOIN): Don't bother resetting `erc--server-last-reconnect-count' because it's now handled by its sometime caller, `erc-process-input-line'. (erc-connection-established): Schedule timer and register hook to reset last-reconnect count and terminate the reconnect-display period. * test/lisp/erc/erc-scenarios-base-buffer-display.el: (erc-scenarios-base-buffer-display--reconnect-common): Add new args to test fixture to allow for asserting display properties at various stages throughout a session. (erc-scenarios-base-reconnect-options--buffer, erc-scenarios-base-buffer-display--defwin-recbury-intbuf): Rename former to latter and rework to better reflect realistic settings for the relevant display options. (erc-scenarios-base-reconnect-options--default, erc-scenarios-base-buffer-display--defwino-recbury-intbuf): Rename former to latter and rework to be more realistic. (erc-scenarios-base-buffer-display--count-reset-timeout): New test for new option `erc-reconnect-display-timeout'. (Bug#62833)
| * Extend erc-interactive-display to cover /JOINsF. Jason Park2023-05-052-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc.el (erc-display): Mention that buffer-related display options live in the customization group `erc-buffers'. (erc-buffer-display, erc-join-buffer): Swap alias and aliased so that the favored name, `erc-buffer-display', appears in the definition and in the Customize menu. Also note related buffer-display options in the doc string. (erc-query-display, erc-interactive-display): Make the former an alias of the latter, new in ERC 5.6, because their roles were functionally redundant and thus confusing. Inherit the default value from `erc-query-display' because users are more familiar with the pop-up window behavior than a single-window replacement. (erc-reconnect-display): Use preferred name for cross-referencing fallback option `erc-buffer-display' in doc string, and explain how /reconnect handling differs. (erc--setup-buffer-hook): Add new internal hook for modules that operate on windows and frames, such as erc-speedbar and erc-status-sidebar. (erc-open): Run `erc--setup-buffer-hook' after `erc-setup-buffer' so hook members know their code isn't tied to `erc-setup-buffer' itself, which may be used in other contexts, but rather to a new ERC buffer on which some display-related action has just been performed. (erc--called-as-input-p): New variable for "slash" commands, like `erc-cmd-FOO', to detect whether they're being called "interactively" as a result of input given at ERC's prompt. (erc-process-input-line): Bind `erc--called-as-input-p' when running slash commands. (erc-cmd-JOIN): When called interactively, schedule a callback to wrap the response handler and control how new buffers are thus displayed. (erc-cmd-QUERY): Use preferred alias for `erc-query-display'. * test/lisp/erc/erc-scenarios-base-buffer-display.el: (erc-scenarios-base-buffer-display--interactive-default): New test. * test/lisp/erc/erc-tests.el (erc-process-input-line, erc-select-read-args, erc-tls, erc--interactive): Change expected default value of `erc-interactive-display' from `buffer' to `window'. (Bug#62833)
| * Move ERC's buffer-display tests to separate fileF. Jason Park2023-05-054-93/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/erc/erc-scenarios-base-buffer-display.el: New file. * test/lisp/erc/erc-scenarios-base-reconnect.el (erc-scenarios-common--base-reconnect-options, erc-scenarios-base-reconnect-options--buffer, erc-scenarios-base-reconnect-options--default): Move to new file and rename. (Bug#62833) * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-linger): Lengthen timeout. * test/lisp/erc/resources/erc-d/erc-d.el (erc-d--m): Ensure buffer is live before inserting.
| * Revive option erc-query-on-unjoined-chan-privmsgF. Jason Park2023-05-052-0/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/ERC-NEWS: Mention reinstated and renamed legacy option `erc-query-on-unjoined-chan-privmsg' as well as a change in behavior for `erc-auto-query', when nil. Also fix erroneous ChangeLog reference in 5.5 section. * lisp/erc/erc-backend.el (erc-server-PRIVMSG): Consider flag `erc-receive-query-display-defer' and revived option `erc-query-unjoined-chan-privmsg' when deciding whether to create a new query buffer. And only "open" a buffer for an unknown target when the latter option is non-nil. * lisp/erc/erc.el (erc-cmd-QUERY): Make error more informative. (erc-query): Revise deprecation message. (erc-auto-query, erc-receive-query-display): Swap alias and aliased and add option to `erc-buffers' group. Mention the nonstandard meaning of nil and update package-version to signify a behavioral change, even though the default value remains untouched. (erc-receive-query-display-defer): Add new variable, a compatibility switch to access legacy behavior for `erc-auto-query'. (erc-query-on-unjoined-chan-privmsg, erc-ensure-target-buffer-on-privmsg): Revise doc string and add alias. Change package-version to ERC 5.6 due to slightly refined meaning. * test/lisp/erc/erc-scenarios-base-attach.el: New file. * test/lisp/erc/resources/base/channel-buffer-revival/reattach.eld: New file. (Bug#62833)
* | Merge from origin/emacs-29Dmitry Gutov2023-05-061-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 79a886ba368 (package-upgrade): Don't remove the package from 'package... c0ab4e9ca93 Eglot: re-rename eglot-upgrade to eglot-upgrade-eglot b4e90070f96 Fix arguments of xml.c functions as displayed in Help buf... b1bda8228e5 More fixes for NetBSD/vax a2d4cd06f45 Improve VHDL mode highlighting 2f3a514b6db Clarify documentation wrt floating point division by zero... 94e984e6700 Make loaddefs-generate slightly more tolerant aba41d2c4bb ; Minor doc cleanups in go-ts-mode.el b42ccb2e5c1 ; Minor grammar fix in treesit manual. ab44c8a6f9d Fix order of rcirc-connect arguments 8eb6e33691d Fix rcirc messages printing in the wrong place 2901a3443c7 Prevent unnecessary modifications of 'package-vc-selected... eaad302bd6f Rename eglot-update to eglot-upgrade eaf25b9c6ae go-ts-mode: Use iota query only if supported (Bug#63086) cc090294d77 (rng-complete-tag): Add the (ignored) argument to the :co... 21ec6c1d5cc Update to Transient v0.3.7-219-g3ded15b 8d5aa8df4ad Fix inserting selection data into Mozilla programs 57562c3fd0a Recognize defstruct slot names in various eieio functions b93eb68cc30 Use 'calendar-buffer' instead of fixed string # Conflicts: # etc/EGLOT-NEWS
| * Use 'calendar-buffer' instead of fixed stringThuna2023-05-021-1/+1
| | | | | | | | | | | | | | | | * test/lisp/calendar/cal-julian-tests.el (with-cal-julian-test): Use 'calendar-buffer' instead of a literal fixed name. (Bug#61546) Copyright-paperwork-exempt: yes
* | Make old-struct test more robustMattias Engdegård2023-05-051-2/+2
| | | | | | | | | | | | * test/lisp/emacs-lisp/cl-lib-tests.el (old-struct): Use the `vector` constructor instead of vector literals to avoid failing because of `type-of` constant-folding.
* | Suspend timers when reading Tramp process outputMichael Albinus2023-05-041-21/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (xdg): Require. (tramp-compat-temporary-file-directory): Set it to $XDG_CACHE_HOME/emacs if possible. * lisp/net/tramp.el (tramp-debug-to-file): Fix docstring. (tramp-wrong-passwd-regexp): Add "Authentication failed" string (from doas). (tramp-debug-message): Simplify backtrace check. (with-tramp-locked-connection): Suppress timers. (Bug#49954, Bug60534) * test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents): Adapt test. (tramp-test45-asynchronous-requests): Remove :unstable tag. Adapt test.
* | Tramp code cleanupMichael Albinus2023-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (Magic File Names): Order alphabetically. * 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): Order alphabetically. * lisp/net/tramp.el (tramp-handle-file-user-uid) (tramp-handle-file-group-gid, tramp-read-id-output): * lisp/net/tramp-archive.el (tramp-archive-handle-file-group-gid): (tramp-archive-handle-file-user-uid): Fix docstring. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test44-user-group-ids): Fix docstring.
* | Use connection-aware functions when getting the UID/GID in EshellJim Porter2023-05-022-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means, for example, that when using Tramp to sudo in Eshell, "rm" queries the user before deleting anything (bug#63221). * lisp/eshell/esh-util.el (eshell-user-login-name): New function... * lisp/eshell/em-unix.el (eshell/whoami): ... use it. * lisp/eshell/em-ls.el (eshell-ls-applicable): Use 'file-user-uid' and 'eshell-user-login-name'. (eshell-ls-decorated-name): Use 'file-user-uid'. * lisp/eshell/em-pred.el (eshell-predicate-alist): Use 'file-user-uid' and 'file-group-gid'. * lisp/eshell/em-unix.el (eshell-interactive-query): New widget... (eshell-rm-interactive-query, eshell-mv-interactive-query) (eshell-cp-interactive-query, eshell-ln-interactive-query): ... use it. (eshell-interactive-query-p): New function... (eshell/rm, eshell/mv, eshell/cp, eshell/ln): ... use it. * lisp/simple.el (file-group-gid): New function. * lisp/net/ange-ftp.el (ange-ftp-file-group-gid): New function... (file-group-gid): ... use it. * lisp/net/tramp.el (tramp-handle-file-group-gid): * lisp/net/tramp-archive.el (tramp-archive-handle-file-group-gid): New functions. * lisp/net/tramp.el (tramp-file-name-for-operation): Add 'file-group-gid'. * 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 'file-group-gid' mapping. * test/lisp/net/tramp-tests.el (tramp-test44-file-user-group-ids): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test44-file-user-group-ids): Add tests for 'file-group-gid'. * doc/lispref/files.texi (Magic File Names): Mention 'file-group-gid'. * doc/lispref/os.texi (User Identification): Document 'file-group-gid', and move 'group-real-gid' to match the order of 'user-real-uid'. * etc/NEWS: Announce 'file-group-gid'.
* | Compare case-folded nicks with erc-fill-wrap-mergeF. Jason Park2023-04-303-5/+10
| | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-fill.el (erc-fill--wrap-continued-message-p): Downcase both current and previous speaker when comparing nicks. * test/lisp/erc/erc-fill-tests.el (erc-fill-wrap--merge): Add title-case nick to test. * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update snapshot. * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update snapshot. (Bug#60936)
* | Improve call indentation for elixir-ts-modeWilhelm H Kirschbaum2023-04-291-1/+13
| | | | | | | | | | | | | | | | | | * lisp/progmodes/elixir-ts-mode.el (elixir-ts--indent-rules): Change match order. (Bug#63110) * test/lisp/progmodes/elixir-ts-mode-resources/indent.erts: Add test case.
* | Add bitstring indentation and navigation for elixir-ts-modeWilhelm H Kirschbaum2023-04-291-0/+12
| | | | | | | | | | | | | | | | | | | | * lisp/progmodes/elixir-ts-mode.el (elixir-ts--sexp-regexp): Add bistring. (elixir-ts--indent-rules): Handle bitstring indentation. (Bug#63109) * test/lisp/progmodes/elixir-ts-mode-resources/indent.erts: Add test case.
* | Don't rewrite (nconc X nil) -> X for any X (bug#63103)Mattias Engdegård2023-04-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the last cdr of a non-terminal argument to `nconc` is overwritten no matter its value: (nconc (cons 1 2) nil) => (1) a terminating nil arg cannot just be eliminated unconditionally. * lisp/emacs-lisp/byte-opt.el (byte-optimize-nconc): Only eliminate a terminal nil arg to `nconc` if preceded by a nonempty proper list. Right now we only bother to prove this for `(list ...)`, so that (nconc (list 1 2 3) nil) -> (list 1 2 3) * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test cases.
* | New command 'tramp-cleanup-some-buffers'Michael Albinus2023-04-261-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Cleanup remote connections): Document tramp-cleanup-some-buffers and tramp-cleanup-some-buffers-hook. * etc/NEWS: New command 'tramp-cleanup-some-buffers'. * 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): Use `tramp-taint-remote-process-buffer'. * lisp/net/tramp.el (tramp-post-process-creation): New defun. (tramp-handle-make-process): * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection) (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-cmds.el (tramp-tainted-remote-process-buffers): New defvar. (tramp-cleanup-dired-buffer-p) (tramp-delete-tainted-remote-process-buffer-function) (kill-buffer-hook, tramp-cleanup-remote-process-p) (tramp-cleanup-some-buffers): New defuns. (tramp-cleanup-some-buffers-hook): New defcustom. Add `buffer-file-name', `tramp-cleanup-dired-buffer-p' and `tramp-cleanup-remote-process-p' to the hook. (kill-buffer-hook): Add `tramp-delete-tainted-remote-process-buffer-function'. (tramp-cleanup-all-buffers): Rework. * lisp/net/tramp-compat.el (tramp-compat-always): New defalias. * test/lisp/net/tramp-tests.el (tramp--test-always): Delete. (tramp-test10-write-region, tramp-test21-file-links) (tramp--test-deftest-direct-async-process) (tramp-test37-make-auto-save-file-name) (tramp-test38-find-backup-file-name) (tramp-test39-make-lock-file-name) (tramp-test39-detect-external-change): Use `tramp-compat-always'.
* | Add a new user option in Python mode to improve the indentationkobarity2023-04-221-2/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-indent-block-paren-deeper): New user option. (python-indent-context): Add a new context :inside-paren-from-block. (python-indent--calculate-indentation): Modify according to `python-indent-block-paren-deeper' and :inside-paren-from-block. * test/lisp/progmodes/python-tests.el (python-indent-inside-paren-block-1) (python-indent-inside-paren-block-2) (python-indent-inside-paren-block-3) (python-indent-inside-paren-block-4): New tests. (python-indent-inside-paren-5, python-indent-dedenters-8): Modify according to the new context. * etc/NEWS: Document the new user option. (Bug#62696)
* | Handle modifications in extensionless zip files (bug#61326)Ruijie Yu2023-04-201-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/arc-mode.el (archive-*-write-file-member) (archive-*-expunge): Refactor to correctly modify extensionless zip archives. (archive-expunge): Move implementation to a separate helper function to facilitate testing. (archive--act-files): New helper function to wrap around `call-process' calls. (archive--need-rename-p): New helper function to check whether a temporary rename is necessary. (archive--ensure-extension) (archive--maybe-rename): New helper functions to rename archive if the caller deems it necessary. (archive--with-ensure-extension): New helper function to handle writing an archive while ensuring extensionless archives work correctly by temporarily renaming them. * test/lisp/arc-mode-tests.el (arc-mode-test-zip-ensure-ext): New regression test for bug#61326.
* | ; Double space at end of sentence for vc-cvs.elRobert Pluim2023-04-191-1/+1
| | | | | | | | | | | | | | * lisp/vc/vc-cvs.el (vc-cvs-repository-hostname, vc-cvs-parse-root) (vc-cvs-parse-status, vc-cvs-after-dir-status): Double space at end of sentence. * test/lisp/vc/vc-cvs-tests.el: Double space at end of sentence.
* | VC: CVS: Fix "Root" file parsingOlivier Certner2023-04-191-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new "Root" file parsing has been based on CVS' documentation, which gives the following format for *remote* repositories: [:method:][[user][:password]@]hostname[:[port]]/pathname/to/repository and for local ones: :local:/pathname/to/repository or :local:c:/pathname/to/repository or alternatively ':local:' replaced by ':fork:', or ':local:' omitted when the path starts with a slash. [The actual parsing code in CVS is actually a bit more restrictive. See 'root.c'.] Most notably, the previous version could not parse an absolute pathname without an explicit :local: method or :pserver: lines with passwords. * lisp/vc/vc-cvs.el (vc-cvs-parse-root): Rewrite. (vc-cvs-repository-hostname): Cope with `vc-cvs-parse-root' returning an empty hostname (can only happen if the "Root" file is invalid), returning nil in this case. (vc-cvs-parse-uhp): Remove this standalone function formerly used only by `vc-cvs-parse-root' and which doesn't allow correct parsing anyway. * test/lisp/vc/vc-cvs-tests.el: New file, with tests for common "Root" file content.
* | Merge from origin/emacs-29Eli Zaretskii2023-04-152-4/+24
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 864a4dc2363 Fix compilation of w32.c with old MinGW system headers a22eb9ae0f9 ruby-add-log-current-method: Reduce the use of 'nreverse' 17d803d0a75 Fix detection of WebP images by their signature 43290391ce2 ; Eglot: make version parseable by version-to-list 6e6e8b5c974 Add more documentation for the keys of `package-vc-select... 7972b76c2c7 ; vc-checkout: Wrap var lookup in 'bound-and-true-p' e9fef1d70ff vc-checkout: Try to use the vc-dir's backend first 372e024accd ; Fix wallpaper-tests on XFCE 7055fd8e43e Improve documentation related to 'ispell-complete-word' 61fd017abde * configure.ac: Add -lbsd on Haiku. 05971c4d9a4 Add menu to 'c-ts-mode' and 'c++-ts-mode' # Conflicts: # lisp/progmodes/eglot.el # lisp/progmodes/ruby-mode.el
| * ruby-add-log-current-method: Reduce the use of 'nreverse'Dmitry Gutov2023-04-131-0/+16
| | | | | | | | | | | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-add-log-current-method): Reduce the use of 'nreverse' (bug#62761). * test/lisp/progmodes/ruby-mode-tests.el (ruby-add-log-current-method-singleton-referencing-outer): New test.
| * ; Fix wallpaper-tests on XFCEEli Zaretskii2023-04-111-4/+8
| | | | | | | | | | | | * test/lisp/image/wallpaper-tests.el (wallpaper--find-command-args/return-list): Account for command-args being a function. (Bug#62673)
* | Merge from origin/emacs-29Eli Zaretskii2023-04-152-7/+15
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | c62afb10cf0 Fix wallpaper-tests on MS-Windows f2d212c6966 Fix a couple of eglot-tests 338b3718b6c Fix visiting RPM files b4afee03193 Fix ff-quiet-mode doc 2445100d7d6 ; Improve documentation of 'match-buffers' d4d0da96f0b ; Update make-tarball.txt for Emacs 29. 9b0bf694da4 ; Fix ldefs-boot.el. 0cb86a348c7 ; Update ChangeLog.4. # Conflicts: # ChangeLog.4
| * Fix wallpaper-tests on MS-WindowsEli Zaretskii2023-04-111-7/+14
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/image/wallpaper-tests.el (wallpaper--find-setter) (wallpaper--find-setter/call-predicate) (wallpaper--find-setter/set-current-setter) (wallpaper-set/calls-init-action) (wallpaper-set/calls-wallpaper-set-function) (wallpaper-set/runs-command, wallpaper-set/runs-command/detach): Skip these tests if native functions are used for changing wallpaper. These tests are irrelevant in that case.
| * Fix a couple of eglot-testsBasil L. Contovounesios2023-04-111-1/+2
| | | | | | | | | | | | | | * test/lisp/progmodes/eglot-tests.el (eglot-test-rust-analyzer-watches-files): Bump timeout. (eglot-test-json-basic): Check for yas-minor-mode before using it, like other tests do (bug#61637).
* | Merge from origin/emacs-29Eli Zaretskii2023-04-151-0/+14
|\ \ | |/ | | | | | | db8f207e52f Fix some cases of incomplete code's indentation [c/c++-ts... 589959fb09d project-search: Pipe the list of files through 'file-regu...
| * Fix some cases of incomplete code's indentation [c/c++-ts-mode]Dmitry Gutov2023-04-101-0/+14
| | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el (c-ts-base--before-indent): Try to guess when the parse tree is incomplete, and provide a better node to indent against (bug#62717). (c-ts-base-mode): Set up advice for local treesit-indent-function.
| * ; Backport: Eglot: fix misplaced parenthesis in last commit to eglot-tests.elJoão Távora2023-04-091-1/+1
| | | | | | | | | | | | | | * test/lisp/progmodes/eglot-tests.el (eglot-test-eldoc-after-completions): Fix misplaced parenthesis. (cherry picked from commit 3aedd5c920560fe6456a860a900be40a35e850d2)
| * Backport: Eglot: no more tests based on Pylsp (bug#62694)João Távora2023-04-091-112/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functionality under test in eglot.el is exactly the same, but use the clangd server only, as that is used in more tests, and it is much easier to check if it misbehaves or not. Tests pass with clangd version 15. * test/lisp/progmodes/eglot-tests.el (python): Don't require it. (eglot--call-with-fixture): Simplify. (eglot--wait-for-clangd): New helper. (eglot-test-basic-completions) (eglot-test-non-unique-completions, eglot-test-basic-xref) (eglot-test-snippet-completions) (eglot-test-snippet-completions-with-company) (eglot-test-eldoc-after-completions, eglot-test-multiline-eldoc): Use clangd, not pylsp. (eglot-test-formatting): Renamed from eglot-test-python-autopep-formatting. (eglot-test-python-yapf-formatting): Remove. (cherry picked from commit fc8230f3362b12955152f48565a6c670b4c4cc88)
* | Make use of the new pred shapes in treesit.elYuan Fu2023-04-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | treesit-search-forward and friends now accept more shapes for PRED, make use of it in navigation functions. * lisp/treesit.el (treesit-node-top-level): Use treesit-node-match-p. (treesit--thing-unpack-pattern): Remove function. (treesit-beginning-of-thing) (treesit-end-of-thing): Remove PRED argument. (treesit--things-around): Remove PRED argument, use treesit-node-match-p. (treesit--top-level-thing): Remove function. (treesit--navigate-thing): Remove PRED argument. (treesit-thing-at-point): Update docstring, don't unpack PATTERN. * test/src/treesit-tests.el: (treesit--ert-test-defun-navigation): Don't unpack pattern.