aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Make treesit-language-remap-alist completely transparent (bug#72388)Yuan Fu2025-01-191-4/+7
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/parsing.texi (Using Parser): Update manual. * src/treesit.c (Ftreesit_parser_create): Use the LANGUAGE argument given as the language for the parser, not the actual language.
* | | pdumper: Add static_assert for EMACS_RELOC_TYPE_BITSStefan Kangas2025-01-201-0/+2
| | | | | | | | | | | | * src/pdumper.c: Add static_assert for EMACS_RELOC_TYPE_BITS.
* | | Remove redundant case_Lisp_Int macroStefan Kangas2025-01-207-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The case_Lisp_Int macro was originally introduced with different definitions depending on USE_2_TAGS_FOR_INTS. However, since commit 2b5701247845, we have assumed that USE_2_TAGS_FOR_INTS is always defined, and the macro has only a single definition. As a result, the macro is now unnecessary, and replacing it with standard C case labels improves readability and understanding. * src/lisp.h (case_Lisp_Int): Delete macro. * src/alloc.c (process_mark_stack, survives_gc_p): * src/data.c (Fcl_type_of): * src/fns.c (value_cmp, sxhash_obj): * src/pdumper.c (dump_object): * src/print.c (print_object): * src/xfaces.c (face_attr_equal_p): Remove uses of above macro.
* | | Remove workaround for AIX 3.2 crashesStefan Kangas2025-01-191-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emacs does not support AIX 3.2 since 2008. This workaround for AIX 3.2.3 and 3.2.4 (released in 1992) was introduced in 1999 and was only active with #ifdef AIX3_2. In 2008, the condition was changed to #ifdef AIX when support for these older AIX versions was dropped. I couldn't find any justification for why this workaround was retained (instead of being removed) in the commit message or mailing list archives. Given that users of AIX 4.0 (released in 1995) or later have not had this workaround for over a decade (1999-2008), it seems safe to assume that it is no longer necessary. Removing it will also prevent the incorrect overriding of the LANG variable on those systems. * src/emacs.c [AIX] (main): Remove workaround for AIX 3.2. (Bug#75153)
* | | Prefer the 'min'/'max' macros where possibleStefan Kangas2025-01-196-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/composite.c (find_automatic_composition): * src/lisp.h (clip_to_bounds): * src/pgtkfns.c (PATH_MAX_LEN): * src/profiler.c (approximate_median): * src/unexmacosx.c (unexec_write_zero, unexec_copy, unexec_realloc): * src/xdisp.c (get_nearby_bol_pos): Prefer the 'min' and 'max' macros.
* | | Delete duplicate 'min' macroStefan Kangas2025-01-191-4/+0
| | | | | | | | | | | | | | | * src/gmalloc.c (min): Delete duplicate macro. We import lisp.h unconditionally, so it is always defined here.
* | | Delete unused aliases for callnStefan Kangas2025-01-191-9/+0
| | | | | | | | | | | | | | | * src/lisp.h (call1, call2, call3, call4) (call5, call6, call7, call8): Delete unused aliases for calln.
* | | Replace call[1-8] with callnStefan Kangas2025-01-1951-297/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the introduction of the 'calln' macro, the 'call1', 'call2', ..., 'call8' macros are just aliases for the former. This is slightly misleading and potentially unhelpful. The number of arguments N can also easily go out-of-synch with the used alias callN. There is no reason not to replace these aliases with using 'calln' directly. To reduce the risk for mistakes, the tool Coccinelle was used to make these changes. See <https://coccinelle.gitlabpages.inria.fr/website/>. * src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c: * src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c: * src/chartab.c, src/cmds.c, src/coding.c, src/composite.c: * src/data.c, src/dbusbind.c, src/dired.c, src/doc.c: * src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c: * src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c: * src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c: * src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c: * src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c: * src/pgtkselect.c, src/print.c, src/process.c, src/sort.c: * src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c: * src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c: * src/xmenu.c, src/xselect.c, src/xterm.c: Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
* | | * src/fileio.c (Finsert_file_contents): Fix last change.Eli Zaretskii2025-01-191-0/+5
| | |
* | | Fix visiting files in /proc/ directoryEli Zaretskii2025-01-191-2/+3
| | | | | | | | | | | | | | | * src/fileio.c (Finsert_file_contents): Treat regular files whose size is reported as zero as if they were special files. (Bug#75569)
* | | Prefer EMACS_INT_MAX to TYPE_MAXIMUM (EMACS_INT)Paul Eggert2025-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (GLYPH_CODE_P): Use EMACS_INT_MAX instead of TYPE_MAXIMUM (EMACS_INT), as it’s shorter and is what all the other code uses in this situation.
* | | Port recently-added bitfields back to GCCPaul Eggert2025-01-191-2/+2
| | | | | | | | | | | | | | | | | | * src/lisp.h (hash_table_std_test_t, hash_table_weakness_t): Name these as enum tags as well as typedefs, so that ENUM_BF works for them.
* | | Always define image_compute_scalePaul Eggert2025-01-181-0/+2
| | | | | | | | | | | | | | | | | | | | | * src/image.c (image_compute_scale): Define even if ! (defined HAVE_IMAGEMAGICK || defined HAVE_NATIVE_TRANSFORMS), because it is always used. Needed in platforms that lack all those image libraries.
* | | Port recently-added bitfields to IBM XL C 16.1Paul Eggert2025-01-181-2/+2
| | | | | | | | | | | | | | | | | | * src/lisp.h (struct Lisp_Hash_Table): Use ENUM_BF for members weakness and frozen_test, since they are enum bitfields.
* | | Prefer 'list (...)' to 'listn (N, ...)'Stefan Kangas2025-01-195-37/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/androidfns.c (Fandroid_query_battery): * src/buffer.c (make_lispy_itree_node): * src/keyboard.c (init_while_no_input_ignore_events): * src/window.c (Fset_window_configuration): * src/xterm.c (x_dnd_send_unsupported_drop): Prefer 'list (...)' to 'listn (N, ...)'. * admin/coccinelle/listn.cocci: New file.
* | | Fix a GTK memory leak (Bug#75636)Pip Cet2025-01-191-1/+0
| | | | | | | | | | | | * src/gtkutil.c (xg_create_frame_widgets): Don't call g_object_ref.
* | | Initialize full range in parse_menu_itemStefan Kangas2025-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | * src/keyboard.c (parse_menu_item): Initialize the full range of item, in case future changes makes ITEM_PROPERTY_ENABLE != ITEM_PROPERTY_MAX. Problem reported by Pip Cet <pipcet@protonmail.com>. Ref: https://mail.gnu.org/r/emacs-devel/2025-01/msg00680.html
* | | Fix treesit.el testsYuan Fu2025-01-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit--imenu-merge-entries): (Ftreesit_parser_set_included_ranges): Warn in the docstring that the function is destructive/owns the argument. * test/src/treesit-tests.el (treesit-range-fixup-after-edit): (treesit-imenu): Fix tests.
* | | Remap language symbol in treesit-query-compile (bug#72388)Yuan Fu2025-01-171-1/+4
| | | | | | | | | | | | * src/treesit.c (Ftreesit_query_compile): Use remapped language.
* | | Simplify alloc by assuming MALLOC_IS_LISP_ALIGNEDPaul Eggert2025-01-171-102/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Hong Xu <https://bugs.gnu.org/75551#14>. * src/alloc.c (MALLOC_IS_LISP_ALIGNED): static_assert it, since it is true on all current Emacs platforms. All uses simplified to assume it is true. (xmalloc, xzalloc, xrealloc, lisp_malloc): Just use malloc/calloc/realloc. Since we are using the malloc-gnu and realloc-posix modules, we need not worry about whether these functions return a null pointer for zero-size requests. (xrealloc): Stop worrying about no-longer-existing platforms where realloc (nullptr, ...) did not work. (laligned, lmalloc, lrealloc): Remove. All uses removed.
* | | Fix build on Solaris 10 (bug#75451)Pip Cet2025-01-172-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | * autogen.sh: Avoid bashism. * configure.ac (AC_PROG_AWK): Use. * src/Makefile.in (AWK): Set. (dmpstruct.h): Use "$(AWK)", not "awk". * src/dired.c (DT_UNKNOWN, DT_DIR, DT_LNK): Define all three constants or none of them.
* | | Turn macros into enums in keyboard.hStefan Kangas2025-01-172-28/+36
| | | | | | | | | | | | | | | | | | | | | * src/keyboard.h (item_property_idx, menu_item_pane_idx): Turn macros into enums. (ITEM_PROPERTY_MAX): New constant. * src/keyboard.c (parse_menu_item): Use above new constant.
* | | ; * src/font.c (syms_of_font): Fix typo.Pip Cet2025-01-161-1/+1
| | |
* | | Fix subtle problem with updating 'font_style_table'Eli Zaretskii2025-01-161-2/+21
| | | | | | | | | | | | | | | | | | | | | * src/font.c (font_style_to_value): Update the Vfont_* variables to keep them in sync with their slots in 'font_style_table'. (Bug#75521) (syms_of_font): Comment on usage of DEFVAR_LISP_NOPRO.
* | | Fix clear-string crash with text propertiesStefan Kangas2025-01-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | * src/fns.c (Fclear_string): Fix crash by clearing all text properties. (Bug#75581) * doc/lispref/strings.texi (Modifying Strings): Document the above behavior change. Fix proposed by Andreas Schwab <schwab@linux-m68k.org>.
* | | Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'Stefan Kangas2025-01-155-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (emit_limple_insn): * src/msdos.c (dos_set_keyboard, dos_rawgetc): * src/sysdep.c (convert_speed, list_system_processes): * src/w32fns.c (deliver_wm_chars, Fx_file_dialog): * src/w32term.c (record_event, w32_read_socket): Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'. * admin/coccinelle/arrayelts.cocci: New file.
* | | Use calln instead of calling Ffuncall directlyStefan Kangas2025-01-145-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/bytecode.c (bcall0): * src/comp.c (bcall0): * src/eval.c (apply1): * src/lisp.h (call0): * src/thread.c (invoke_thread_function): Use calln instead of calling Ffuncall directly. * admin/coccinelle/calln.cocci: New semantic patch.
* | | ; Fix wording and coding style of a recent commitEli Zaretskii2025-01-141-6/+2
| | | | | | | | | | | | | | | | | | * src/treesit.c (treesit_traverse_match_predicate): Fix style. * doc/lispref/parsing.texi (User-defined Things): Fix wording.
* | | Handle removal of selected tty child frameMartin Rudalics2025-01-146-75/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (root_frame): * src/frame.h (root_frame): Move declaration from dispextern.h to frame.h. (SET_FRAME_VISIBLE): Whend making the selected tty child frame invisible, use mru_rooted_frame to find a frame to switch to. * src/dispnew.c (root_frame): Move root_frame to frame.c. * src/frame.c (do_switch_frame): On ttys don't change the top frame when switching from a child frame to another frame with the same root. (root_frame): Move here from dispnew.c. (Fframe_root_frame): New Lisp function. (delete_frame): Whend deleting the selected tty child frame use, mru_rooted_frame to find a frame to switch to. * src/window.c (mru_rooted_frame): New function. * src/window.h (mru_rooted_frame): Declare it. * doc/lispref/frames.texi (Child Frames): Describe new function 'frame-root-frame'.
* | | src/comp.c: New macro CALLNIStefan Kangas2025-01-141-67/+55
| | | | | | | | | | | | | | | * src/comp.c (CALL0I, CALL1I, CALL2I, CALL4I): Delete macros. (CALLNI): New macro, replacing the above. All callers updated.
* | | Prefer calln to CALLN where applicableStefan Kangas2025-01-149-39/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/callint.c (read_file_name): * src/comp.c (CALL0I, CALL1I, CALL2I, CALL4I, declare_imported_func): * src/data.c (Ffset, notify_variable_watchers): * src/eval.c (Ffuncall_with_delayed_message): * src/keymap.c (Fdescribe_buffer_bindings): * src/minibuf.c (Fread_buffer, Fcompleting_read): * src/pdumper.c (Fdump_emacs_portable): * src/print.c (print_vectorlike_unreadable): * src/treesit.c (treesit_traverse_match_predicate) (treesit_build_sparse_tree): Prefer calln to CALLN.
* | | Add 'and', 'named', and 'anonymous' predicate for tree-sitterYuan Fu2025-01-121-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/parsing.texi (User-defined Things): Mention the new predicate. * src/treesit.c (treesit_traverse_validate_predicate): Recognize named, anonymous, and and predicates. (treesit_traverse_match_predicate): Handle named, anonymous, and and predicates.
* | | Use eabs in Fcurrent_time_zoneStefan Kangas2025-01-131-1/+1
| | | | | | | | | | | | | | | | | | * src/timefns.c (Fcurrent_time_zone): Use eabs. * test/src/timefns-tests.el (timefns-tests-current-time-zone): New test.
* | | ; Add some niceties to .lldbinitGerd Möllmann2025-01-121-0/+15
| | | | | | | | | | | | | | | * src/.lldbinit: Handle some signals for tty Emacs. New commands xreload and xattach. Common breakpoints.
* | | ; * src/keymap.c: Fix last change (bug#75219).Eli Zaretskii2025-01-121-1/+1
| | |
* | | Fix mouse-2 clicks on mode line and header lineEli Zaretskii2025-01-121-4/+14
| | | | | | | | | | | | | | | | | | * src/keymap.c (Fcurrent_active_maps): For clicks on mode-line and header-line, always override the keymaps at buffer position. (Bug#75219)
* | | ; * src/term.c (term_mouse_position): Fix 'fp' pointer.Juri Linkov2025-01-111-1/+1
| | |
* | | Fix handling of 'minibuffer' frame parameter for tty framesMartin Rudalics2025-01-111-4/+49
| | | | | | | | | | | | | | | | | | * src/frame.c (make_terminal_frame): Fix handling of 'minibuffer' frame parameter for tty child frames. Support 'minibuffer-only' child frames.
* | | ; * src/term.c (tty_frame_at, term_mouse_position): Fix last change.Eli Zaretskii2025-01-111-2/+6
| | |
* | | Merge from origin/emacs-30Eli Zaretskii2025-01-111-5/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d66b8d4becb Fix checkbox's child creation 26c5fadf474 Document that 'package-vc' doesn't support built-in packages ee61b9a050b ; Fix documentation of completion commands ce43d13593a ; Simplify admin/run-codespell fa1470d0699 ; Remove duplicated word in files.el Commentary dabaea97465 Improve checkdoc-common-verbs-wrong-voice docstring 6de2ee5663d Document string-as-{unibyte,multibyte} as obsolete in manual 7f76f872ebf Fix go-ts-mode var spec indentation (Bug#75362) 01464fc882d Add "text" as a thing in tsx-ts-mode 59c57337923 Improve doc string of 'package-delete' 313a191d047 ; * admin/MAINTAINERS: Remove Kelvin White. 002960ceabf Clarify that 'mac' line ending convention is not used on ... 4210e065648 Add language server for Odin ee1034422b0 ; Improve documentation of function-type display 1c49edc4080 Modernize "Commentary" section of files.el 505c1123e18 * INSTALL: Add advice how to invoke 'make install'. (Bug... 82e16cae9cc Improve the documentation of 'key-valid-p' # Conflicts: # etc/NEWS # lisp/progmodes/typescript-ts-mode.el
| * | ; Fix documentation of completion commandsEli Zaretskii2025-01-111-5/+5
| | | | | | | | | | | | | | | | | | * src/minibuf.c (Fcompleting_read): Move part of doc string of 'read-from-minibuffer' to doc string of this function. Suggested by Eshel Yaron <me@eshelyaron.com>.
* | | Support TTY child frames with GPM mouseJared Finder2025-01-112-13/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/frame.el (x-list-fonts): Delete `frame-at', to move to C implementation. * lisp/xt-mouse.el (xterm-mouse-event): Call new `tty-frame-at'. * src/term.c (tty_frame_at, Ftty_frame_at): New C function, replacing `frame-at' only for TTYs. (term_mouse_position): Use last_mouse_frame when it is set. (handle_one_term_event): Call tty_frame_at to get frame under mouse, store it in last_mouse_frame. Alter event coordinates based on mouse frame. (syms_of_term): Add tty-frame-at, last_mouse_frame. * src/termhooks.h: Make Gpm_Event parameter const.
* | | Protect Vframe_list updating from interruptionsRobert Pluim2025-01-101-0/+2
| | | | | | | | | | | | | | | | | | * src/frame.c (delete_frame): When deleting the frame from Vframe_list, block input, since input can arrive whilst we're running lisp (Bug#74902).
* | | Have 'split-window' optionally resurrect deleted windowsMartin Rudalics2025-01-101-95/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/window.c (Fwindow_old_buffer): Handle deleted window as argument. (make_parent_window): Remove function. (Fsplit_window_internal): New argument REFER for resurrecting deleted windows. Incorporate functionality of defunct make_parent_window. (Fdelete_window_internal, delete_all_child_windows): Store any deleted window's buffer in the window's old_buffer slot. (window_dead_windows_table): Make it a 'value' type hash table so the sequence number cannot affect its weakness. * lisp/window.el (split-window): New argument REFER. * doc/lispref/windows.texi (Resurrecting Windows): New section. (Splitting Windows): Explain new argument REFER. (Window Hooks): Rewrite description of 'window-old-buffer'. * etc/NEWS: Mention new REFER argument for 'split-window'.
* | | Use the treesit thing 'list' with symbol property 'treesit-thing-symbol'Juri Linkov2025-01-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/parsing.texi (User-defined Things): Mention new functions 'treesit-forward-list', 'treesit-down-list', 'treesit-up-list', 'treesit-show-paren-data' that use the thing 'list' with the symbol property 'treesit-thing-symbol' (bug#73404). * lisp/treesit.el: Put the property 'treesit-thing-symbol' on the symbol 'list'. (treesit--forward-list-with-default, treesit-down-list) (treesit-up-list, treesit-navigate-thing) (treesit-show-paren-data--categorize, treesit-major-mode-setup): Replace 'sexp-list' with 'list'. * lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode) (tsx-ts-mode): * lisp/textmodes/html-ts-mode.el (html-ts-mode): Replace 'sexp-list' with 'list'. * src/treesit.c (treesit_traverse_validate_predicate) (treesit_traverse_match_predicate): Check if the 'pred' symbol has the property 'Qtreesit_thing_symbol'. (syms_of_treesit): New symbol 'Qtreesit_thing_symbol'.
* | | In xt_action_hook don't act on deleted window's scroll bar (Bug#75120)Martin Rudalics2025-01-092-2/+2
| | | | | | | | | | | | | | | | | | | | | * src/xterm.c (xt_action_hook): Make sure window_being_scrolled is live (Bug#75120). * src/pdumper.c (dump_subr): Update pertinent hash of HASH_Lisp_Subr.
* | | ; Fix indentation in itree.cStefan Kangas2025-01-091-10/+10
| | |
* | | Improve 'gethash' docstringStefan Kangas2025-01-091-1/+4
| | | | | | | | | | | | | | | * src/fns.c (Fgethash): Improve docstring. Avoid exposing the C identifier 'dflt' to Lisp by providing a "usage:" string.
* | | ; * src/lisp.h (struct Lisp_Subr): Fix comment (again).Eli Zaretskii2025-01-081-2/+2
| | |
* | | ; * src/lisp.h (struct Lisp_Subr): Fix comment.Eli Zaretskii2025-01-081-2/+2
| | |