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

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

[nongnu] elpa/racket-mode cc252346f8 2/3: Don't set shr-width to 76 unle


From: ELPA Syncer
Subject: [nongnu] elpa/racket-mode cc252346f8 2/3: Don't set shr-width to 76 unless company-mode buffer
Date: Tue, 24 Sep 2024 10:01:18 -0400 (EDT)

branch: elpa/racket-mode
commit cc252346f8a0803817e12307afa7d685e97af5c3
Author: Greg Hendershott <git@greghendershott.com>
Commit: Greg Hendershott <git@greghendershott.com>

    Don't set shr-width to 76 unless company-mode buffer
---
 racket-scribble-anchor.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/racket-scribble-anchor.el b/racket-scribble-anchor.el
index 9c928c8255..62a7b60e80 100644
--- a/racket-scribble-anchor.el
+++ b/racket-scribble-anchor.el
@@ -27,7 +27,8 @@
            (kill-buffer buf)))
        (with-current-buffer (get-buffer-create name)
          (goto-char (point-min))
-         (racket--scribble-path+anchor-insert path anchor)
+         ;; width 76 for company-quickhelp-mode
+         (racket--scribble-path+anchor-insert path anchor 76)
          (goto-char (point-min))
          (setq buffer-read-only t)
          (current-buffer))))))
@@ -56,7 +57,7 @@ Uses `racket--path+anchor-cache'."
        (ring-insert racket--path+anchor-ring item)
        str))))
 
-(defun racket--scribble-path+anchor-insert (path anchor)
+(defun racket--scribble-path+anchor-insert (path anchor &optional width)
   (let* ((tramp-verbose 2) ;avoid excessive tramp messages
          (dom (racket--html-file->dom path))
          (dom (racket--elements-for-anchor dom anchor))
@@ -67,7 +68,7 @@ Uses `racket--path+anchor-cache'."
     (save-excursion
       (let ((shr-use-fonts nil)
             (shr-external-rendering-functions `((span . 
,#'racket-render-tag-span)))
-            (shr-width 76)) ;for company-quickhelp-mode
+            (shr-width width))
         (shr-insert-document dom)))
     (while (re-search-forward (string racket--scribble-temp-nbsp) nil t)
       (replace-match " " t t))))



reply via email to

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