]> git.eshelyaron.com Git - emacs.git/commit
Various improvements to auto-narrow mode.
authorGregory Heytings <gregory@heytings.org>
Wed, 6 Jul 2022 10:04:38 +0000 (10:04 +0000)
committerGregory Heytings <gregory@heytings.org>
Wed, 6 Jul 2022 10:06:53 +0000 (12:06 +0200)
commiteb6d2fb58da56583490b18f4bfd705844b42180f
tree15caaaf61ce6562daf5c1411c0f666b76b6b1af7
parent38b3780f6e1bdcbb2a9a7dde76fa55da36e2774f
Various improvements to auto-narrow mode.

* lisp/files.el (auto-narrow-display-length): Improve docstring.
(auto-narrow-widen-automatically): Add 'undo' to the command list.
(auto-narrow-hook): New defcustom.
(auto-narrow-pre-command-function, auto-narrow-post-command-function):
Move initialization code.
(auto-narrow-mode): Do not make the 'auto-narrow-mode' permanent local
anymore.

* lisp/font-lock.el (turn-off-font-lock-mode): New convenience function.

* src/xdisp.c (set_vertical_scroll_bar): Fix typo.
(redisplay_window): Use the new convenience function.

* src/buffer.h (BUFFER_NEEDS_AUTO_NARROWING_P,
BUFFER_AUTO_NARROWED_NON_NARROWED_P): Two new convenience functions.

* src/window.c (Frecenter): Do not recenter auto-narrowed buffers that
are not actually narrowed.

* etc/NEWS: Improvement.

* doc/emacs/display.texi (Auto-Narrowing): Improvement.
doc/emacs/display.texi
etc/NEWS
lisp/files.el
lisp/font-lock.el
src/buffer.h
src/window.c
src/xdisp.c