aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2016-07-06 06:03:12 +0300
committerDmitry Antipov2016-07-06 06:03:12 +0300
commitb1a64dba04146b1424eacd3bc363e5f0edeac2b2 (patch)
treef9a0efcb37df8056b97b434674cbe6a02ee7379f /src
parent1ba6f2c7bbacfda2bb014d30cfb3999146943de8 (diff)
downloademacs-b1a64dba04146b1424eacd3bc363e5f0edeac2b2.tar.gz
emacs-b1a64dba04146b1424eacd3bc363e5f0edeac2b2.zip
Reduce consing caused by vertical motion commands
* src/frame.c (Fframe_parameter): Avoid call to Fframe_parameters for the parameters frequently requested by calls to 'next-line' and 'previous-line'.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 540b69f9c3d..22143ab26bf 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2607,6 +2607,22 @@ If FRAME is nil, describe the currently selected frame. */)
2607 /* Avoid consing in frequent cases. */ 2607 /* Avoid consing in frequent cases. */
2608 if (EQ (parameter, Qname)) 2608 if (EQ (parameter, Qname))
2609 value = f->name; 2609 value = f->name;
2610#ifdef HAVE_WINDOW_SYSTEM
2611 /* These are used by vertical motion commands. */
2612 else if (EQ (parameter, Qvertical_scroll_bars))
2613 value = (f->vertical_scroll_bar_type == vertical_scroll_bar_none
2614 ? Qnil
2615 : (f->vertical_scroll_bar_type == vertical_scroll_bar_left
2616 ? Qleft : Qright));
2617 else if (EQ (parameter, Qhorizontal_scroll_bars))
2618 value = f->horizontal_scroll_bars ? Qt : Qnil;
2619 else if (EQ (parameter, Qline_spacing) && f->extra_line_spacing == 0)
2620 /* If this is non-zero, we can't determine whether the user specified
2621 an integer or float value without looking through 'param_alist'. */
2622 value = make_number (0);
2623 else if (EQ (parameter, Qfont) && FRAME_X_P (f))
2624 value = FRAME_FONT (f)->props[FONT_NAME_INDEX];
2625#endif /* HAVE_WINDOW_SYSTEM */
2610#ifdef HAVE_X_WINDOWS 2626#ifdef HAVE_X_WINDOWS
2611 else if (EQ (parameter, Qdisplay) && FRAME_X_P (f)) 2627 else if (EQ (parameter, Qdisplay) && FRAME_X_P (f))
2612 value = XCAR (FRAME_DISPLAY_INFO (f)->name_list_element); 2628 value = XCAR (FRAME_DISPLAY_INFO (f)->name_list_element);