+2014-12-14 Alan Mackenzie <acm@muc.de>
+
+ * display.texi (Scrolling): fast-but-imprecise-scrolling.
+ Describe new variable.
+
2014-12-14 Cameron Desautels <camdez@gmail.com>
* custom.texi (Saving Customizations): Mention
command that has a non-@code{nil} @code{scroll-command} property.
@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
+@vindex fast-but-imprecise-scrolling
+ Sometimes, particularly when you hold down keys such as @kbd{C-v}
+and @kbd{M-v}, activating keyboard auto-repeat, Emacs fails to keep up
+with the rapid rate of scrolling requested; the display doesn't update
+and Emacs can become unresponsive to input for quite a long time. You
+can counter this sluggishness by setting the variable
+@code{fast-but-imprecise-scrolling} to a non-@code{nil} value. This
+instructs the scrolling commands not to fontify (@pxref{Font Lock})
+any unfontified text they scroll over, instead to assume it has the
+default face. This can cause Emacs to scroll to somewhat wrong buffer
+positions when the faces in use are not all the same size, even with
+single (i.e. without auto-repeat) scrolling operations.
+
@vindex scroll-up
@vindex scroll-down
@findex scroll-up-line
+2014-12-14 Alan Mackenzie <acm@muc.de>
+
+ * NEWS: Add entry for fast-but-imprecise-scrolling.
+
2014-12-14 Cameron Desautels <camdez@gmail.com>
* NEWS: Mention `custom-prompt-customize-unsaved-options'.
a directory file name. It returns non-nil if the last character in
the name is a forward slash.
++++
+** New variable `fast-but-imprecise-scrolling' inhibits
+fontification during full screen scrolling operations, giving less
+hesitant operation during auto-repeat of C-v, M-v at the cost of
+possible inaccuracies in the end position.
+
\f
* Editing Changes in Emacs 25.1
+2014-12-14 Alan Mackenzie <acm@muc.de>
+
+ * lisp/cus-start.el (all): Add fast-but-imprecise-scrolling.
+
2014-12-14 Artur Malabarba <bruce.connor.am@gmail.com>
* let-alist.el: Add lexical binding.
:value display-buffer)
(other :tag "Always (t)" :value t))
"24.3")
+ (fast-but-imprecise-scrolling scrolling boolean "25.1")
(window-resize-pixelwise windows boolean "24.4")
;; xdisp.c
;; The whitespace group is for whitespace.el.
+2014-12-14 Alan Mackenzie <acm@muc.de>
+
+ New feature optionally to accelerate auto-repeated scrolling.
+
+ * xdisp.c: Remove "static" from declaration of
+ Qfontification_functions.
+
+ * window.c (window_scroll): bind fontification-functions to nil
+ when scrolling by whole screens and
+ fast-but-imprecise-scrolling is non-nil.
+ (syms_of_window): New DEFVAR_BOOL
+ fast-but-imprecise-scrolling.
+
+ * lisp.h (bool): Declare Qfontification_functions extern.
+
2014-12-14 Eli Zaretskii <eliz@gnu.org>
Load system's default trusted Certificate Authorities if available.
/* Defined in xdisp.c. */
extern Lisp_Object Qimage;
+extern Lisp_Object Qfontification_functions;
\f
/* Extract a value or address from a Lisp_Object. */
static void
window_scroll (Lisp_Object window, EMACS_INT n, bool whole, int noerror)
{
+ ptrdiff_t count = SPECPDL_INDEX ();
+
immediate_quit = 1;
n = clip_to_bounds (INT_MIN, n, INT_MAX);
wset_redisplay (XWINDOW (window));
+ if (whole && Vfast_but_imprecise_scrolling)
+ specbind (Qfontification_functions, Qnil);
+
/* If we must, use the pixel-based version which is much slower than
the line-based one but can handle varying line heights. */
if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame)))
else
window_scroll_line_based (window, n, whole, noerror);
+ unbind_to (count, Qnil);
+
/* Bug#15957. */
XWINDOW (window)->window_end_valid = 0;
immediate_quit = 0;
pixelwise even if this option is nil. */);
window_resize_pixelwise = 0;
+ DEFVAR_BOOL ("fast-but-imprecise-scrolling",
+ Vfast_but_imprecise_scrolling,
+ doc: /* When non-nil, accelerate scrolling operations.
+This comes into play when scrolling rapidly over previously
+unfontified buffer regions. Only those portions of the buffer which
+are actually going to be displayed get fontified.
+
+Note that this optimization can cause the portion of the buffer
+displayed after a scrolling operation to be somewhat inaccurate. */);
+ Vfast_but_imprecise_scrolling = 0;
+
defsubr (&Sselected_window);
defsubr (&Sminibuffer_window);
defsubr (&Swindow_minibuffer_p);
/* Holds the list (error). */
static Lisp_Object list_of_error;
-static Lisp_Object Qfontification_functions;
+Lisp_Object Qfontification_functions;
static Lisp_Object Qwrap_prefix;
static Lisp_Object Qline_prefix;