aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | * src/data.c (arithcompare): Simplify fixnum/bignum comparisons.Mattias Engdegård2024-07-271-2/+4
| | | | | | | | Noticed by Pip Cet.
* | Simplify and speed up numeric comparisonsMattias Engdegård2024-07-274-99/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes comparison functions (=, /=, <, <=, >, >=, min, max) quite a bit faster (10-20 %). Bytecode ops on fixnums are not affected, nor is `value<`. * src/data.c (arithcompare): Simplify the code to reduce the number of branches. Remove the comparison code argument; instead, return the relation encoded as bits, which can be tested cheaply. All callers adapted. * src/lisp.h (enum Arith_Comparison): Remove. (Cmp_Bit_*, cmp_bits_t): New.
* | Merge from origin/emacs-30Eli Zaretskii2024-07-2716-28/+28
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 88e1ec22f27 Update to Org 9.7.9 1ae2f004473 Fix edge-case with 'which-key-dont-use-unicode' setter 68a5f1f7d18 NS: prevent makeKeyWindow warnings (bug#69525) 59a895ec499 ; * .gitignore: Add lisp/eshell/esh-groups.el. 5c08cd4e7c3 ; * doc/emacs/cmdargs.texi (Initial Options): Fix last ch... 309d0a71864 Add PROBLEMS entry for bug#72303 87389f9ff90 ; Improve documentation of 'line-prefix' and 'wrap-prefix'. 268a2d10fc9 Improve documentation of '--init-directory' command-line ... c27055a938a ; cperl-mode.el: Fix fontification of flip-flop (Bug#72296) fcd4e4c895d ; * admin/MAINTAINERS: Add myself for maintaining some ar... fdc133e97f6 Fix bug in server.el introduced by 0d7d835902df af527051cd3 ; * admin/MAINTAINERS: Remove Nicolas Petton. 7170282a59a lisp/minibuffer.el (completion--sifn-requote): Fix bug#72176 68906f184cb * admin/notes/spelling: Update note. 9eea6be5abf Don't produce invalid XML with multi-line commenting style b97786d9f6e ; * etc/NEWS: Entry for 'gnus-summary-limit-to-age' (bug#... a7996615663 Standardize possessive apostrophe usage in manuals, docs,... 67faaead754 Don't refer to obsolete finder group "wp" # Conflicts: # etc/NEWS
| * NS: prevent makeKeyWindow warnings (bug#69525)Gerd Möllmann2024-07-261-1/+1
| | | | | | | | | | * src/nsterm.m (ns_raise_frame): Don't makeKeyWindow if frame has no_accept_focus set.
| * Standardize possessive apostrophe usage in manuals, docs, and commentsStefan Kangas2024-07-2516-27/+27
| | | | | | | | | | See the note in admin/notes/documentation. Ref: https://lists.gnu.org/r/emacs-devel/2012-02/msg00649.html
* | Fix display of 'display' strings in RTL paragraphs at window-startEli Zaretskii2024-07-251-4/+22
| | | | | | | | | | | | * src/xdisp.c (handle_single_display_spec) (get_overlay_strings_1, push_prefix_prop): Initialize bidi paragraph direction if not yet done. (Bug#72287)
* | Fix process-attributes rss and pmem on GNU/LinuxPaul Eggert2024-07-241-2/+8
| | | | | | | | | | | | | | Problem reported by Rahguzar <https://bugs.gnu.org/72278>. * src/sysdep.c (system_process_attributes): [GNU_LINUX || CYGWIN || __ANDROID__]: When computing rss and pmem, don’t assume pagesize is 4096; it could be greater.
* | Merge from savannah/emacs-30Andrea Corallo2024-07-241-7/+2
|\ \ | |/ | | | | | | | | 976416bebe2 Fix some function type declaration 23549d71751 * src/image.c (gui_put_x_image): Avoid memory leak. cb633820c15 ; * doc/misc/use-package.texi (Getting Started): Fix word...
| * * src/image.c (gui_put_x_image): Avoid memory leak.Po Lu2024-07-241-7/+2
| |
* | Merge from savannah/emacs-30Po Lu2024-07-241-1/+2
|\ \ | |/ | | | | 3a76354e092 Adapt last change to non-NS systems
| * Adapt last change to non-NS systemsPo Lu2024-07-241-1/+2
| | | | | | | | | | * src/image.c (xpm_load_image): Also check whether mask_img is NULL.
* | Merge from savannah/emacs-30Po Lu2024-07-241-4/+7
|\ \ | |/ | | | | b5543c54bf0 Fix NULL pointer dereferences in xpm_load_image
| * Fix NULL pointer dereferences in xpm_load_imagePo Lu2024-07-241-4/+7
| | | | | | | | | | | | * src/image.c (x_destroy_x_image): Correct test condition. (xpm_load_image): Do not release image data if it is still to be created.
* | Merge from savannah/emacs-30Po Lu2024-07-244-22/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1ee8579eb7d Fix bug#72255 05629d3af0a Delete redundant "a.k.a." in use-package.texi c7609464f70 Document (use-package 'emacs) declarations de9f9add138 Improve 'emacs-news-view-mode' menus and bindings 7588e1f8a9f ; * src/xdisp.c (Fformat_mode_line): Doc fix. 2074e94c3b1 Fix disappearing bar cursor on Hebrew text (bug#72230) 1aaadc8aec5 Fix DocView with DVI files c1382257aa8 ; Fix typo in use-package.texi caf7426f0ca FIx spurious fontification of variable in Java Mode 9b426e15abd Correctly typeset nil and t in texinfo f050b9c5033 Fix Tramp IPv6 handling in tests 46b192c04b1 Update to Org 9.7.8-5-gfdf0e0 87f41b937bc Fix Ftreesit_parser_create
| * Fix bug#72255Po Lu2024-07-241-8/+8
| | | | | | | | | | | | | | | | | | * src/image.c (struct image_type): Minor grammatical corrections. (image_destroy_x_image): [HAVE_NS]: Do not release Emacs_Pix_Containers, which are identical to Emacs_Pixmaps and consequently always released with the `struct image'. (bug#72255)
| * ; * src/xdisp.c (Fformat_mode_line): Doc fix.Eli Zaretskii2024-07-231-1/+1
| |
| * Fix disappearing bar cursor on Hebrew text (bug#72230)Gerd Möllmann2024-07-231-12/+8
| | | | | | | | | | * src/nsterm.m (ns_draw_window_cursor): Compute the correct bar cursor rectangle for R2L before setting the clipping.
| * Fix Ftreesit_parser_createYuan Fu2024-07-211-1/+3
| | | | | | | | | | * src/treesit.c (Ftreesit_parser_create): Use the buffer given by the caller rather than the current buffer.
| * Fix segfault when deleting tree-sitter query (bug#72238)Yuan Fu2024-07-211-2/+4
| | | | | | | | | | * src/treesit.c (treesit_delete_query): Only delete query and cursor when they are non-NULL.
* | Merge from savannah/emacs-30Po Lu2024-07-241-19/+18
|\ \ | |/ | | | | | | | | | | | | | | c66bda1a19a Improve treesit-node-child-by-field-name docstring 85773ab9771 Minor copyedits in tree-sitter starting guide 2dacec1609a Update tag for prebuilt tree-sitter grammars 68615a38669 Fix punctuation and doc style in treesit.c 00adee897ac ; Fix punctuation in docs ab29b28d4ba Fix DocView with PostScript files
| * Improve treesit-node-child-by-field-name docstringStefan Kangas2024-07-211-1/+1
| | | | | | | | * src/treesit.c (Ftreesit_node_child_by_field_name): Improve docstring.
| * Fix punctuation and doc style in treesit.cStefan Kangas2024-07-211-18/+17
| | | | | | | | | | | | | | * src/treesit.c (Ftreesit_parser_included_ranges) (Ftreesit_query_capture, treesit_traverse_sibling_helper) (treesit_traverse_match_predicate): Fix punctiation and documentation style in comments and docstrings.
* | * src/comp.c (obj_to_reloc): Use eassume.Stefan Kangas2024-07-231-1/+1
| |
* | Use SBYTES instead of strlen in treesit.cStefan Kangas2024-07-221-8/+4
| | | | | | | | | | | | * src/treesit.c (treesit_ensure_query_compiled) (Ftreesit_node_child_by_field_name, treesit_initialize_query): Use SBYTES instead of strlen.
* | Prohibit unbinding of built-in variablesPo Lu2024-07-221-23/+22
| | | | | | | | | | | | | | | | * src/data.c (set_internal): Signal error if a BLV with a redirect or a forwarded symbol is being unbound. * test/src/data-tests.el (binding-test-makunbound-built-in): New test.
* | Fix segfault when deleting tree-sitter query (bug#72238)Yuan Fu2024-07-211-2/+4
| | | | | | | | | | * src/treesit.c (treesit_delete_query): Only delete query and cursor when they are non-NULL.
* | ; Fix recent changes in pdumper.cEli Zaretskii2024-07-211-4/+2
| | | | | | | | | | * src/pdumper.c (dump_treesit_compiled_query, dump_vectorlike): Minor copyedits.
* | Fix bool vector length overflowPaul Eggert2024-07-203-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (make_clear_bool_vector): It’s now the caller’s responsibility to make sure the bool vector length is in range. Add an eassert to double-check this. This lets some locals be ptrdiff_t not EMACS_INT. (Fmake_bool_vector, Fbool_vector): Check that bool vector lengths are in range. * src/lisp.h (BOOL_VECTOR_LENGTH_MAX): New macro. (bool_vector_words, bool_vector_bytes): Avoid undefined behavior if size == EMACS_INT_MAX - (BITS_PER_BITS_WORD - 1). This is mostly theoretical but it’s easy to do it right. * src/lread.c (read_bool_vector): Use EMACS_INT, not just ptrdiff_t. Check that length doesn’t exceed BOOL_VECTOR_LENGTH_MAX. This fixes an unlikely integer overflow where the calculated size went negative.
* | Change list-length intptr_t to ptrdiff_tPaul Eggert2024-07-201-3/+3
| | | | | | | | | | | | | | | | | | * src/fns.c (list_length, Fsafe_length, Fproper_list_p): Use ptrdiff_t not intptr_t for accumulator, since result is ptrdiff_t. This fixes a minor glitch in 2019-01-11T05:35:31!eggert@cs.ucla.edu where I removed unnecessary overflow checks but forgot to change types. This change should alter generated code only on oddball platforms where ptrdiff_t is narrower than intptr_t, e.g., CheriBSD.
* | Support dumping tree-sitter query (bug#69952)Yuan Fu2024-07-202-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit allows Emacs to dump tree-sitter queries by simply dumping the query string and language symbol, and left the query object and cursor object as NULL. This commit makes sure Emacs doesn't crash when loading the dumped query, by make sure Emacs can handle the case where the cursor is NULL. * src/treesit.c (make_treesit_query): Initialize query with null cursor. (treesit_ensure_query_cursor): New function. (treesit_initialize_query): Ensure cursor is non-null. * src/treesit.h (Lisp_TS_Query): Update documentation.
* | Support compiled queries in pdump by dumping source (bug#69952)Sergey Vinokurov2024-07-201-1/+22
| | | | | | | | | | * src/pdumper.c (dump_vectorlike): Dump compiled queries. * src/pdumper.c (dump_treesit_compiled_query): New function.
* | SAFE_ALLOCA fixesPaul Eggert2024-07-209-51/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (declare_imported_func, emit_simple_limple_call) (declare_lex_function, compile_function): * src/emacs-module.c (funcall_module): * src/fns.c (Fstring_distance): * src/font.c (font_sort_entities): * src/haikumenu.c (digest_menu_items, haiku_menu_show): * src/pgtkselect.c (Fpgtk_register_dnd_targets): * src/xfns.c (Fx_begin_drag): * src/xmenu.c (x_menu_show): * src/xterm.c (x_dnd_compute_toplevels, handle_one_xevent) (x_term_init): Prefer SAFE_NALLOCA to doing size multiplication by hand, to catch unlikely integer overflows. * src/comp.c (emit_simple_limple_call): Fix bug where SAFE_FREE was called too early, leading to unlikely use of freed storage. * src/xterm.c (handle_one_xevent): Remove side effects from SAFE_ALLOCA args, as the args are evaluated twice.
* | ; Fix typo in xfont.cPo Lu2024-07-201-2/+2
| | | | | | | | * src/xfont.c (xfont_list): Subtract 9 from name, not 10 + 1.
* | Avoid magic values in xfont_listStefan Kangas2024-07-201-2/+2
| | | | | | | | * src/xfont.c (xfont_list): Avoid magic values.
* | Merge from origin/emacs-30Eli Zaretskii2024-07-201-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | 816c53c2d9d Fix bibtex validation for non-file buffers ab7c40ea52a Fix Imenu in 'emacs-news-view-mode' ea30ffc52b3 ; * doc/misc/gnus.texi (Agent Caveats): Fix doc 07b1a36f78c ; * src/sqlite.c (Fsqlite_load_extension): Add "vec0" to ... 96f1db89ee7 Avoid errors in 'icomplete-vertical-mode' 55110d1fda2 Document GNU ELPA copyright in tips.texi 079e5a03156 Improve register-use-preview docstring e4760109ac8 Miscellaneous checkdoc fixes
| * ; * src/sqlite.c (Fsqlite_load_extension): Add "vec0" to allowed extensions.Eli Zaretskii2024-07-201-0/+1
| |
* | Avoid accessing uninitialized bool_vector wordsPaul Eggert2024-07-203-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although loading uninitialized works from memory and then ignoring the result works fine on conventional architectures, it technically has undefined behavior in C, so redo bool_vector allocation so that the code never does that. This can improve performance when allocating large vectors of nil, since calloc can clear the memory lazily. * src/alloc.c (make_clear_bool_vector): New function, a generalization of make_uninit_bool_vector. (make_uninit_bool_vector): Use it. (Fmake_bool_vector): If !INIT, rely on make_clear_bool_vector. * src/alloc.c (Fbool_vector): * src/fns.c (Freverse): Don’t access uninitialized bool_vector words.
* | Fix compilation on builds with native rectangle structuresPo Lu2024-07-202-5/+11
| | | | | | | | | | | | | | | | | | | | * src/androidgui.h (CONVERT_TO_NATIVE_RECT) (CONVERT_FROM_EMACS_RECT): Delete redundant macro definitions. * src/xdisp.c (Fremember_mouse_glyph) [CONVERT_TO_EMACS_RECT]: Expand CONVERT_TO_EMACS_RECT to convert native rectangles into a readable format if required. Reported by Stefan Kangas <stefankangas@gmail.com>.
* | Respect mouse-fine-graned-tracking in touch screen simple translationPo Lu2024-07-201-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/touch-screen.el (touch-screen-current-tool): Expand doc string. (touch-screen-handle-point-update): Record extents of glyph beneath the mouse as computed by `remember_mouse_glyph' if necessary, and defer generation of mouse-movement events till the mouse exit it. * src/xdisp.c (Fremember_mouse_glyph): New function. (syms_of_xdisp): Define new subr.
* | Merge from origin/emacs-30Stefan Monnier2024-07-1911-14/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a478423d19f * lisp/progmodes/peg.el (peg-syntax-classes): Typo (bug#7... 951fb93956d * lisp/transient.el (static-if): Remove duplicated defini... 0218fb21437 Adapt file-remote-p doc 34c1094e607 ; Fix typo in etc/ORG-NEWS (Bug#72186) 5916b172bdc * etc/TODO: Delete item about merging Magit. a6cab228d4d ; Fix typos 41dc28244f2 * doc/man/emacs.1.in: Add "No warranty" notice. b2ac3435867 ; * doc/man/emacs.1.in: Improve wording. 110b3d08d73 Improve emacs man page description of --user flag 4911f08912a Checkdoc fixes in allout-widgets.el 109b592d77b Checkdoc fixes in subr.el 46436720787 Checkdoc fixes in touch-screen.el 9889774c62e Checkdoc fixes in treesit.el # Conflicts: # etc/NEWS
| * ; Fix typosStefan Kangas2024-07-1811-14/+14
| |
| * Avoid overflow in pgtk_is_numeric_charStefan Kangas2024-07-181-1/+1
| | | | | | | | | | | | * src/pgtkfns.c (parse_resource_key): Avoid overflow by making array larger, if a key is RESOURCE_KEY_MAX_LEN long. Do not merge to master, since it's fixed in a different way there.
* | Fix minor code style issue in pgtkfns.cStefan Kangas2024-07-181-9/+3
| | | | | | | | | | * src/pgtkfns.c (pgtk_get_defaults_value) (pgtk_set_defaults_value): Fix code style.
* | Avoid overflow in pgtk_is_numeric_charStefan Kangas2024-07-181-2/+6
| | | | | | | | | | | | * src/pgtkfns.c (PATH_MAX_LEN): New macro. (parse_resource_key): Avoid overflow if a key is RESOURCE_KEY_MAX_LEN long by making the array larger.
* | Use strnlen to avoid unnecessary work in pgtkfns.cStefan Kangas2024-07-181-4/+9
| | | | | | | | | | | | | | * src/pgtkfns.c (pgtk_get_defaults_value, pgtk_set_defaults_value): Factor out new function... (pgtk_check_resource_key_length): ...to here. Avoid unnecessary work by using strnlen.
* | Minor cleanup of code in insdel.cEli Zaretskii2024-07-181-2/+2
| | | | | | | | | | | | | | | | * src/insdel.c (del_range_2): Update *_BYTE variables _after_ updating the corresponding character values. This follows what we do everywhere else, and allows to put a watchpoint on, say, Z_BYTE to check consistency between the character and byte counts. See bug#72165 for one situation where it is useful.
* | Merge from savannah/emacs-30Po Lu2024-07-181-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | 4c35382e983 ; * src/emacs.c (syms_of_emacs) <Vsystem_type>: Fix doc s... 34882d52432 Port better to Android 3.0 765cfaed775 ; * doc/emacs/anti.texi (Antinews): Fix typos (bug#72167). 7093504da2d ; Fix typos (bug#72167) 8c7c4f4baaa New Tramp tests 85d2d7982d4 Update Tramp manual 504bdd560af ; Fix last change 3ccebbe17b7 Fix 'toggle-window-dedicated' documentation 719d5753ca6 ; * doc/lispref/help.texi (Keys in Documentation): Add cr... e3bba63ecb9 Checkdoc fixes in transient.el
| * ; * src/emacs.c (syms_of_emacs) <Vsystem_type>: Fix doc string indentation.Po Lu2024-07-181-1/+1
| |
* | Quote BIN_DESTDIR betterPaul Eggert2024-07-161-3/+3
| | | | | | | | | | | | | | | | * Makefile.in (BIN_DESTDIR, install-eln, uninstall): * src/Makefile.in ($(pdmp)): Be more consistent about quoting BIN_DESTDIR and ELN_DESTDIR, avoiding double-quoting ''like this'' which does not work as expected.
* | Simplify time form analysisPaul Eggert2024-07-161-129/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not change behavior; it merely refactors the code for simplicity. * src/timefns.c (enum timeform, struct form_time): Remove. All uses removed. (decode_time_components): Accept HZ instead of FORM. This saves a switch. All uses changed. (decode_lisp_time): Return union c_time instead of struct form_time. All uses changed. (lisp_time_cform): Remove. All uses changed to just use decode_lisp_time. (time_arith, Ftime_convert): Check (TICKS . HZ) form directly using CONSP, instead of using the old struct form_time. That's fast enough here.