summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Change cursor color on NS port when it matches the face backgroundDaniel Martín2023-04-082-23/+47
| | | | | | | | | | | | | | | | | | | | * src/macfont.m (CG_SET_FILL_COLOR_WITH_FRAME_CURSOR): New macro. (CG_SET_FILL_COLOR_WITH_FRAME_BACKGROUND): New macro. (macfont_draw): When the cursor's color matches the face background, set the fill color of the cursor to the face foreground. * src/nsterm.m (ns_maybe_dumpglyphs_background): When dumping the background of a glyph string, apply the logic mentioned above. (Bug#62573)
* | Fix scrolling window when point moves upShynur2023-03-301-2/+3
| | | | | | | | | | | | | | | | | | | | This fixes the case when both 'scroll-conservatively' and 'scroll-step' are customized to non-default values. * src/xdisp.c (try_scrolling): Fix precedence between 'scroll-step' and 'scroll-conservatively' when scrolling with 'previous-line'. (Bug#62530) Copyright-paperwork-exempt: yes
* | Comp fix calls to redefined primtives with op-bytecode (bug#61917)Andrea Corallo2023-03-291-0/+8
|/ | | | | | | | * test/src/comp-tests.el (61917-1): New test. * src/comp.c (syms_of_comp): New variable. * lisp/loadup.el: Store primitive arities before dumping. * lisp/emacs-lisp/comp.el (comp--func-arity): New function. (comp-emit-set-call-subr): Make use of `comp--func-arity'.
* Improve docs for global-mode-string / %M constructPhil Sainty2023-03-261-1/+1
| | | | | * src/xdisp.c (global-mode-string): Update docstring. * doc/lispref/modes.texi: Update manual.
* * src/buffer.c (mode-line-format): Document %o and %q constructsPhil Sainty2023-03-261-0/+3
| | | | Missed from commit b0b02ca7f3e06d0f092df6f81babd1277bf93b0f.
* * src/buffer.c (mode-line-format): Remove docs for obsolete %t constructPhil Sainty2023-03-261-1/+0
| | | | | | | | | | | | | | | This documentation had been previously removed in 1999 in [1] but was subsequently restored again in a different form in 2006 in [2] as the construct was still supported on some systems. However it looks like it hasn't done what that documentation indicated since [3] in 2011, and the final remnant of this functionality was removed in [4] in 2013; so it seems clear that it's no longer supported and shouldn't be documented now. [1] commit 08de62001945d4dd32a3d6af44da05804cb296d5 [2] commit dafbe726b89a36010f3f24bb1efe4ace0a5f7f0f [3] commit 05c652517317d10690aaf0a6aa0bc876382b9d82 [4] commit 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d
* Fix system time sampling on MS-WindowsEli Zaretskii2023-03-241-0/+9
| | | | | | * src/timefns.c (emacs_localtime_rz) [WINDOWSNT]: Unconditionally call tzset to make sure we pick up all the changes of time zone, working around the MS CRT caching.
* Fix treesit_ensure_parsed (bug#62333)Yuan Fu2023-03-241-5/+5
| | | | | | * src/treesit.c (treesit_ensure_parsed): Check for need_reparse after treesit_sync_visible_region runs, because as the comment says, treesit_sync_visible_region might modify need_reparse.
* Fix toolbar item validation in the NS portDaniel Martín2023-03-231-0/+4
| | | | | | | | * src/nsterm.m ([EmacsView validateToolbarItem:]): Implement this NSToolbarItemValidation method, which is called by AppKit when it needs to validate an image item in a toolbar. This solves, in particular, the problem with having the "Save" icon on the tool bar enabled at Emacs startup. (Bug#62234)
* Improve warning about changing the string returned by symbol-nameGregory Heytings2023-03-191-1/+4
| | | | | | * src/data.c (Fsymbol_name): Add warning. See bug#62009. * doc/lispref/symbols.texi (Creating Symbols): Improve warning.
* Protect against too large size of 'recent-keys' vectorEli Zaretskii2023-03-191-2/+15
| | | | | | * src/keyboard.c (MAX_NUM_RECENT_KEYS): New macro. (Flossage_size): Don't allow specifying too large lossage-size. Fix data types. (Bug#62277)
* Don't add a key binding when REMOVE is non-nilRobert Pluim2023-03-171-15/+16
| | | | | * src/keymap.c (store_in_keymap): Don't add a nil keybinding if we've been asked to remove a non-existent binding. (Bug#62207)
* Fix value history shown for 'gc-cons-percentage'Eli Zaretskii2023-03-121-1/+1
| | | | | | | | | | | When Emacs is built, temacs is run in batch mode, so if we enlarge 'gc-cons-percentage' in that case, the enlarged value will be "remembered" by the dumped Emacs, and will show confusing information in "C-h v", claiming that the original value was 1.0. Keeping the value at 0.1 during dumping avoids that. * src/emacs.c (main): Increase 'gc-cons-percentage' in batch mode only if we are not initializing (a.k.a. "dumping") Emacs.
* ; More accurate doc strings for 'window-at' and 'window-at-x-y'.Eli Zaretskii2023-03-041-2/+5
| | | | | * lisp/window.el (window-at-x-y): * src/window.c (Fwindow_at): Doc fix. (Bug#61948)
* * src/intervals.c (set_intervals_multibyte_1): Fix bug#61887Stefan Monnier2023-03-031-0/+3
| | | | | | When `total_length` is 0 there should be no subtree at all, but `delete_interval` only deletes one interval, so make sure we don't end up with some stale child of `i`.
* Improvements to xwidget on macOS (bug#60703)Andrew De Angelis2023-03-023-53/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/nsxwidget.m () ([XwWebView initWithFrame:configuration:xwidget:]) (nsxwidget_init): Fixed memory leaks: when sending an alloc message to an object, send an autorelease message to any objects we won't explictly release. ([XwWebView webView:didFinishNavigation:]): Second string to store in 'store_xwidget_event_string' is "load finished" rather than empty string. ([XwWebView webView:didStartProvisionalNavigation:]) ([XwWebView webView:didReceiveServerRedirectForProvisionalNavigation:]) ([XwWebView webView:didCommitNavigation:]): New functions. (nsxwidget_webkit_estimated_load_progress): New function. (nsxwidget_webkit_stop_loading): New function. * src/xwidget.c (Fxwidget_webkit_estimated_load_progress): Call 'nsxwidget_webkit_estimated_load_progress' if we're on MacOS. (Fxwidget_webkit_stop_loading): Call 'nsxwidget_webkit_stop_loading' if we're on MacOS. (syms_of_xwidget): Define symbol for function. 'xwidget_webkit_estimated_load_progress' if we're on MacOS. * src/nsxwidget.h: Signature for functions 'nsxwidget_webkit_estimated_load_progress' and 'nsxwidget_webkit_stop_loading'. * lisp/xwidget.el (xwidget-webkit-current-url): Message URL rather than return value of 'kill-new' (which is always nil).
* * src/profiler.c (malloc_probe): Make it safe for GC (bug#60237)Stefan Monnier2023-03-011-0/+3
|
* Replace C++ comments with C style equivalentsPo Lu2023-03-013-5/+6
| | | | | | * src/alloc.c (Fmake_byte_code, purecopy): * src/bytecode.c (exec_byte_code): * src/xdisp.c (face_at_pos): Do not use C++-style comments!
* Fix 'vertical-motion' when display strings are aroundEli Zaretskii2023-02-261-1/+1
| | | | | * src/indent.c (Fvertical_motion): Correct bidi-related condition for character position, when we didn't move vertically. (Bug#61636)
* ; * src/treesit.c (treesit_predicate_match): Fix typo.Yuan Fu2023-02-261-1/+1
|
* Fix infloop in bidi.cEli Zaretskii2023-02-251-0/+1
| | | | | | | | * src/bidi.c (bidi_set_paragraph_end): Reset the isolate_level to zero. Whenever stack_idx is reset to zero, the isolate_level must also be reset, since there cannot be any isolate status outside of embeddings. Failure to reset isolate_level will cause us infloop when we see a PDI. Reported by Matt Beshara <m@mfa.pw>.
* Avoid crashes in batch mode due to lack of frame face cacheEli Zaretskii2023-02-241-1/+3
| | | | | * src/xfaces.c (Finternal_merge_in_global_face): Handle frames with no face cache.
* Avoid division by zero in get_narrowed_* functionsEli Zaretskii2023-02-221-5/+5
| | | | | * src/xdisp.c (get_narrowed_width, get_narrowed_len): Return at least 1 as the value. (Bug#61704)
* ; * src/xterm.c (x_update_end): Condition on HAVE_XDBERobert Pluim2023-02-211-0/+2
|
* Fix build --without-xdbeEli Zaretskii2023-02-211-0/+4
| | | | | * src/xterm.c (x_end_cr_clip, handle_one_xevent): Condition double-buffering code on HAVE_XDBE. (Bug#61667)
* regex-emacs.c: Reduce the use of backtracking a bit furtherStefan Monnier2023-02-201-0/+18
| | | | | | | | | | | bug#61514 exhibited some undesirable backtracking in a case where it's easy to avoid it by making `mutually_exclusive_p` just a bit more careful. * src/regex-emacs.c (mutually_exclusive_p): Handle `on_failure_jump`s. * test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization): Add a few tests.
* Make the native compiler always use `make-temp-file' for temporary filesAndrea Corallo2023-02-201-1/+6
| | | | | | | * src/comp.c (CALL4I): Define macro. (Fcomp__compile_ctxt_to_file): Use `make-temp-file' instead of `make-temp-file-internal'. * lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Likewise.
* Fix 'display-buffer-use-least-recent-window'martin rudalics2023-02-181-8/+25
| | | | | | | | | | | | | | | | | | | * src/window.c (Fwindow_use_time): Doc fix. (Fwindow_bump_use_time): Bump use time of the seleceted window as well. Doc fix. * lisp/window.el (display-buffer-avoid-small-windows): Remove. All users changed. (window--display-buffer): Bump window use time when requested. (display-buffer--lru-window): New function. (display-buffer-use-some-window): Use it. (display-buffer-use-least-recent-window): Rewrite and enhance doc string. * doc/lispref/windows.texi (Selecting Windows) (Buffer Display Action Functions, Buffer Display Action Alists) (The Zen of Buffer Display): Improve and update documentation of window selection and display facilities.
* Fix cursor motion when there's line-prefix and display string at BOLEli Zaretskii2023-02-181-2/+2
| | | | | | * src/xdisp.c (move_it_in_display_line_to): Handle 'line-prefix' and 'wrap-prefix' when the screen line has a display string at its beginning. (Bug#61580)
* Fix comment in treesit_record_change (bug#61369)Yuan Fu2023-02-181-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out the previous commit message and comment is not entirely correct: the old behavior is in fact wrong, not just "correct but has problems". Here is why the old code is wrong: |visible range| -> markup for visible range updated range -> markup for updated range ------------- First we have some text |aaaaaa| Now we insert something at the beginning, because we clip new_end_offset to visible_end, out of eight b's inserted, only the first six are known to tree-sitter. |bbbbbbbbaaaa|aa start: 0, old_end: 0, new_end: 6 ------ In treesit_sync_visible_region, we sync up visible region, but the two missing b's are not in the updated range. |bbbbbbbbaaaaaa| start: 12, old_end: 12, new_end: 14 -- The old behavior not only is wrong, but also doesn't make much sense. * src/treesit.c (treesit_record_change): Update comment.
* ; * src/treesit.c: Improve sectioning.Po Lu2023-02-181-1/+10
|
* Don't completely clip into visible range in treesit_record_changeYuan Fu2023-02-171-3/+12
| | | | | | | | | | | | | | | (Bug#61369) From min (visible_end, max (visible_beg, new_end_byte)) - visible_beg to max (visible_beg, new_end_byte) - visible_beg * src/treesit.c (treesit_record_change): We don't clip the new end into the visible range anymore. If you think of it, when inserting in a narrowed region, the visible region is always extended to accommodate more text, rather than pushing text at the end to keep the size of the visible region.
* ; Improve and update documentation of native compilationEli Zaretskii2023-02-171-41/+44
| | | | | | | | | | | | * src/comp.c (syms_of_comp) <native-comp-enable-subr-trampolines> <native-comp-eln-load-path>: Doc fixes. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Doc fix. * doc/lispref/compile.texi (Native-Compilation Variables): Document 'native-comp-jit-compilation' and 'native-comp-enable-subr-trampolines'.
* Merge 'emacs-29' into 'feature/inhibit-native-comp-cleanup'Andrea Corallo2023-02-174-113/+121
|\
| * Allow 'icon-title-format' to have the value tEli Zaretskii2023-02-171-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (gui_consider_frame_title, syms_of_xdisp): If the value of 'icon-title-format' is t, use 'frame-title-format' instead. (Bug#61496) * etc/NEWS: * doc/lispref/frames.texi (Frame Titles): Document the new handling of the value t. (Basic Parameters): Fix the documentation of the 'title' and 'name' frame parameters.
| * Improve backward compatibility of save-restrictionGregory Heytings2023-02-144-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (save_restriction_save_1): Renamed from 'save_restrictions_save'. Make it static. (save_restriction_restore_1): Renamed from 'save_restriction_restore'. Make it static. (save_restriction_restore): New function, combining 'save_restriction_save_1' and 'narrowing_locks_save'. (save_restriction_save): New function, combining 'save_restriction_restore_1' and 'narrowing_locks_restore'. (Fsave_restriction): Restore the previous code. (narrowing_locks_save, narrowing_locks_restore): Make them static. * src/lisp.h: Remove two functions that are not externally visible anymore. * src/comp.c (helper_save_restriction): Restore the previous code. * src/bytecode.c (exec_byte_code): Restore the previous code. * lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction): Decrement unbinding count.
| * Rename with/without-narrowing to with/without-restrictionEli Zaretskii2023-02-134-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi: * doc/lispref/display.texi: * doc/lispref/positions.texi: * etc/NEWS: * lisp/subr.el: * src/buffer.c: * src/editfns.c: * src/keyboard.c: * src/xdisp.c: * test/src/buffer-tests.el: Rename with-narrowing and without-narrowing to with-restriction and without-restriction. Likewise with internal--with-narrowing and internal--without-narrowing. All callers and documentation changed.
| * Merge branch 'scratch/fix-locked-narrowing'Gregory Heytings2023-02-137-106/+103
| |\
| | * Save and restore the absence of narrowing locksGregory Heytings2023-02-101-6/+4
| | | | | | | | | | | | | | | | | | | | | * src/editfns.c (narrowing_locks_save): Return the buffer with a empty locks list when the current buffer has no narrowing locks. (narrowing_locks_restore): Remove the narrowing locks if the buffer had no narrowing locks.
| | * Update the documentation about labeled (locked) narrowingGregory Heytings2023-02-094-79/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (syms_of_xdisp) <fontification-functions>: Update docstring. * src/keyboard.c (syms_of_keyboard) <pre-command-hook>: (syms_of_keyboard) <post-command-hook>: Update docstring. * src/editfns.c: (narrowing_locks): Explain why an alist is used instead of a buffer-local variable. (reset_outermost_narrowings): Point to recipes that demonstrate why it is necessary to restore the user narrowing bounds when redisplay starts. (Fwiden): Update docstring. (Fnarrow_to_region): Update docstring. (Finternal__lock_narrowing): Update docstring. (Finternal__unlock_narrowing): Update docstring. (Fsave_restriction): Update docstring. * src/buffer.c (syms_of_buffer) <long-line-optimizations-region-size>: Update docstring. (syms_of_buffer) <long-line-optimizations-bol-search-limit>: Update docstring. * lisp/subr.el (with-narrowing): Update docstring. (without-narrowing): Update docstring. * etc/NEWS: Mention the 'long-line-optimizations-region-size' and 'long-line-optimizations-bol-search-limit' options. Announce the 'with-narrowing' and 'without-narrowing' forms. * doc/lispref/positions.texi (Narrowing): Update the documentation of 'narrow-to-region', 'widen' and 'save-restriction'. Document the 'with-narrowing' and 'without-narrowing' special forms. * doc/lispref/display.texi (Auto Faces): Update the documentation. * doc/lispref/commands.texi (Command Overview): Document the fact that the buffer is narrowed around 'pre-command-hook' and 'post-command-hook' when the buffer text includes very long lines.
| | * Rename two long line optimizations variablesGregory Heytings2023-02-093-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/buffer.c (syms_of_buffer): Rename two variables. * src/xdisp.c (get_locked_narrowing_begv): (get_locked_narrowing_zv): (handle_fontified_prop): Use the new names. * src/keyboard.c (safe_run_hooks_maybe_narrowed): Use the new names.
| | * Add specific symbols for narrowingsGregory Heytings2023-02-092-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (syms_of_xdisp): Define symbol. (handle_fontified_prop): Use it. * src/keyboard.c (syms_of_keyboard): Define symbol. (safe_run_hooks_maybe_narrowed): Use it.
| | * Make 'narrowing-lock' and 'narrowing-unlock' internalGregory Heytings2023-02-091-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (Finternal__lock_narrowing): Renamed from 'narrowing-lock'. (Finternal__unlock_narrowing): Renamed from 'narrowing-unlock'. (unwind_narrow_to_region_locked): (narrow_to_region_locked): (syms_of_editfns): Use the new names. * lisp/subr.el (internal--with-narrowing): Use the new name.
| | * Fix 'save-restriction' for narrowing locksGregory Heytings2023-02-094-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (narrowing_locks_save): (narrowing_locks_restore): Make them non-static. * src/lisp.h: Make them externally visible. * src/bytecode.c (exec_byte_code): Save and restore narrowing locks. * lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction): Increment unbinding count. * src/comp.c (helper_save_restriction): Save and restore narrowing locks.
* | | Rename native-comp-deferred-compilation into native-comp-jit-compilationAndrea Corallo2023-02-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (maybe_defer_native_compilation, syms_of_comp): Rename native-comp-deferred-compilation into native-comp-jit-compilation. * lisp/subr.el (native-comp-deferred-compilation): Mark native-comp-deferred-compilation as obsolete. * lisp/startup.el (native-comp-deferred-compilation) (normal-top-level): Rename native-comp-deferred-compilation into native-comp-jit-compilation. * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load): Likewise. * lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer): Likewise.
* | | Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolinesAndrea Corallo2023-02-132-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (Ffset): Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines. * src/comp.c (syms_of_comp): Likewise. * lisp/subr.el (comp-enable-subr-trampolines): Make comp-enable-subr-trampolines obsolete. * lisp/startup.el (native-comp-enable-subr-trampolines) (normal-top-level): Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines. * lisp/loadup.el (dump-mode): Likewise. * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install) (comp--trampoline-abs-filename): Likewise.
* | | Support `comp-enable-subr-trampolines' as string valueAndrea Corallo2023-02-132-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (syms_of_comp): Update `comp-enable-subr-trampolines'. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions) (comp--trampoline-abs-filename): Support `comp-enable-subr-trampolines' string value. * src/data.c (Ffset): Use Vcomp_enable_subr_trampolines now.
* | | Revert "Add new variable 'inhibit-native-compilation'"Andrea Corallo2023-02-131-8/+0
| | | | | | | | | | | | This reverts commit 5fec9182dbeffa88cef6651d8c798ef9665d6681.
* | | Revert "Rename to inhibit-automatic-native-compilation"Andrea Corallo2023-02-131-4/+3
|/ / | | | | | | This reverts commit f97993ee667f9be7589825f3a4fbc095d6944ec6.
* | ; * src/pdumper.c (dump_buffer): Update hash.Basil L. Contovounesios2023-02-121-1/+1
| | | | | | | | | | This follows commit 8f3091defb3 of 2023-02-12 "; Fix typo in buffer.h".