From ab4273056e0ab68a27fe807b16e2995bf84b72ec Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Wed, 29 Mar 2023 18:02:30 +0200 Subject: Comp fix calls to redefined primtives with op-bytecode (bug#61917) * 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'. --- src/comp.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/comp.c b/src/comp.c index 1fce108fea4..3f72d088a66 100644 --- a/src/comp.c +++ b/src/comp.c @@ -5910,6 +5910,14 @@ For internal use. */); Vcomp_loaded_comp_units_h = CALLN (Fmake_hash_table, QCweakness, Qvalue, QCtest, Qequal); + DEFVAR_LISP ("comp-subr-arities-h", Vcomp_subr_arities_h, + doc: /* Hash table recording the arity of Lisp primitives. +This is in case they are redefined so the compiler still knows how to +compile calls to them. +subr-name -> arity +For internal use. */); + Vcomp_subr_arities_h = CALLN (Fmake_hash_table, QCtest, Qequal); + Fprovide (intern_c_string ("native-compile"), Qnil); #endif /* #ifdef HAVE_NATIVE_COMP */ -- cgit v1.2.3 From 10918fc9d249fb829a363a4b73847289b8f2bce9 Mon Sep 17 00:00:00 2001 From: Shynur Date: Thu, 30 Mar 2023 01:29:17 +0800 Subject: Fix scrolling window when point moves up 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 --- src/xdisp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xdisp.c b/src/xdisp.c index 0b190529404..8e265fb5a49 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18546,8 +18546,9 @@ try_scrolling (Lisp_Object window, bool just_this_one_p, start_display (&it, w, startp); if (arg_scroll_conservatively) - amount_to_scroll = max (dy, frame_line_height - * max (scroll_step, temp_scroll_step)); + amount_to_scroll + = min (max (dy, frame_line_height), + frame_line_height * arg_scroll_conservatively); else if (scroll_step || temp_scroll_step) amount_to_scroll = scroll_max; else -- cgit v1.2.3