aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use a dedicated type to represent interpreted-function valuesscratch/interpreted-functionStefan Monnier2024-04-183-30/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `function` so that when evaluating #'(lambda ...) we return an object of type `interpreted-function` rather than a list starting with one of `lambda` or `closure`. The new type reuses the existing PVEC_CLOSURE (nee PVEC_COMPILED) tag and tries to align the corresponding elements: - the arglist, the docstring, and the interactive-form go in the same slots as for byte-code functions. - the body of the function goes in the slot used for the bytecode string. - the lexical context goes in the slot used for the constants of bytecoded functions. The first point above means that `help-function-arglist`, `documentation`, and `interactive-form`s don't need to distinguish interpreted and bytecode functions any more. Main benefits of the change: - We can now reliably distinguish a list from a function value. - `cl-defmethod` can dispatch on `interactive-function` and `closure`. Dispatch on `function` also works now for interpreted functions but still won't work for functions represented as lists or as symbols, of course. - Function values are now self-evaluating. That was alrready the case when byte-compiled, but not when interpreted since (eval '(closure ...)) signals a void-function error. That also avoids false-positive warnings about "don't quote your lambdas" when doing things like `(mapcar ',func ...)`. * src/eval.c (Fmake_interpreted_closure): New function. (Ffunction): Use it and change calling convention of `Vinternal_make_interpreted_closure_function`. (FUNCTIONP, Fcommandp, eval_sub, funcall_general, funcall_lambda) (Ffunc_arity, lambda_arity): Simplify. (funcall_lambda): Adjust to new representation. (syms_of_eval): `defsubr` the new function. Remove definition of `Qclosure`. * lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure): Change calling convention and use `make-interpreted-closure`. * src/data.c (Fcl_type_of): Distinguish `byte-code-function`s from `interpreted-function`s. (Fclosurep, finterpreted_function_p): New functions. (Fbyte_code_function_p): Don't be confused by `interpreted-function`s. (Finteractive_form, Fcommand_modes): Simplify. (syms_of_data): Define new type symbols and `defsubr` the two new functions. * lisp/emacs-lisp/cl-print.el (cl-print-object) <interpreted-function>: New method. * lisp/emacs-lisp/oclosure.el (oclosure): Refine the parent to be `closure`. (oclosure--fix-type, oclosure-type): Simplify. (oclosure--copy, oclosure--get, oclosure--set): Adjust to new representation. * src/callint.c (Fcall_interactively): Adjust to new representation. * src/lread.c (bytecode_from_rev_list): * lisp/simple.el (function-documentation): * lisp/help.el (help-function-arglist): Remove the old `closure` case and adjust the byte-code case so it handles `interpreted-function`s. * lisp/emacs-lisp/cl-preloaded.el (closure): New type. (byte-code-function): Add it as a parent. (interpreted-function): Adjust parent (the type itself was already added earlier by accident). * lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Adjust to new representation. (byte-compile): Use `interpreted-function-p`. * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust to new representation. (side-effect-free-fns): Add `interpreted-function-p` and `closurep`. * src/profiler.c (trace_hash, ffunction_equal): Simplify. * lisp/profiler.el (profiler-function-equal): Simplify. * lisp/emacs-lisp/nadvice.el (advice--interactive-form-1): Use `interpreted-function-p`; adjust to new representation; and take advantage of the fact that function values are now self-evaluating. * lisp/emacs-lisp/lisp-mode.el (closure): Remove `lisp-indent-function` property. * lisp/emacs-lisp/disass.el (disassemble-internal): Adjust to new representation. * lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation): Use `interpreted-function-p`. * lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers): Add `closurep` and `interpreted-function-p`. * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Adjust to more precise type info in `describe-function`. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries): Use `interpreted-function-p`. * test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-f4, vk-f5): Don't hardcode function values. * doc/lispref/functions.texi (Anonymous Functions): Don't suggest that function values are lists. Reword "self-quoting" to reflect the fact that #' doesn't return the exact same object. Update examples with the new shape of the return value. * doc/lispref/variables.texi (Lexical Binding): * doc/lispref/lists.texi (Rearrangement): * doc/lispref/control.texi (Handling Errors): Update examples to reflect new representation of function values.
* Don't error on tabbing to a widget at BOB (bug#69943)Stephen Berman2024-04-181-1/+7
| | | | | | | | | * lisp/wid-edit.el (widget-move): Don't move backward when at beginning of buffer, and keep point on widget's left side. * test/lisp/wid-edit-tests.el (widget-test-widget-move): Test that moving to a widget at beginning of buffer does not signal a beginning-of-buffer error.
* Avoid unnecessary escaping in 'url-build-query-string'Dagfinn Ilmari Mannsåker2024-04-181-1/+5
| | | | | | | | | * lisp/url/url-util.el (url-query-key-value-allowed-chars): New defconst. (url-build-query-string): Use it to escape only those characters that need it in keys and values. * test/lisp/url/url-util-tests.el (url-util-tests): Add new test cases. (Bug#70312)
* ; Fix last change to secrets-tests.el.Basil L. Contovounesios2024-04-151-1/+1
|
* Recognize multicite macros from biblatexArash Esbati2024-04-131-0/+22
| | | | | | | | | * lisp/textmodes/reftex-cite.el (reftex-all-used-citation-keys): Match the citation keys used with multicite macros provided by biblatex. (bug#38249) * test/lisp/textmodes/reftex-tests.el (reftex-all-used-citation-keys): Adjust test accordingly.
* peg-tests.el: Fix test failuresStefan Monnier2024-04-131-8/+27
| | | | | | | | | | | | | * lisp/progmodes/peg.el (peg-parse): Refine heuristic since unknown terminals are resolved at run-time rather than compile-time now. (peg--macroexpand) <stack-action>: Avoid generating a `let` with an empty body. (peg--translate-rule-body): Adjust to name change of `macroexp-warn-and-return` and the fact that it's always available. * test/lisp/progmodes/peg-tests.el (peg-parse-string): Add `indent` declaration. (peg-test): Check that the compiler emits the warnings we expect.
* Merge branch 'track-changes'Stefan Monnier2024-04-131-0/+156
|\
| * lisp/emacs-lisp/track-changes.el: New file (bug#70077)Stefan Monnier2024-04-131-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new package provides an API that is easier to use right than our `*-change-functions` hooks. The patch includes changes to `diff-mode.el` and `eglot.el` to make use of this new package. * lisp/emacs-lisp/track-changes.el: New file. * test/lisp/emacs-lisp/track-changes-tests.el: New file. * doc/lispref/text.texi (Tracking changes): New subsection. * lisp/progmodes/eglot.el: Require `track-changes`. (eglot--virtual-pos-to-lsp-position): New function. (eglot--track-changes): New var. (eglot--managed-mode): Use `track-changes-register` i.s.o `after/before-change-functions` when available. (eglot--track-changes-signal): New function, partly extracted from `eglot--after-change`. (eglot--after-change): Use it. (eglot--track-changes-fetch): New function. (eglot--signal-textDocument/didChange): Use it. * lisp/vc/diff-mode.el: Require `track-changes`. Also require `easy-mmode` before the `eval-when-compile`s. (diff-unhandled-changes): Delete variable. (diff-after-change-function): Delete function. (diff--track-changes-function): Rename from `diff-post-command-hook` and adjust to new calling convention. (diff--track-changes): New variable. (diff--track-changes-signal): New function. (diff-mode, diff-minor-mode): Use it with `track-changes-register`.
* | Fix Icalendar export with ISO datesEli Zaretskii2024-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | * lisp/calendar/icalendar.el (icalendar--datestring-to-isodate): Accept dashes in ISO-style numeric dates. Patch by Erwan Hingant <erwan.hingant@mailo.com>. (Bug#69894) * test/lisp/calendar/icalendar-tests.el (icalendar--datestring-to-isodate): Add a test for dashes in ISO-style numeric dates.
* | (elisp-tests-syntax-propertize): New test for bug#24542Stefan Monnier2024-04-121-0/+9
| | | | | | | | | | * test/lisp/progmodes/elisp-mode-tests.el (elisp-tests-syntax-propertize): New test.
* | Improve D-Bus byte-array conversionMichael Albinus2024-04-122-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/dbus.texi (Type Conversion): Adapt dbus-byte-array-to-string. * etc/NEWS: D-Bus byte array conversion works over raw UTF-8 bytes. Fix typos. * lisp/net/dbus.el (dbus-string-to-byte-array) (dbus-byte-array-to-string): BYTE-ARRAY must be an UTF-8 raw bytes sequence. Make optional argument MULTIBYTE obsolete. (Bug#70301) (dbus-call-method-handler, dbus-register-signal) (dbus-escape-as-identifier): Use `length=' and `length>'. * test/lisp/net/dbus-tests.el (dbus--test-method-handler) (dbus-test09-get-managed-objects): Use `length='. (dbus-test01-type-conversion): Extend test. * test/lisp/net/secrets-tests.el (secrets-test03-items): Extend test.
* | Fix 'format-seconds' when all values are zero and %z is usedEli Zaretskii2024-04-101-1/+4
|/ | | | | | | * lisp/calendar/time-date.el (format-seconds): Fix all-zero time. * test/lisp/calendar/time-date-tests.el (test-format-seconds): Add two new tests. (Bug#70322)
* ; Avoid byte-compiler warnings in 'ls-lisp-test-bug70271'.Eli Zaretskii2024-04-091-1/+2
|
* ; Fix the test in last change.Eli Zaretskii2024-04-091-0/+3
|
* Support more long time options in 'ls-lisp'Lin Sun2024-04-091-0/+36
| | | | | | | | * lisp/ls-lisp.el (ls-lisp--sanitize-switches): Support '--time' and '--sort=time'. (Bug#70271) * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug70271): New test case.
* Allow updating of /IGNORE timeouts in ERCF. Jason Park2024-04-072-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc.el (erc--read-time-period, erc--decode-time-period): Move body of former, now a superficial wrapper, to latter, a new function. (erc--format-time-period): New function. (erc--get-ignore-timer-args): New function. (erc--find-ignore-timer): New function to search through `timer-list' to find matching ignore timer. (erc-cmd-IGNORE): Refactor and redo doc string. Add new optional `timespec' parameter, primarily to aid in testing. Update an existing timer instead of always creating one, and display time remaining in "ignore list" output. Pass server buffer instead of current buffer to timer callbacks because `erc--unignore-user' displays its messages in the `active' buffer, not necessarily the issuing one. Note that doing this does discard potentially useful information, so if ever reverting, we can change the `cl-find' :test in `erc--find-ignore-timer' to something that compares the `erc-server-process' of both buffers. ;; ;; Something like: ;; ;; (defun erc--ignore-timers-equal-p (a b) ;; (and (equal (car a) (car b)) ;; (eq (buffer-local-value 'erc-server-process (cadr a)) ;; (buffer-local-value 'erc-server-process (cadr b))))) ;; (erc-cmd-UNIGNORE): Pass `erc-ignore-list' member matching `user' parameter to `erc--unignore-user' instead of original, raw parameter, along with the server buffer. (erc--unignore-user): Cancel existing timer and don't bother switching to server buffer since we're already there. (erc-message-english-ignore-list): New variable. * test/lisp/erc/erc-scenarios-ignore.el: New file. * test/lisp/erc/erc-tests.el (erc--read-time-period): New test. (erc-cmd-UNIGNORE): New test. (Bug#70127)
* Merge from origin/emacs-29Eli Zaretskii2024-04-061-0/+78
|\ | | | | | | | | 46b8746b38e Fix warning-suppress for list type "warning type" 910ea5f1e55 Make object init more robust (bug#69571)
| * Make object init more robust (bug#69571)Theodor Thornhill2024-03-311-0/+78
| | | | | | | | | | | | * lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make the regex same as before, but conditionally check other heuristics rather than crazy regex shenanigans.
* | Make sh-script-tests.el more robustMichael Albinus2024-04-052-0/+7
| | | | | | | | | | | | | | * test/lisp/progmodes/sh-script-tests.el (test-sh-script-indentation) (test-basic-sh-indentation, test-indent-after-continuation): * test/lisp/progmodes/sh-script-resources/sh-indents.erts (Code): Skip if `sh-indent-supported-here' is nil. (Bug#70196)
* | Make lexical-binding cookie warning test more robustMattias Engdegård2024-04-031-6/+8
| | | | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--lexical-binding-cookie): Run with lexical-binding both on and off.
* | Fix symbol list matching regexps.Vladimir Kazanov2024-04-011-2/+45
| | | | | | | | | | | | | | | | | | Fix symbol list matching regexp performance Allow empty face lists, improve the face list matching regexp (see discussion in Bug#69714) based on relint's comments, add tests: * test/lisp/emacs-lisp/ert-font-lock-tests.el: Add tests. * lisp/emacs-lisp/ert-font-lock.el: Fix regexps.
* | Fix the new PEG libraryEli Zaretskii2024-03-311-0/+0
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/peg.texi (Parsing Expression Grammars) (PEX Definitions, Parsing Actions, Writing PEG Rules): Fix markup, indexing, and wording. * etc/NEWS: Fix wording of PEG entry. * test/lisp/progmodes/peg-tests.el: Move from test/lisp/, to match the directory of peg.el.
* | Add peg.el as a built-in libraryEric Abrahamsen2024-03-301-0/+367
| | | | | | | | | | | | * lisp/progmodes/peg.el: New file, taken from ELPA package. * test/lisp/peg-tests.el: Package tests. * doc/lispref/peg.texi: Documentation.
* | bug#69992: Minor improvement to image map transformation logicDavid Ponce2024-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/image.el (image--compute-rotation): New function. (image--compute-map, image--compute-original-map): Use it. Ensure all transformations are applied or undone according to what Emacs does internally. Call a transformation function only when needed. Fix doc string. (image--scale-map, image--rotate-map): Assume effective scale argument. (image--rotate-coord): Improve doc string. (image--flip-map): Remove no more used argument FLIP. * test/lisp/image-tests.el (image-create-image-with-map): Use a valid SVG image otherwise `image-size' will not return a valid value and calculation of scale could fail. (image-transform-map): Update according to changed signature of `image--flip-map'.
* | Merge from origin/emacs-29Eli Zaretskii2024-03-301-0/+14
|\ \ | |/ | | | | | | | | 946d4aad1df Avoid errors in Info-search-case-sensitively in DIR buffers fbf68302999 Add test for previous change (bug#70023) bcf6dd6e266 Add typescript-ts-mode indentation for interface bodies (...
| * Add test for previous change (bug#70023)Theodor Thornhill2024-03-281-0/+14
| | | | | | | | | | * test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: Add test.
* | Merge from origin/emacs-29Eli Zaretskii2024-03-301-1/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | 7a5d7be52c5 org--confirm-resource-safe: Fix prompt when prompting in ... 2bc865ace05 org-file-contents: Consider all remote files unsafe 6f9ea396f49 org-latex-preview: Add protection when `untrusted-content... 937b9042ad7 * lisp/gnus/mm-view.el (mm-display-inline-fontify): Mark ... ccc188fcf98 * lisp/files.el (untrusted-content): New variable. befa9fcaae2 org-macro--set-templates: Prevent code evaluation 3221d8d4611 * admin/authors.el (authors-aliases): Add ignored authors. 8d8253f8991 * etc/NEWS: Update for Emacs 29.3
* | ; * test/lisp/vc/vc-git-tests.el: bend doc string quoteMattias Engdegård2024-03-291-1/+1
| |
* | pp.el: Try and fix bug#70039Stefan Monnier2024-03-281-0/+19
| | | | | | | | | | * lisp/emacs-lisp/pp.el (pp-fill): Avoid splitting `#N#` or `#[`. * test/lisp/emacs-lisp/pp-tests.el (pp-tests--sanity): New test.
* | Improve ert-font-lock assertion parser (Bug#69714)Vladimir Kazanov2024-03-282-25/+130
| | | | | | | | | | | | | | | | | | | | | | | | Fail on files with no assertions, parser now accepts multiple carets per line and face lists: * lisp/emacs-lisp/ert-font-lock.el: Assertion parser fix. * test/lisp/emacs-lisp/ert-font-lock-resources/no-asserts.js: * test/lisp/emacs-lisp/ert-font-lock-tests.el (test-parse-comments--no-assertion-error) (test-syntax-highlight-inline--caret-negated-wrong-face) (test-macro-test--file-no-asserts): New test cases. * doc/misc/ert.texi (Syntax Highlighting Tests): More syntax examples.
* | (pcase-mutually-exclusive): Use auto-generated tableStefan Monnier2024-03-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | The `pcase-mutually-exclusive-predicates` table was not very efficient since it grew like O(N²) with the number of predicates. Replace it with an O(N) table that's auto-generated from the `built-in-class` objects. * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Delete variable. (pcase--subtype-bitsets): New function and constant. (pcase--mutually-exclusive-p): Use them. * lisp/emacs-lisp/cl-preloaded.el (built-in-class): Don't inline.
* | Restore leading space to right-margin stamps in ERCF. Jason Park2024-03-2311-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Insert a single space character immediately before right-side stamps managed by `erc-stamp--display-margin-mode'. Include it as part of the `timestamp' field. This behavior was originally present in an earlier draft of the changes for bug#60936, mainly to favor symmetry between hard-wrapped fill styles and fill-wrap with regard to stamps. It was subsequently removed to simplify management, so that the `field' and `display' intervals aligned. * test/lisp/erc/erc-stamp-tests.el (erc-stamp--display-margin-mode--right): Update expected output. ; test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Add space. ; test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Add space. ; test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Add space. ; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld: ; Add space. ; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld: ; Add space. ; test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Add space. ; test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Add space. ; test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Add space. ; test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Add space. ; test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Add space.
* | Remove unused faces from various erc-goodies testsF. Jason Park2024-03-231-11/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ; A note to anyone running ERC's test suite while bisecting and ; unlucky enough to land on this commit: apologies for the ; inconvenience. It fails because it includes adjustments for fixes ; only introduced by the subsequent commit. This is obviously ; objectionable but was done knowingly in order to duck the ; copyright-exemption threshold for new contributors. * test/lisp/erc/erc-goodies-tests.el (erc-controls-highlight--spoilers) (erc-controls-highlight--inverse): Remove all mention of stricken faces `erc-control-default-fg' and `erc-control-default-bg'. (erc-controls-highlight/default-foreground) (erc-controls-highlight/default-background): New tests. (Bug#69860)
* | Recompute :map when image :scale, :rotation, or :flip changesJoseph Turner2024-03-231-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, when transforming an image, its :map is recomputed to fit. Image map coordinates are integers, so when computing :map, coordinates are rounded. To prevent an image from drifting from its map after repeated transformations, 'create-image' now adds a new image property :original-map, which is combined with the image's transformation parameters to recompute :map. * lisp/image.el (image-recompute-map-p): Add user option to control whether :map is recomputed when an image is transformed. (create-image): Create :map from :original-map and vice versa. (image--delayed-change-size): Fix comment. (image--change-size, image-rotate, image-flip-horizontally, image-flip-vertically): Recompute image map after transformation and mention 'image-recompute-map-p' in docstring. (image--compute-map): Add function to compute a map from original map. (image--compute-original-map): Add function to compute an original map from map. (image--scale-map): Add function to scale a map based on :scale. (image--rotate-map): Add function to rotate a map based on :rotation. (image--rotate-coord): Add function to rotate a map coordinate pair. (image--flip-map): Add function to flip a map based on :flip. (image-increase-size, image-decrease-size, image-mouse-increase-size) (image-mouse-decrease-size): Mention 'image-recompute-map-p' in docstrings. * etc/NEWS: Add NEWS entry. * doc/lispref/display.texi (Image Descriptors): Document :original-map and new user option 'image-recompute-map-p'. * test/lisp/image-tests.el (image--compute-map-and-original-map): Test 'image--compute-map' and 'image--compute-original-map'. (image-tests--map-equal): Add equality predicate to compare image maps. (image-create-image-with-map): Test that 'create-image' adds :map and/or :original-map as appropriate. (image-transform-map): Test functions related to transforming maps. (Bug#69602)
* | Add 'eww-readable-urls'Jim Porter2024-03-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/eww.el (eww-readable-urls): New option. (eww-default-readable-p): New function... (eww-display-html): ... use it. * test/lisp/net/eww-tests.el (eww-test/readable/default-readable): New test. * doc/misc/eww.texi (Basics): Document 'eww-readable-urls'. * etc/NEWS: Announce this change (bug#68254).
* | Allow toggling "readable" mode in EWWJim Porter2024-03-231-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally, add an option to prevent adding a new history entry for each call of 'eww-readable' (bug#68254). * lisp/net/eww.el (eww-retrieve): * lisp/net/eww.el (eww-readable-adds-to-history): New option. (eww-retrieve): Make sure we call CALLBACK in all configurations. (eww-render): Simplify how to pass encoding. (eww--parse-html-region, eww-display-document): New functions, extracted from... (eww-display-html): ... here. (eww-document-base): New function. (eww-readable): Toggle "readable" mode interactively, like with a minor mode. Consult 'eww-readable-adds-to-history'. (eww-reload): Use 'eshell-display-document'. * test/lisp/net/eww-tests.el (eww-test--with-mock-retrieve): Fix indent. (eww-test/display/html, eww-test/readable/toggle-display): New tests. * doc/misc/eww.texi (Basics): Describe the new behavior. * etc/NEWS: Announce this change.
* | Merge from origin/emacs-29Eli Zaretskii2024-03-232-0/+49
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | 689f04a2ddf Clarify description of format-spec truncation 759dedfab07 More accurate documentation of 'rmail-mail-new-frame' fa79de7c6b8 ; * lisp/calendar/calendar.el: Remove extra space. 7f6e335f4b4 Fix documentation of M-SPC in user manual 5bdc2436c64 ; * lisp/emacs-lisp/cl-macs.el (cl-labels): Fix stray dif... 8014dbb2ad8 * admin/notes/bugtracker: Minor copyedit. 06a991e7e87 ; * admin/notes/bugtracker: Minor copyedit. c890622e1a9 Tweak regexp for object initializers in csharp-mode (bug#... f48babb1120 `term-mode': mention the keymap to add keybindings to 8cf05d9be12 Fix 'shortdoc-copy-function-as-kill' d5901f3f05e Improve documentation of 'edebug-print-*' variables
| * Tweak regexp for object initializers in csharp-mode (bug#69571)Theodor Thornhill2024-03-162-0/+49
| | | | | | | | | | | | | | | | | | * lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Add handling to not consider ended statements as object init openers. * test/lisp/progmodes/csharp-mode-resources/indent.erts: New test resources. * test/lisp/progmodes/csharp-mode-tests.el: Add test for this particular issue.
* | Fix recent test regressionsStefan Monnier2024-03-221-5/+5
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/pp.el (pp-fill): Don't cut between `#` and `(`. * test/lisp/help-fns-tests.el (help-fns-test-built-in) (help-fns-test-interactive-built-in, help-fns-test-lisp-defun) (help-fns-test-lisp-defsubst): * test/src/emacs-module-tests.el (module/describe-function-1): Adjust tests to new wording in `describe-function`.
* | (pp-fill): Cut before parens and dotsStefan Monnier2024-03-221-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `pp-fill` code sometimes end up generating things like: (foo . bar) instead of (foo . bar) so make sure we cut before rather than after the dot (and open parens while we're at it). * lisp/emacs-lisp/pp.el (pp-fill): Cut before parens and dots. * test/lisp/emacs-lisp/pp-tests.el (pp-tests--dimensions): New function. (pp-tests--cut-before): New test.
* | Fix vc-git test when no identities are configuredKévin Le Gouguec2024-03-191-2/+9
| | | | | | | | | | | | | | | | Reported by john muhl <jm@pub.pink>. * test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo): Set some environment variables (lifted from vc-tests.el) to let 'git commit' compute dummy author and committer identities.
* | * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-93): Add test.Andrea Corallo2024-03-191-3/+2
| |
* | ; Re-apply accidentally reverted commitKévin Le Gouguec2024-03-171-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-applies: 2024-03-17 "Fix vc-dir when "remote" Git branch is local" (21828f288ef) reverted as part of the unrelated: 2024-03-17 "Update modus-themes to their 4.4.0 version" (67b0c1c09ea) The original commit message follows: Fix vc-dir when "remote" Git branch is local While in there, add that "tracking" branch to the vc-dir buffer. For bug#68183. * lisp/vc/vc-git.el (vc-git-dir-extra-headers): Reduce boilerplate with new function 'vc-git--out-ok'; stop calling vc-git-repository-url when REMOTE is "." to avoid throwing an error; display tracking branch; prefer "none (<details...>)" to "not (<details...>)" since that reads more grammatically correct. (vc-git--out-ok): Add documentation. (vc-git--out-str): New function to easily get the output from a Git command. * test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo) (vc-git-test--run): New helpers, defined to steer clear of vc-git-- internal functions. (vc-git-test-dir-track-local-branch): Check that vc-dir does not crash.
* | Update modus-themes to their 4.4.0 versionProtesilaos Stavrou2024-03-171-40/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/modus-themes.org: Update the manual to better document existing functionality and cover the new features. * etc/themes/modus-operandi-deuteranopia-theme.el: * etc/themes/modus-operandi-theme.el: * etc/themes/modus-operandi-tinted-theme.el: * etc/themes/modus-operandi-tritanopia-theme.el: * etc/themes/modus-vivendi-deuteranopia-theme.el: * etc/themes/modus-vivendi-theme.el: * etc/themes/modus-vivendi-tinted-theme.el: * etc/themes/modus-vivendi-tritanopia-theme.el: Update the palette of each theme. * etc/themes/modus-themes.el (require): Remove call to cl-lib and do not use relevant functions. (modus-themes-operandi-colors, modus-themes-vivendi-colors) (modus-themes-version, modus-themes-report-bug): Remove old calls to 'make-obsolete' and related. (modus-themes--annotate-theme): Tweak the completion annotation function. (modus-themes--org-block): Deprecate the user option 'modus-themes-org-blocks'. (modus-themes-faces): Update faces. (modus-themes-custom-variables): Update the list of custom variables. Detailed release notes are available here: <https://protesilaos.com/codelog/2024-03-17-modus-themes-4-4-0/>.
* | Fix vc-dir when "remote" Git branch is localKévin Le Gouguec2024-03-171-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While in there, add that "tracking" branch to the vc-dir buffer. For bug#68183. * lisp/vc/vc-git.el (vc-git-dir-extra-headers): Reduce boilerplate with new function 'vc-git--out-ok'; stop calling vc-git-repository-url when REMOTE is "." to avoid throwing an error; display tracking branch; prefer "none (<details...>)" to "not (<details...>)" since that reads more grammatically correct. (vc-git--out-ok): Add documentation. (vc-git--out-str): New function to easily get the output from a Git command. * test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo) (vc-git-test--run): New helpers, defined to steer clear of vc-git-- internal functions. (vc-git-test-dir-track-local-branch): Check that vc-dir does not crash.
* | Merge from origin/emacs-29Eli Zaretskii2024-03-161-0/+51
|\ \ | |/ | | | | | | | | | | | | | | | | 3b791ebbe17 ; Fix 'usage:' keyword in Ffile_name_concat doc. ed48b0d657c ; * CONTRIBUTE: Ask not to use non-ASCII unless necessary. b708e639d63 ; * src/lread.c (maybe_swap_for_eln): Clarify warning mes... db027a06976 ; Fix bibtex-biblatex-field-alist docstring typo. a9be5c7ea92 ; * doc/lispref/control.texi (Conditionals): Add missing ... db5915f30ba Fix 'with-sqlite-transaction' fe491173e8f ; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).
| * Fix 'with-sqlite-transaction'F. Jason Park2024-03-111-0/+51
| | | | | | | | | | | | | | | | | | * lisp/sqlite.el (with-sqlite-transaction): Tuck misplaced body of else form back into feature-test control structure whence it escaped. (Bug#67142) * test/lisp/sqlite-tests.el: New file to accompany test/src/sqlite-tests.el.
* | Keep indenting text when 'shr-fill-text' is nil (bug#69555)Kévin Le Gouguec2024-03-153-20/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'shr-fill-...' functions handle both hard-filling (adding newlines to break long lines) and indentation. Setting 'shr-fill-text' to nil currently causes these functions to be short-circuited completely, so e.g. blockquotes are no longer indented, whereas the intent of this user option is only to prevent hard-filling to let visual-line-mode reflow text. * lisp/net/shr.el (shr-fill-lines): Document that the function handles more than just filling; move the 'shr-fill-text' check... (shr-fill-line): ... here, after indentation has been taken care of. * test/lisp/net/shr-resources/blockquote.html: * test/lisp/net/shr-resources/blockquote.txt: New test resources. * test/lisp/net/shr-tests.el (shr-test--rendering-check): Rename from 'shr-test', to make the relationship with the 'rendering' testcase clearer; prefer 'file-name-concat' to 'format'; raise ERT failure if need be, calling (ert-fail ...) directly instead of (should (not (list ...))). (shr-test--rendering-extra-configs): New variable to easily check that user customizations do not degrade rendering. (rendering): Consult that new variable; delegate failure-raising to reduce duplication.
* | Detect the readline support for Python shell completionLiu Hui2024-03-141-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-shell-comint-watch-for-first-prompt-output-filter): Detect the readline support. (python-shell-readline-completer-delims): Update docstring. (python-shell-completion-native-setup): Move the readline detection code to ... (python-shell-readline-detect): ... new function. (python-shell-completion-native-turn-on-maybe): Skip if Python has no readline support. (python-shell-completion-at-point): Respect the delimiter of readline completer in non-native completion. * test/lisp/progmodes/python-tests.el (python-shell-completion-at-point-1) (python-shell-completion-at-point-native-1) (python-completion-at-point-1, python-completion-at-point-2) (python-completion-at-point-pdb-1) (python-completion-at-point-while-running-1) (python-completion-at-point-native-1) (python-completion-at-point-native-2) (python-completion-at-point-native-with-ffap-1) (python-completion-at-point-native-with-eldoc-1): Skip tests if Python has no readline support. (python-shell-completion-at-point-jedi-completer): Add test for non-native Python shell completion. (bug#68559)
* | ; Simplify (with-current-buffer (get-buffer ...) ...)Tim Landscheidt2024-03-145-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to call 'get-buffer', since 'with-current-buffer' does that internally. * lisp/calendar/todo-mode.el (todo-merge-category): * lisp/comint.el (comint-dynamic-list-completions): * lisp/emacs-lisp/checkdoc.el (checkdoc-error): * lisp/emacs-lisp/debug.el (debug, debugger-record-expression): * lisp/emacs-lisp/eieio-opt.el (eieio-browse): * lisp/emacs-lisp/re-builder.el (reb-restart-font-lock): * lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command): * lisp/eshell/em-unix.el (eshell-poor-mans-grep): * lisp/gnus/gnus-group.el (gnus-add-mark): * lisp/net/eww.el (eww-next-bookmark, eww-previous-bookmark): * lisp/net/sieve.el (sieve-upload): * lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers): * lisp/obsolete/quickurl.el (quickurl-list-populate-buffer): * lisp/org/ob-calc.el: (org-babel-execute:calc): * lisp/org/org-agenda.el (org-agenda-use-sticky-p): * lisp/pcomplete.el (pcomplete-show-completions): * lisp/progmodes/bug-reference.el (bug-reference--try-setup-gnus-article): * lisp/progmodes/idlw-help.el (idlwave-highlight-linked-completions): * lisp/progmodes/verilog-mode.el (verilog-preprocess): * lisp/replace.el (occur-1): * lisp/term.el (term-dynamic-list-completions): * lisp/time.el (world-clock-update): * lisp/url/url-cache.el (url-store-in-cache): * lisp/vc/vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news): * lisp/vc/vc-rcs.el (vc-rcs-system-release): * lisp/vc/vc-svn.el (vc-svn-merge, vc-svn-merge-news): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--get-error-string-for-export): * test/lisp/erc/erc-dcc-tests.el (pcomplete/erc-mode/DCC--get-1flag) (pcomplete/erc-mode/DCC--get-2flags) (pcomplete/erc-mode/DCC--get-2flags-reverse): * test/lisp/erc/erc-networks-tests.el (erc-networks--rename-server-buffer--existing--noreuse): * test/lisp/erc/erc-scenarios-services-misc.el (erc-scenarios-services-misc--reconnect-retry-nick): * test/lisp/erc/erc-tests.el (erc--refresh-prompt): Replace (with-current-buffer (get-buffer ...) ...) with (with-current-buffer ...).