emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/page-break-lines 6f19d894bd 59/80: Merge pull request #22


From: ELPA Syncer
Subject: [nongnu] elpa/page-break-lines 6f19d894bd 59/80: Merge pull request #22 from camdez/max-width
Date: Tue, 5 Sep 2023 04:03:07 -0400 (EDT)

branch: elpa/page-break-lines
commit 6f19d894bda6a981c10a58df5e23419f4d2ba353
Merge: 9b509e2cb2 4864661bf6
Author: Steve Purcell <steve@sanityinc.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #22 from camdez/max-width
    
    Max width
---
 page-break-lines.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/page-break-lines.el b/page-break-lines.el
index 450168121b..fa83aa5e74 100644
--- a/page-break-lines.el
+++ b/page-break-lines.el
@@ -75,6 +75,13 @@
   :type '(choice (const :tag "No lighter" "") string)
   :group 'page-break-lines)
 
+;;;###autoload
+(defcustom page-break-lines-max-width nil
+  "If non-nil, maximum width (in characters) of page break indicator.
+If nil, indicator will span the width of the frame."
+  :type '(choice integer (const :tag "Full width" nil))
+  :group 'page-break-lines)
+
 ;;;###autoload
 (defcustom page-break-lines-modes
   '(emacs-lisp-mode lisp-mode scheme-mode compilation-mode outline-mode 
help-mode)
@@ -133,6 +140,9 @@ its display table will be modified as necessary."
                                       0)))
                      (width (- (/ wwidth-pix (frame-char-width) cwidth)
                                (if (display-graphic-p) 0 1)))
+                     (width (if page-break-lines-max-width
+                                (min width page-break-lines-max-width)
+                              width))
                      (glyph (make-glyph-code page-break-lines-char 
'page-break-lines))
                      (new-display-entry (vconcat (make-list width glyph))))
                 (unless (equal new-display-entry (elt buffer-display-table 
?\^L))



reply via email to

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