emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b22b59c: Add example for removing scroll bars/fring


From: Martin Rudalics
Subject: [Emacs-diffs] master b22b59c: Add example for removing scroll bars/fringes from mini windows (Bug#8868)
Date: Thu, 1 Aug 2019 03:57:08 -0400 (EDT)

branch: master
commit b22b59c77bf15edd4b4fa1969ce0e20402de1104
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>

    Add example for removing scroll bars/fringes from mini windows (Bug#8868)
    
    * doc/lispref/display.texi (Fringe Size/Pos): Mention example
    for how to permenantly remove fringes from minibuffer windows.
    (Scroll Bars): Add example for how to permanently remove
    scroll bars and fringes from minibuffer windows.
---
 doc/lispref/display.texi | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 7c27b38..216d033 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3983,7 +3983,9 @@ with its @var{keep-margins} argument @code{nil} or 
omitted.  However,
 if the optional fifth argument @var{persistent} is non-@code{nil} and
 the other arguments are processed successfully, the values specified
 here unconditionally survive subsequent invocations of
-@code{set-window-buffer}.
+@code{set-window-buffer}.  This can be used to permanently turn off
+fringes in the minibuffer window, consult the description of
+@code{set-window-scroll-bars} for an example (@pxref{Scroll Bars}).
 @end defun
 
 @defun window-fringes &optional window
@@ -4418,6 +4420,23 @@ here unconditionally survive subsequent invocations of
 @code{set-window-buffer}.
 @end defun
 
+Using the @var{persistent} argument of @code{set-window-scroll-bars}
+and @code{set-window-fringes} (@pxref{Fringe Size/Pos}) you can
+reliably and permanently turn off scroll bars and/or fringes in any
+minibuffer window by adding the following snippet to your early init
+file (@pxref{Init File}).
+
+@smallexample
+@group
+(add-hook 'after-make-frame-functions
+          (lambda (frame)
+            (set-window-scroll-bars
+             (minibuffer-window frame) 0 nil 0 nil t)
+            (set-window-fringes
+             (minibuffer-window frame) 0 0 nil t)))
+@end group
+@end smallexample
+
 The following four functions take as argument a live window which
 defaults to the selected one.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]