[logaling-commit] logaling/logalimacs [master] Ignore stemming logic if same word

Back to archive index

null+****@clear***** null+****@clear*****
Sat Jul 21 15:25:34 JST 2012


Yuta Yamada	2012-07-21 15:25:34 +0900 (Sat, 21 Jul 2012)

  New Revision: 12ad4c772c93efae9b9b46ba283f5f240af17076
  https://github.com/logaling/logalimacs/commit/12ad4c772c93efae9b9b46ba283f5f240af17076

  Log:
    Ignore stemming logic if same word

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+7 -5)
===================================================================
--- logalimacs.el    2012-07-21 14:59:12 +0900 (508188b)
+++ logalimacs.el    2012-07-21 15:25:34 +0900 (6fb1364)
@@ -313,7 +313,7 @@ Example:
                     (loga-ignore-login-message terminal-output)))
           (:buffer (loga-make-buffer terminal-output)))
       (if (loga-fallback-with-stemming-p source-word prototype-of-search-word)
-          (loga-lookup endpoint (loga-extract-prototype-from source-word))
+          (loga-lookup endpoint loga-prototype-word)
         (if (functionp loga-fallback-function)
             (loga-fallback (caar loga-word-cache))
           (minibuffer-message
@@ -428,10 +428,12 @@ Example:
     (and more-than-max-p less-than-window-half-p below-limit-p)))
 
 (defun loga-fallback-with-stemming-p (source-word prototype-of-search-word)
-  (and loga-use-stemming
-       (not prototype-of-search-word)
-       (loga-one-word-p source-word)
-       (ignore-errors (require 'stem nil t))))
+  (let ((prototype-word (loga-extract-prototype-from source-word)))
+    (and loga-use-stemming
+         (not prototype-of-search-word)
+         (not (equal source-word prototype-word))
+         (loga-one-word-p source-word)
+         (ignore-errors (require 'stem nil t)))))
 
 (defun loga-less-than-window-half-p (source-length)
   (let* ((half (- (/ (window-width) 2) 2)))
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Back to archive index