aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Improve drag and drop on MS-Windows (bug#3468)Cecilio Pardo2024-10-253-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for 'dnd-scroll-margin' and 'dnd-indicate-insertion-point' by calling 'dnd-handle-movement' when dragging the mouse. * lisp/term/w32-win.el (w32-drag-n-drop): Call 'dnd-handle-movement' when applicable. * src/w32fns.c (w32_handle_drag_movement): New function, sends a WM_EMACS_DRAGOVER message. (w32_drop_target_DragEnter): Call 'w32_handle_drag_movement'. (w32_drop_target_DragOver): Call 'w32_handle_drag_movement'. * src/w32term.c: (w32_read_socket): Handle WM_EMACS_DRAGOVER, sending a drag-n-drop event. * src/w32term.h: Define new WM_EMACS_DRAGOVER message.
* | | Fix error message in charset.cEli Zaretskii2024-10-241-1/+2
| | | | | | | | | | | | | | | * src/charset.c (Fdefine_charset_internal): Don't reference uninitialized value in error message. (Bug#73985)
* | | Merge from origin/emacs-30Sean Whitton2024-10-242-1/+3
|\ \ \ | |/ / | | / | |/ |/| | | | | | | | | | | | | | | | | | | f5451b6a066 ; Improve comment from last change 09e05f7ee4d Document and-let* vs. when-let* usage convention b7a375f5c49 Fix error when splicing Eshell globs and a glob expands t... 2289e162268 * etc/package-keyring.gpg: Update expiration and add new key 48024096fea Avoid crashes when scrolling images under winner-mode c35d6ba9f07 ; * doc/lispref/display.texi (Fontsets): Clarify wording. 88a1a32fc57 ; * doc/lispref/display.texi (Fontsets): Fix typo. 6be47058cd7 ; Add indexing for 'use-default-font-for-symbols' 681f70ea04a * src/lread.c (READ_AND_BUFFER): Reject negative chars (b... ac4151e0023 * test/Makefile.in: Do not show emacs-module-tests.log by... 4e0cb960dbd Fix 'php-ts-mode': better indentation and font locking
| * Avoid crashes when scrolling images under winner-modeEli Zaretskii2024-10-211-1/+1
| | | | | | | | | | * src/window.c (window_scroll_pixel_based): Fix calculation of a window's vscroll. (Bug#73933)
| * * src/lread.c (READ_AND_BUFFER): Reject negative chars (bug#73914).Eli Zaretskii2024-10-201-0/+2
| |
* | Merge from origin/emacs-30Michael Albinus2024-10-181-1/+1
|\ \ | |/ | | | | | | | | | | | | 7dbbd58d6c9 Locate password icon in global-mode-string 19049efd30f ; Fix last documentation change 2c640e63a8a Explain tty-color-mode frame parameter more. e5d600006e2 ; * src/doc.c (Ftext_quoting_style): Make doc string agre... 90c6880a922 (track-changes--after): Fix problem found in bug#73041
| * ; * src/doc.c (Ftext_quoting_style): Make doc string agree with code.Mattias Engdegård2024-10-171-1/+1
| |
* | Merge from origin/emacs-30Michael Albinus2024-10-181-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 78e6328fafd ; (select-safe-coding-system-interactively): Say "safely ... c5eba443ae7 ; * lisp/icomplete.el (icomplete-in-buffer): Doc fix (bug... 569186c36e3 ; * doc/lispref/display.texi (Face Attributes): Fix typo ... d5723fc4f03 * lisp/progmodes/c-ts-mode.el (treesit-node-eq): Declare ... 0085e48f917 * admin/notes/emba: Docker builds do not run in a worktree. 3d30905b022 * lisp/calc/calc-ext.el (math-approx-sqrt-e): Doc fix (bu... 94d0e9c4018 : Revert a mistaken change 4d90a1d8209 ; * doc/emacs/search.texi (Word Search): Spelling fixes. c154047c46a Fix c-ts-mode--anchor-prev-sibling (bug#73661) b87fda63dd4 Fix formatting of long keyboard macros by 'list-keyboard-... ae75ea62324 ; * src/fileio.c (Ffile_newer_than_file_p): Fix wording (... b1203978685 Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ... de54d922b5c * doc/emacs/mini.texi (Passwords): Mention password visib... 0f8f0773183 ; * doc/emacs/search.texi (Word Search): Document 'dictio... fb155bcfb6f ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Doc fix. 6dbe4e99ac4 ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Improve... d664227f81a ; More accurate documentation of 'file-newer-than-file-p' e49b479f869 Fix c-ts-mode indentation for initializer lists (bug#73661) f520008744b Avoid segfaults in Rmail-MIME 6a5c2edd84f Eglot: use :immediate t when resolving completions (bug#7... cd36e070c24 Eglot: minor changes to doc and docstrings 1ea0d9b891b Revert "Set treesit-primary-parser for tree-sitter modes" 52746ceb625 Remove duplicate indent rules in elixir-ts-mode ed57faafc74 Set treesit-primary-parser for tree-sitter modes 37a6c859b04 ; * lisp/emacs-lisp/cl-macs.el (cl-once-only): Fix capita... 2d4d6dc43a4 Delete XIE X extension from TODO b68b9f291cc ; * lisp/progmodes/csharp-mode.el (treesit-query-compile)... 688201ef18d ; * lisp/window.el (switch-to-prev-buffer-skip-regexp): D... ba44fc9a447 Restore comment/string check for 'electric-layout-mode' 5a462948e13 Update Arni Magnusson's email address 6b1271b169a Fix python-ts-mode-map docstring aaaafddc945 Normalize "Commentary" section in eudc.el d656be9794d Expand email abbrevs in X-Debbugs-Cc header. e9dcf0c57dd Fix 'list-tags' when invoked from a non-file buffer 51ef05f684c count-windows: Fix reference to walk-windows 5eaf0c784bf * lisp/info-look.el (mapc): Add use-package manual's index. 705a5a1a9e6 ; * ChangeLog.4: Fix attribution of one change. bf26ff0dc8d Update csharp-ts-mode font-lock (bug#73369) 4c866abab96 ; * doc/lispref/variables.texi (Creating Buffer-Local): F... d42d7d474fe ; * lisp/doc-view.el (doc-view-svg-face): Copy-edit docst... f46f476bb8f ; * admin/MAINTAINERS: Take VC subsystem, add note about ... d68e6d2689d ; rcirc-update-activity-string: Justify some existing beh... e6a37869c8d Fix inconsistency in value of rcirc-activity-string 108b3179bd4 Revert "; Minor clarification in variables.texi" 44156c21407 ; Minor clarification in variables.texi 63058e1153a Tag interactive commands in 'lua-ts-mode' 84bea20eba2 ; * lisp/info-look.el: Add two more links. 96b87ad5363 Mention LSP acronym in eglot defgroup docstring 9c904e8ceae Change :group of 'eglot' defgroup to 'tools' fd1a1b07805 Remove out-of-date documentation from python.el 11e3e0cadd4 Fix executing commands in Eshell using "env" with no loca... c0ef8a9a1b3 Fix a typo in the calendar manual 36ff7138feb ; Fix a thinko in sieve-manage.el 7abecbcd633 ; * nt/INSTALL: Update MinGW notes URL. (Bug#73528) e2b01d164cd ; Fix last changes in php-ts-mode.el e8830015b07 Require ert-x for use by 'ert-font-lock-deftest-file' a1841b4d8e7 ; * admin/authors.el (authors-aliases): Don't ignore "one... 69d8f9d1b70 Fix php-ts-mode font-lock for latest PHP grammar (bug#73516) 68f53e43488 eieio.texi: Fix bug#73505 53c887fdf6d ; cperl-mode.el: Fix an invalid face specification f5cd5585f46 ; Recommend GNU Find for 'find-dired' 65e589698e6 ; * lisp/filesets.el (filesets-homepage): Fix URL. 1f243a97806 Delete duplicated line in Viper refcard
| * ; * src/fileio.c (Ffile_newer_than_file_p): Fix wording (bug#73709).Eli Zaretskii2024-10-131-2/+2
| |
* | Merge from origin/emacs-30Eli Zaretskii2024-10-122-2/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f8f0773183 ; * doc/emacs/search.texi (Word Search): Document 'dictio... fb155bcfb6f ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Doc fix. 6dbe4e99ac4 ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Improve... d664227f81a ; More accurate documentation of 'file-newer-than-file-p' e49b479f869 Fix c-ts-mode indentation for initializer lists (bug#73661) f520008744b Avoid segfaults in Rmail-MIME 6a5c2edd84f Eglot: use :immediate t when resolving completions (bug#7... cd36e070c24 Eglot: minor changes to doc and docstrings 1ea0d9b891b Revert "Set treesit-primary-parser for tree-sitter modes" 52746ceb625 Remove duplicate indent rules in elixir-ts-mode ed57faafc74 Set treesit-primary-parser for tree-sitter modes 37a6c859b04 ; * lisp/emacs-lisp/cl-macs.el (cl-once-only): Fix capita... 2d4d6dc43a4 Delete XIE X extension from TODO
| * ; More accurate documentation of 'file-newer-than-file-p'Eli Zaretskii2024-10-101-1/+2
| | | | | | | | | | | | * doc/lispref/files.texi (File Attributes): * src/fileio.c (Ffile_newer_than_file_p): Say the comparison uses the last-modification times. (Bug#73709)
| * Avoid segfaults in Rmail-MIMEEli Zaretskii2024-10-091-1/+3
| | | | | | | | | | | | | | | | | | Rmail-MIME decodes text of email, including removal of CR characters, but that can segfault if the text of some MIME part is empty. * src/coding.c (decode_coding_raw_text): * lisp/mail/rmailmm.el (rmail-mime-insert-decoded-text): Don't attempt to decode empty text region.
* | ; Fix coding style in w32fns.cPo Lu2024-10-091-9/+9
| | | | | | | | | | * src/w32fns.c (process_dropfiles, STDMETHODCALLTYPE) (w32_createwindow): Fix coding style.
* | Implement drag-n-drop for w32 with support for files and textCecilio Pardo2024-10-083-86/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement drag-n-drop with IDropTarget for MS-Windows. This allows for dropping files or text. * lisp/term/w32-win.el (w32-drag-n-drop): Change to handle files or strings. * src/w32fns.c (process_dropfiles): New function to convert DROPFILES struct to array of strings. (w32_process_dnd_data): New function to process drop data. (w32_try_get_data): Extract data from IDataObject. (w32_createwindow): Assign an IDropTarget to each new frame. (w32_name_of_message): New message. (w32_msg_pump): Changed CoInitialize to OleInitialize, needed by the drag-n-drop functions. (w32_wnd_proc): New struct w32_drop_target, and w32_drop_target_* functions to implement the IDropTarget interface. * src/w32term.c (w32_read_socket): Handle WM_EMACS_DROP and remove WM_EMACS_DROPFILES. * src/w32term.h: New message WM_EMACS_DROP. (Bug#3468) * etc/NEWS: Announce the new feature.
* | * src/comp.c (compile_function, Fcomp__compile_ctxt_to_file0): Use DOHASH.Andrea Corallo2024-10-031-11/+7
| |
* | Avoid assertion violations due to wrong 'min-width' propertyEli Zaretskii2024-10-031-9/+20
| | | | | | | | | | | | * src/xdisp.c (display_min_width): Ignore 'min-width' display specs which produce stretch glyphs wider than the window when lines are truncated. (Bug#73600)
* | Process focus-in events immediately on NSDaniel Colascione2024-10-021-0/+1
| | | | | | | | | | | | * src/nsterm.m ([EmacsView windowDidBecomeKey]): kick the main event loop when we get a focus-in event so it gets processed immediately (Bug#73559).
* | Cease accepting the :reverse-video face attribute (bug#73552)Mattias Engdegård2024-09-291-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | It was an old alias for :inverse-video that hasn't worked very well for many years. * src/xfaces.c (merge_face_ref, Finternal_set_lisp_face_attribute) (Finternal_set_lisp_face_attribute_from_resource) (Finternal_get_lisp_face_attribute) (Finternal_lisp_face_attribute_values, syms_of_xfaces): Stop recognising :reverse-video. * etc/NEWS: Announce.
* | Merge from origin/emacs-30Eli Zaretskii2024-09-281-1/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e8830015b07 Require ert-x for use by 'ert-font-lock-deftest-file' a1841b4d8e7 ; * admin/authors.el (authors-aliases): Don't ignore "one... 69d8f9d1b70 Fix php-ts-mode font-lock for latest PHP grammar (bug#73516) 68f53e43488 eieio.texi: Fix bug#73505 53c887fdf6d ; cperl-mode.el: Fix an invalid face specification f5cd5585f46 ; Recommend GNU Find for 'find-dired' 65e589698e6 ; * lisp/filesets.el (filesets-homepage): Fix URL. 1f243a97806 Delete duplicated line in Viper refcard d63bff4d88f Fix Tramp shortdoc integration 759b18a33c0 * lisp/imenu.el (imenu-flatten): More limitations in docs... 794bb2a2e31 remember-data-file: Don't unconditionally call set-visite... 7766ba84199 Align columns in which-key with wide characters properly bd25a98b4e7 bibtex-mode: fix patch bibtex validation for non-file buf... 4729065ee78 Document 'buttonize-region' in manual f189457e5aa ; * lisp/yank-media.el (yank-media-handler): Fix docstrin... 2b53e11a087 Use black-on-white by default for doc-view-svg-face. 32d0c8f6af5 etags-regen-file-extensions: Enable for more extensions 8f265b49e3d ; Fix last change c8ed48b9901 ; Improve documentation of 'append' c1f2501f55d Update and improve UI of sql-read-product (bug#73412) 4f5fc519f09 Insert correct commit data into VC package descriptions 98177d4b3d1 Document reporting security issues in user manual b986e2018a4 * BUGS: Minor copy edit.
| * ; Fix last changeEli Zaretskii2024-09-231-1/+1
| | | | | | | | | | | | * doc/lispref/lists.texi (Building Lists): * src/fns.c (Fappend): Fix last change (bug#73427). Suggested by Mattias Engdegård <mattias.engdegard@gmail.com>.
| * ; Improve documentation of 'append'Eli Zaretskii2024-09-231-1/+6
| | | | | | | | | | * doc/lispref/lists.texi (Building Lists): * src/fns.c (Fappend): Improve documentation of 'append'. (Bug#73427)
| * Fix 'replace-regexp' in WDiredEli Zaretskii2024-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | * src/search.c (Freplace_match): Revert the search.c part of the change from Apr 7, 2024, which aims to fix bug#65451, but causes bug#73018. Do not merge to master. * test/src/editfns-tests.el (editfns-tests--before/after-change-functions): Expect this test to fail.
| * Disable fontset-related workaround on non-Android systemsPo Lu2024-09-201-0/+4
| | | | | | | | | | | | | | | | * src/fontset.c (fontset_find_font) [!HAVE_ANDROID]: Don't refuse to cache font objects whose registries do not agree with the font specs. (bug#73363) Do not merge to master.
* | ; * src/cm.c (cmgoto): Fix last change.Eli Zaretskii2024-09-271-1/+1
| |
* | ; * src/cm.c (cmgoto): Add function documentation (bug#73487).Jeremy Bryant2024-09-271-0/+2
| |
* | ; * src/cm.c (calccost): Fix typo. (Bug#73485)Jeremy Bryant2024-09-261-1/+1
| |
* | Merge from origin/emacs-30Eli Zaretskii2024-09-214-31/+40
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4b9a8fd6074 etags-regen-file-extensions: Add .pm 956f14ae5e9 * src/treesit.c (treesit_debug_print_parser_list): Fix co... 300d05ecb4c Type-check argument to network-lookup-address-info 0f0f21b7f27 ; Improve doc strings of options related to numbered backups f0daa2f2153 Conservative heuristic for tree-sitter parser ranges (bug... 035024b4e5a ; Fix treesit.c printing 8771310a10d ; * admin/notes/unicode: Need to run textsec-tests (bug#7... 4c6f45fa8ee Re-enable GC mark trace buffer by default c6077015894 ; * src/haiku_support.cc: Correct last change. ae22ad7f624 ; Add even more tests for previous commit 460b9d705ab Fix treesit_sync_visible_region's range fixup code (bug#7... 81347c1aaf2 ; * etc/PROBLEMS: Fix last change (bug#73207). a82b7f3e823 Document unavailability of frame geometry on Wayland
| * * src/treesit.c (treesit_debug_print_parser_list): Fix compiler warning.Andrea Corallo2024-09-191-2/+2
| |
| * Type-check argument to network-lookup-address-infoRobert Pluim2024-09-191-0/+5
| | | | | | | | | | | | * src/process.c (Fnetwork_lookup_address_info): Check that the "name" argument is a string, and mention 'puny-encode-domain'. (Bug#73337)
| * Conservative heuristic for tree-sitter parser ranges (bug#73324)Yuan Fu2024-09-171-23/+18
| | | | | | | | | | | | | | | | * src/treesit.c (treesit_sync_visible_region): If the parser's original ranges don't overlap with visible region, give it a zero range, rather than don't set any range. * test/src/treesit-tests.el (treesit-range-fixup-after-edit): Test new behavior.
| * ; Fix treesit.c printingYuan Fu2024-09-171-2/+2
| | | | | | | | | | * src/treesit.c (treesit_debug_print_parser_list): Use PRIuPTR so 32bit systems compile without warnings.
| * Re-enable GC mark trace buffer by defaultMattias Engdegård2024-09-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable GC_REMEMBER_LAST_MARKED by default (it was disabled in Emacs 29) to make it easier to debug difficult-to-reproduce GC problems encountered by users. This increases GC costs by about 5 %, which can be avoided by turning the mark trace buffer back off using the new --disable-gc-mark-trace option. See discussion at https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00240.html * configure.ac (--disable-gc-mark-trace): New config option. * etc/NEWS: Mention it. * src/alloc.c: Enable it by default and avoid a compiler warning.
| * ; * src/haiku_support.cc: Correct last change.Po Lu2024-09-151-6/+6
| |
| * Fix treesit_sync_visible_region's range fixup code (bug#73264)Yuan Fu2024-09-151-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new_ranges_head | v ( )->( )->( )->( )->( ) ^ ^ | | | lisp_ranges (loop head) | prev_cons -> set cdr to nil to cut of the rest result: ( )->( ) * src/treesit.c (treesit_sync_visible_region): Cut off this cons and the rest, not set the current range's end to nil. * test/src/treesit-tests.el: (treesit-range-fixup-after-edit): Add tests for all cases.
* | Fix 'regexp-replace' in WDiredEli Zaretskii2024-09-211-10/+0
| | | | | | | | | | | | * src/search.c (Freplace_match): Remove the test that search_regs.num_regs != num_regs. It is deemed unnecessary now, and could produce false positives. (Bug#73018)
* | Remove obsolete workaroundPo Lu2024-09-201-26/+0
| | | | | | | | | | | | * src/fontset.c (fontset_find_font): Don't refuse to cache font objects whose registries do not agree with the font specs. (bug#73363)
* | ; Use c-ctype.h in w32*.cEli Zaretskii2024-09-182-11/+11
| | | | | | | | | | | | * src/w32.c: * src/w32fns.c: Replace ctype.h functions by equivalent c-ctype.h functions.
* | yes-or-no-p now uses blankp rather than SYNTAXPaul Eggert2024-09-181-3/+1
| | | | | | | | | | | | | | * src/fns.c: Do not include syntax.h; no longer needed. (Fyes_or_no_p): Use blankp rather than SYNTAX to check whether the prompt ends in nonspace. That way, the test doesn’t depend on the current buffer.
* | Fix misuse of toupper in sfnt_parse_stylePaul Eggert2024-09-171-4/+4
| | | | | | | | | | | | * src/sfntfont.c: Include c-ctype.h, not ctype.h. (sfnt_parse_style): Upcase just initial ASCII letters; that’s good enough here.
* | Fix yes-or-no-p with multibyte spacesPaul Eggert2024-09-171-8/+10
| | | | | | | | | | | | | | | | | | | | Problem reported by Thomas Klausner (Bug#73307). Emacs shouldn’t use ctype.h, as it doesn’t work for multibyte chars and it doesn’t work with Emacs’s locale model anyway. * src/fns.c: Include syntax.h, not ctype.h. (Fyes_or_no_p): Check the character category with SYNTAX, not with isspace, which assumes the current locale and works only with single-byte characters.
* | Remove unnecessary #includePaul Eggert2024-09-161-1/+0
| | | | | | | | | | * src/sysdep.c: Don’t include utimens.h; hasn’t been needed for a while.
* | Merge from savannah/emacs-30Po Lu2024-09-151-1/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 709ce2aff14 Port to Haiku R1/beta5 21efdd5ef31 Fix c++-ts-mode font-lock for latest c++ grammar (bug#73191) ffc00eac53d ; Set Transient's version and add admin/MAINTAINERS entry 3822a5e5d12 * admin/update-copyright: Print reminder to do manual upd... 43b678d3d26 * admin/notes/years: Update. 38de992a5a3 * etc/TODO: New item "support indentation guides". # Conflicts: # admin/notes/years # doc/misc/transient.texi # lisp/progmodes/c-ts-mode.el # lisp/transient.el
| * Port to Haiku R1/beta5Po Lu2024-09-151-1/+9
| | | | | | | | | | * src/haiku_support.cc (keysym_from_raw_char): Use revised names for B_HANGUL and B_HANGUL_HANJA.
* | Merge from origin/emacs-30Eli Zaretskii2024-09-143-95/+163
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d509a356997 Fix regression in widget-move (bug#72995) ef0276de82b ; * lisp/cus-edit.el (setopt): Doc fix. (Bug#73098) b115c2d5eba ; * lisp/minibuffer.el (completion-pcm--merge-completions... 3cda1fdc3b7 Correctly include fixed strings before a prefix wildcard ... 57d93d0259a ; * lisp/treesit.el (treesit-major-mode-setup): Doc fix. ad289f364e5 ; Improve documentation of 'easy-menu-define' 3cad7cc8dc8 Set treesit-primary-parser for c and elixir ts mode 2f243fb91d6 ; Minor doc fix in treesit.el 6a6d7925c9d Fix range handling so it works for multibyte buffer (bug#... 76faf7e6091 Revert "Read more on each call to treesit's buffer reader" c70bd0e3fe9 Fix tree-sitter indent preset prev-adaptive-prefix 272df33fb8b ; * CONTRIBUTE: Minor copyedits. 8e1187e336f Improve NEWS entries ca3932121a8 Don't fail uniquify-tests in non-version-controlled sourc... 79f68597aba ; * etc/ORG-NEWS: Fix typo. d66b70f3607 * doc/misc/auth.texi: Minor copy edits. 2c6b7b2da9f ; * admin/MAINTAINERS: Remove some entries for Artur Mala... 11e7ae3964e Fix bug#72254 # Conflicts: # etc/NEWS
| * Fix range handling so it works for multibyte buffer (bug#73204)Yuan Fu2024-09-142-89/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here by multibyte buffer I mean buffer that includes non-ASCII characters. The problem is illustrated by this comment, which I copied from the source: ====================================================================== (ref:bytepos-range-pitfall) Suppose we have the following buffer content ([ ] is a unibyte char, [ ] is a multibyte char): [a][b][c][d][e][ f ] and the following ranges (denoted by braces): [a][b][c][d][e][ f ] { }{ } So far so good, now user deletes a unibyte char at the beginning: [b][c][d][e][ f ] { }{ } Oops, now our range cuts into the multibyte char, bad! ====================================================================== * src/treesit.c (treesit_debug_print_parser_list): Minor fix. (treesit_sync_visible_region): Change the way we fixup ranges, instead of using the bytepos ranges from tree-sitter, we use the cached lisp charpos ranges. (treesit_make_ts_ranges): New function. (Ftreesit_parser_set_included_ranges): Refactor out the new function treesit_make_ts_ranges. (Ftreesit_parser_included_ranges): Rather than getting the ranges from tree-sitter, just return the cached lisp ranges. * src/treesit.h (Lisp_TS_Parser): Add some comment. * test/src/treesit-tests.el (treesit-range-fixup-after-edit): New test.
| * Revert "Read more on each call to treesit's buffer reader"Yuan Fu2024-09-141-4/+2
| | | | | | | | | | | | | | | | This reverts commit bf23382f1f2d6ea072db4e4750f8a345f77a3ef2. We move around the gap, narrow regions, ralloc, etc, and don't have a way to invalidate previously given range. So tree-sitter can't be given the full range.
| * Fix bug#72254Po Lu2024-09-121-3/+17
| | | | | | | | | | | | * src/pgtkselect.c (Fpgtk_get_selection_internal): If requesting TARGETS with just one result, return it as a vector. (bug#72254)
* | Support GUI dialogs and message boxes better on MS-WindowsCecilio Pardo2024-09-142-5/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32menu.c (TASKDIALOG_COMMON_BUTTON_FLAGS, TASKDIALOG_FLAGS) (PFTASKDIALOGCALLBACK, TASKDIALOG_BUTTON, TASKDIALOGCONFIG) (TDN_CREATED, TDM_ENABLE_BUTTON, TDF_ALLOW_DIALOG_CANCELLATION) (TD_INFORMATION_ICON) [!MINGW_W64]: Define. (TaskDialogIndirect_Proc): Declare function type. (TASK_DIALOG_MAX_BUTTONS): New macro. (task_dialog_callback): New callback function. (w32_popup_dialog): Add dialog implementation using TaskDialog. (globals_of_w32menu): Load TaskDialogIndirect from comctl32.dll. (Bug#20481)
* | Add Ftreesit_grammar_locationYuan Fu2024-09-121-13/+58
| | | | | | | | | | | | | | | | | | | | | | * src/treesit.c (treesit_loaded_lang): New struct. (treesit_load_language): Return a struct instead of just the language object. The struct contains both the language object and the path to the shared library. (Ftreesit_language_available_p, Ftreesit_language_abi_version) (treesit_ensure_query_compiled, Ftreesit_parser_create): Update call of treesit_load_language. (Ftreesit_grammar_location): New function.
* | For minibuffer windows record minibuffers only (Bug#72487)Martin Rudalics2024-09-112-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/minibuf.c (zip_minibuffer_stacks): Use wset type functions. Call 'record-window-buffer' instead of 'push-window-buffer-onto-prev' to handle all sorts of buffers shown in minibuffer windows in a uniform way. (read_minibuf): Call 'record-window-buffer' instead of 'push-window-buffer-onto-prev' for same reason as previous. * lisp/calculator.el (calculator-update-display) (calculator-save-and-quit): Make sure calculator buffer is live before operating on it. * lisp/window.el (record-window-buffer): Handle case where WINDOW is a minibuffer window: Unconditionally remove WINDOW's buffer from WINDOW's list of previous buffers and push it if and only if it is a live minibuffer (Bug#72487). Do not run 'buffer-list-update-hook' if WINDOW is a minibuffer window. (push-window-buffer-onto-prev): Make it an alias of 'record-window-buffer' so it will run the latter's checks. (replace-buffer-in-windows): Handle minibuffer windows and rewrite doc-string accordingly. * doc/lispref/windows.texi (Buffers and Windows): Explain handling of minibuffer windows in 'replace-buffer-in-windows'.