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

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

[elpa] externals/jinx ebe01cb06b 3/3: Minor simplification


From: ELPA Syncer
Subject: [elpa] externals/jinx ebe01cb06b 3/3: Minor simplification
Date: Tue, 18 Apr 2023 12:57:53 -0400 (EDT)

branch: externals/jinx
commit ebe01cb06b7c26bfeae5e5a122921cdc8a22a6c0
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Minor simplification
---
 jinx.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/jinx.el b/jinx.el
index daf353bee1..d50f20e22c 100644
--- a/jinx.el
+++ b/jinx.el
@@ -508,9 +508,9 @@ If VISIBLE is non-nil, only include visible overlays."
           (setq mod-file (expand-file-name mod-name))))
       (module-load mod-file))))
 
-(defun jinx--correct-highlight (overlay recenter fun)
-  "Highlight and show OVERLAY during FUN, optionally RECENTER."
-  (declare (indent 2))
+(defun jinx--correct-highlight (overlay fun)
+  "Highlight and show OVERLAY during FUN."
+  (declare (indent 1))
   (let (restore)
     (goto-char (overlay-end overlay))
     (unwind-protect
@@ -534,7 +534,6 @@ If VISIBLE is non-nil, only include visible overlays."
                           (overlay-put ov 'invisible nil)
                           (lambda () (overlay-put ov 'invisible inv)))
                         restore)))))
-          (when recenter (recenter))
           (let ((hl (make-overlay (overlay-start overlay) (overlay-end 
overlay))))
             (overlay-put hl 'face 'jinx-highlight)
             (overlay-put hl 'window (selected-window))
@@ -628,8 +627,9 @@ If VISIBLE is non-nil, only include visible overlays."
   (let* ((word (buffer-substring-no-properties
                 (overlay-start overlay) (overlay-end overlay)))
          (selected
-          (jinx--correct-highlight overlay recenter
+          (jinx--correct-highlight overlay
             (lambda ()
+              (when recenter (recenter))
               (minibuffer-with-setup-hook
                   #'jinx--correct-setup
                 (or (completing-read



reply via email to

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