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

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

[elpa] externals/mct 9c60491 2/4: Remove mct--input-string which is unus


From: ELPA Syncer
Subject: [elpa] externals/mct 9c60491 2/4: Remove mct--input-string which is unused
Date: Mon, 29 Nov 2021 02:57:28 -0500 (EST)

branch: externals/mct
commit 9c60491d5d37057ad0345d7dc111746498f37333
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Remove mct--input-string which is unused
    
    Instead directly compute the length of the input.
---
 mct.el | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/mct.el b/mct.el
index 9c59ec8..15881a6 100644
--- a/mct.el
+++ b/mct.el
@@ -264,14 +264,10 @@ Add this to `completion-list-mode-hook'."
       (setq-local window-resize-pixelwise t))
     (fit-window-to-buffer window (floor (frame-height) 2) 1)))
 
-(defun mct--input-string ()
-  "Return the contents of the minibuffer as a string."
-  (buffer-substring-no-properties (minibuffer-prompt-end) (point-max)))
-
 (defun mct--minimum-input ()
   "Test for minimum requisite input for live completions.
 See `mct-minimum-input'."
-  (>= (length (mct--input-string)) mct-minimum-input))
+  (>= (- (point-max) (minibuffer-prompt-end)) mct-minimum-input))
 
 ;;;;; Live-updating Completions' buffer
 



reply via email to

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