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

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

[elpa] externals/jit-spell fa4e38005d 1/2: Small optimizations


From: ELPA Syncer
Subject: [elpa] externals/jit-spell fa4e38005d 1/2: Small optimizations
Date: Thu, 30 Mar 2023 12:58:31 -0400 (EDT)

branch: externals/jit-spell
commit fa4e38005df157385932fed63a77a084d59c4730
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>

    Small optimizations
---
 jit-spell.el | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/jit-spell.el b/jit-spell.el
index 179bee7d41..d01da6f591 100644
--- a/jit-spell.el
+++ b/jit-spell.el
@@ -291,10 +291,8 @@ The process plist includes the following properties:
 (defun jit-spell--process-filter (proc string)
   "Filter function for jit-spell processes."
   (with-current-buffer (process-buffer proc)
-    (save-excursion
-      (goto-char (point-max))
-      (insert string))
-    (when (re-search-forward "^\n" nil t) ;TODO: Process in chunks
+    (insert string)
+    (when (and (eq (char-before) ?\n) (eq (pos-bol 0) (1- (point))))
       (pcase-let ((`(,buffer ,tick ,start ,end)
                    (process-get proc 'jit-spell--current-request)))
         (process-put proc 'jit-spell--current-request nil)
@@ -575,9 +573,8 @@ It can also be bound to a mouse click to pop up the menu."
   :lighter (" Spell"
             (:propertize
              (:eval
-              (when-let ((s (or ispell-local-dictionary
-                               ispell-dictionary)))
-                (concat "/" (substring s 0 (string-search "_" s)))))))
+              (let ((s (or ispell-local-dictionary ispell-dictionary)))
+                (if s (concat "/" (substring s 0 (string-search "_" s))))))))
   (cond
    (jit-spell-mode
     ;; Major mode support



reply via email to

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