summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ; * src/json.c (Fjson_insert): Doc fix.Eli Zaretskii2024-04-021-1/+2
|
* New functions to set and use context of window points (bug#33871)Juri Linkov2024-04-024-0/+124
| | | | | | | | | | | | | | | | | | | | * lisp/dired.el (dired-mode): Set buffer-local 'window-point-context-set-function' to remember 'dired-filename' or 'position' in the window with the Dired buffer. Set buffer-local 'window-point-context-use-function' to restore the remembered position of the window point. * lisp/tab-bar.el (tab-bar--tab): Use window-point-context-set. (tab-bar-select-restore-context): New user option. (tab-bar-select-tab): Use window-point-context-use. * lisp/window.el: Add '(context . writable)' to 'window-persistent-parameters'. (window-point-context-set, window-point-context-use): New functions. (window-point-context-set-default-function) (window-point-context-use-default-function): New functions. (window-point-context-set-function) (window-point-context-use-function): New variables.
* Fix json-insert unibyte buffer bug (bug#70007)Mattias Engdegård2024-04-022-47/+46
| | | | | | | | | | | Previously, a unibyte target buffer could be put in an incorrect state if json-insert was used to insert non-ASCII characters. * src/json.c (Fjson_insert): Simplify. Don't attempt to decode the data being inserted: it is guaranteed to be correct UTF-8 and is correct for both unibyte and multibyte buffers. * test/src/json-tests.el (json-serialize/roundtrip) (json-serialize/roundtrip-scalars): Extend tests.
* json-insert doc fixesMattias Engdegård2024-04-022-3/+4
| | | | | | * src/json.c (Fjson_insert): Precise the behaviour when the current buffer is multibyte and unibyte, respectively. * doc/lispref/text.texi (Parsing JSON): Refer to the right function.
* New condition/action entry 'category' for 'display-buffer' (bug#69983)Juri Linkov2024-04-024-0/+47
| | | | | | | | | | | | * doc/lispref/windows.texi (Choosing Window): Provide an example of using '(category . comint)' in the condition of 'display-buffer-alist' and in the action of 'display-buffer'. (Buffer Display Action Alists): Add a new action alist entry 'category'. * lisp/subr.el (buffer-match-p): Add a new condition 'category'. * lisp/window.el (display-buffer): Document a new action alist entry 'category'.
* Update JSON codec doc stringsMattias Engdegård2024-04-011-48/+50
| | | | | | * src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string) (Fjson_parse_buffer): Make the text more readable, fix minor errors and avoid terminology confusion.
* ; * src/json.c (json_parse_object): Call make_hash_table directly.Mattias Engdegård2024-04-011-2/+1
|
* Update JSON parser test and docsMattias Engdegård2024-04-012-6/+11
| | | | | | * test/src/json-tests.el (json-parse-string/object): Duplicated object keys are now retained in alist and plist output. * etc/NEWS: Mention it.
* (scheme-syntax-propertize-sexp-comment): Allow `#;` in stringsPo Lu2024-04-011-12/+21
| | | | | | * lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment): Don't get confused by `#;` inside strings and (normal) comments. (scheme-sexp-comment-syntax-table): Comment-out, unused.
* Correct custom type in tramp-androidsu.elPo Lu2024-04-011-1/+1
| | | | | * lisp/net/tramp-androidsu.el (tramp-androidsu-remote-path): Set type to '(repeat string).
* ; json.c stylistic adjustmentsPo Lu2024-04-011-3/+4
| | | | * src/json.c (json_parse_string): Stylistic changes.
* ; * doc/lispref/processes.texi: use @code for keywords in @tableMattias Engdegård2024-04-011-4/+4
| | | | See discussion in bug#69709.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacsEli Zaretskii2024-04-0114-230/+330
|\
| * * etc/NEWS: Mention a JSON codec improvement.Mattias Engdegård2024-04-011-0/+4
| |
| * Fix symbol list matching regexps.Vladimir Kazanov2024-04-012-14/+60
| | | | | | | | | | | | | | | | | | 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.
| * Don't signal `json-end-of-file` for short nonempty bad JSON inputsMattias Engdegård2024-04-012-6/+4
| | | | | | | | | | * src/json.c (json_parse_value): Generate a plain parse error. * test/src/json-tests.el (json-parse-string/short): Adapt test.
| * Faster JSON parsingMattias Engdegård2024-04-015-138/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speed up JSON parsing substantially by only UTF-8-parsing string literals and only exactly once. Previously, json-parse-string always first parsed the entire input and copied it to a new string, and then validated each string literal twice. We no longer create an extra new string when interning an alist key, nor do we garble plist keys with Unicode characters. * src/lread.c (intern_c_multibyte): New. * src/json.c (json_encode): Remove. (utf8_error): New. (json_parse_string): Faster and more careful UTF-8 decoding. Create and return a new multibyte string or symbol without extra decoding. All callers adapted. (Fjson_parse_string): Skip expensive input pre-decoding. * test/src/json-tests.el (json-parse-string/object-unicode-keys) (json-parse-string/short): New. (json-parse-string/string, json-parse-string/invalid-unicode): Adapt tests. * etc/NEWS: Mentioned change in errors.
| * Native JSON support is always availableMattias Engdegård2024-04-012-30/+1
| | | | | | | | | | | | * lisp/progmodes/sh-script.el (sh--json-read): Remove. (sh-shellcheck-flymake): Call json-parse-buffer directly. * test/src/json-tests.el: Don't check for function availability.
| * Fix mutates-arguments warning for `sort`Mattias Engdegård2024-04-011-9/+20
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (bytecomp--sort-call-in-place-p) (bytecomp--mutargs-nconc, bytecomp--mutargs-sort): New. (byte-compile-form, bytecomp--actually-important-return-value-p) (mutating-fns): Use a slightly more extendible scheme for specifying what arguments a function mutates. Give `sort` special treatment.
| * (scheme-syntax-propertize-sexp-comment): Handle nested sexp-commentsStefan Monnier2024-04-012-10/+34
| | | | | | | | | | | | | | | | | | Well, I'm not completely sure this will work right in all cases, because I've been confused about this in the past. It works in my test case, at least. * lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment): Look for nested `#;` and mark them appropriately.
| * Fix androidsu's `make-process' file name handlerPo Lu2024-04-011-7/+13
| | | | | | | | | | | | * lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process): Disable exec loader around call to setuid su binary.
| * (scheme-syntax-propertize-sexp-comment): Remove unused argumentniceume2024-04-011-3/+3
| | | | | | | | | | | | * lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment): Remove first arg, unused. (scheme-syntax-propertize): Adjust calls accordingly.
| * scheme.el: Enable dealing with regular expression literalniceume2024-04-012-1/+31
| | | | | | | | | | * lisp/progmodes/scheme.el (scheme-syntax-propertize-regexp): New function. (scheme-syntax-propertize): Use it.
| * Fix listing of Android root directory when it is accessiblePo Lu2024-04-011-15/+10
| | | | | | | | | | | | | | * src/androidvfs.c (android_root_closedir, android_root_dirfd) (android_root_opendir): Allocate an ersatz file descriptor even if directory is non-NULL, so that at-funcs will properly return file status for virtual files in the root directory.
| * Fix wildcard signals in dbusbind.cMichael Albinus2024-03-311-0/+16
| | | | | | | | | | * src/dbusbind.c (xd_read_message_1): Handle registered signals with wildcards. (Bug#69926)
| * Adapt Tramp version integrated in Emacs 29.3Michael Albinus2024-03-311-1/+1
| | | | | | | | | | * lisp/net/trampver.el: Adapt Tramp version integrated in Emacs 29.3.
* | Add support for `ch' and `cw' dimension specifiers for imagesZajcev Evgeny2024-04-013-4/+27
|/ | | | | | | | | | * src/image.c (image_get_dimension, lookup_image): Handle `ch' and `cw' dimension specifiers in addition to `em'. * src/dispextern.h: Add new members `face_font_height' and `face_font_width' to `struct image'. * doc/lispref/display.texi (Image Descriptors): Document `ch' and `cw'.
* List special directories when reading root directory on AndroidPo Lu2024-03-312-7/+156
| | | | | | | | | | | | | | | * src/androidvfs.c (root_vfs_ops): Substitute android_root_opendir for android_root_opendir. (struct android_root_vdir): New structure. (root_fd, root_fd_references): New variables. (android_root_readdir, android_root_closedir, android_root_dirfd) (android_root_opendir): New functions. (android_fstatat_1): Test provided fd against root_fd, and if they match, prefix FILENAME with the name of the root directory. * lisp/ls-lisp.el (ls-lisp-insert-directory): If d-f-a-a signals an error while retrieving attributes, compile the alist of directory contents by hand.
* Add global minor mode 'global-completion-preview-mode'Eshel Yaron2024-03-313-4/+13
| | | | | | | | | | | This is a global variant of 'completion-preview-mode'. * lisp/completion-preview.el (global-completion-preview-mode): New global minor mode. * doc/emacs/programs.texi (Symbol Completion): Document it. * etc/NEWS: Announce it. (Bug#70010)
* Fix the new PEG libraryEli Zaretskii2024-03-313-86/+120
| | | | | | | | | | | * 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.
* ; Another round of stylistic fixes in json.cEli Zaretskii2024-03-311-97/+71
| | | | | | | * src/json.c (json_parser_init, json_parse_object) (json_parse_value, Fjson_parse_string, json_parse) (json_create_float, json_create_integer, json_parse_args): Fix whitespace and indentation.
* ; json.c stylistic adjustmentsPo Lu2024-03-311-25/+32
| | | | | | * src/json.c (json_signal_error, json_parser_init) (json_parse_object, json_parse_value, syms_of_json): Tabify and wrap unacceptably long lines.
* ; json.c stylistic adjustmentsPo Lu2024-03-311-41/+45
| | | | | | * src/json.c (json_parse_args, json_out_t, symset_t, symset_size) (Fjson_serialize, Fjson_insert): Tabify and modify all sentences to be punctuated with two spaces.
* Add peg.el as a built-in libraryEric Abrahamsen2024-03-306-0/+1679
| | | | | | * lisp/progmodes/peg.el: New file, taken from ELPA package. * test/lisp/peg-tests.el: Package tests. * doc/lispref/peg.texi: Documentation.
* Make gnus cache work with group names having '/'James Thomas2024-03-302-21/+9
| | | | | | | | | Make `gnus-cache-file-name` use the existing `nnmail-group-pathname`. * lisp/gnus/gnus-cache.el (gnus-cache-file-name) (gnus-cache-update-article): * lisp/gnus/nnmail.el (nnmail-group-pathname):
* Disable workDoneProgress if defcustom is nilTheodor Thornhill2024-03-301-1/+1
| | | | | | | | | | There is no need to receive the $/progress notifications from the server if we don't want to render them. Because they are effectively ignored when eglot-report-progress is nil we'd rather not waste cycles on serde of the messages. * lisp/progmodes/eglot.el (eglot-client-capabilities): use value from defcustom to decide whether or not to advertise to server.
* Fix typo in docstringTheodor Thornhill2024-03-301-1/+1
| | | | | * lisp/progmodes/eglot.el (eglot-lsp-server): eglot-current-server is now exposed.
* Fix the native JSON support codeEli Zaretskii2024-03-302-8/+12
| | | | | | | | * src/Makefile.in (base_obj): Add the missing json.o. Without this, we get link error. * src/json.c (json_serialize): Don't use too sophisticated C99 features, as they confuse make-docfile. Initialize all the members explicitly.
* Always enable native JSON support and remove Jansson referencesMattias Engdegård2024-03-3016-90/+18
| | | | | | | | | | | | | | | | | | | | | * src/json.c (Fjson__available_p): Remove. * lisp/subr.el (json-available-p): Always return t. * admin/nt/dist-build/build-dep-zips.py: * configure.ac: * doc/lispref/text.texi (Parsing JSON): * java/INSTALL: * java/org/gnu/emacs/EmacsNative.java (EmacsNative): * lisp/term/w32-win.el (dynamic-library-alist): * m4/ndk-build.m4 (ndk_INIT): * msdos/sed1v2.inp: * nt/INSTALL: * nt/INSTALL.W64: * src/Makefile.in: * src/emacs.c (main): * src/lisp.h: Remove JSON configuration options and references to it and Jansson from documentation and build files. * etc/NEWS: Announce.
* New JSON encoder (bug#70007)Mattias Engdegård2024-03-305-537/+581
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is in general at least 2x faster than the old encoder and does not depend on any external library. Using our own code also gives us control over translation details: for example, we now have full bignum support and tighter float formatting. * src/json.c (json_delete, json_initialized, init_json_functions) (json_malloc, json_free, init_json, json_out_of_memory) (json_releae_object, check_string_without_embedded_nulls, json_check) (json_check_utf8, lisp_to_json_nonscalar_1, lisp_to_json_nonscalar) (lisp_to_json, json_available_p, ensure_json_available, json_insert) (json_handle_nonlocal_exit, json_insert_callback): Remove. Remaining uses updated. * src/json.c (json_out_t, symset_t, struct symset_tbl) (symset_size, make_symset_table, push_symset, pop_symset) (cleanup_symset_tables, symset_hash, symset_expand, symset_add) (json_out_grow_buf, cleanup_json_out, json_make_room, JSON_OUT_STR) (json_out_str, json_out_byte, json_out_fixnum, string_not_unicode) (json_plain_char, json_out_string, json_out_nest, json_out_unnest) (json_out_object_cons, json_out_object_hash), json_out_array) (json_out_float, json_out_bignum, json_out_something) (json_out_to_string, json_serialize): New. (Fjson_serialize, Fjson_insert): New JSON encoder implementation. * test/src/json-tests.el (json-serialize/object-with-duplicate-keys) (json-serialize/string): Update tests.
* Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacsEli Zaretskii2024-03-303-5/+30
|\
| * Add use-package-vc-prefer-newest user optionTony Zorman2024-03-303-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/use-package/use-package-core.el (use-package-vc-prefer-newest): User option to prefer the latest commit (as opposed to the latest release) of a package. (use-package-normalize--vc-arg): Check for use-package-vc-prefer-newest. * doc/misc/use-package.texi (Install package): Document use-package-vc-prefer-newest. * etc/NEWS: Document use-package-vc-prefer-newest.
* | bug#69992: Minor improvement to image map transformation logicDavid Ponce2024-03-302-105/+131
|/ | | | | | | | | | | | | | | | | | * 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-303-1/+16
|\ | | | | | | | | | | 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 (...
| * Avoid errors in Info-search-case-sensitively in DIR buffersEli Zaretskii2024-03-301-1/+1
| | | | | | | | | | | | * lisp/info.el (Info-search): Don't run the "try other subfiles" code if there are no subfiles. This happens, for example, in DIR files. (Bug#70058)
| * Add test for previous change (bug#70023)Theodor Thornhill2024-03-281-0/+14
| | | | | | | | | | * test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: Add test.
| * Add typescript-ts-mode indentation for interface bodies (bug#70023)Noah Peart2024-03-281-0/+1
| | | | | | | | | | | | * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules): Add indentation rule for interface bodies.
* | ; Merge from origin/emacs-29Eli Zaretskii2024-03-300-0/+0
|\| | | | | | | | | | | The following commit was skipped: 95d9e6eb6b4 * Don't install unnecessary trampolines (bug#69573) (don'...
| * * Don't install unnecessary trampolines (bug#69573) (don't merge)Andrea Corallo2024-03-261-7/+9
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Check that subr-name actually matches the target subr.
* | Merge from origin/emacs-29Eli Zaretskii2024-03-302-9/+19
|\| | | | | | | | | 38faacf353f Improve documentation of <Delete> in user manual 9d3d77f12da Fix documentation of 'other-window-for-scrolling'