emacs-diffs
[Top][All Lists]
Advanced

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

master 213aed0: Fix search of the look program


From: Lars Ingebrigtsen
Subject: master 213aed0: Fix search of the look program
Date: Tue, 28 Sep 2021 02:02:21 -0400 (EDT)

branch: master
commit 213aed0691193dfbdf952c22b300d646f62a3eb9
Author: André A. Gomes <andremegafone@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix search of the look program
    
    * lisp/textmodes/ispell.el (ispell-look-command): Fix logic
    concerning the existence of the look program (bug#50852) -- search
    through the executable path.
    (ispell-look-p): Adjust logic.
---
 lisp/textmodes/ispell.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 27a60c3..9aad567 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -250,16 +250,14 @@ Always stores Fcc copy of message when nil."
 Should probably be \"-Ei\"."
   :type 'string)
 
-(defcustom ispell-look-command
-  (cond ((file-exists-p "/bin/look") "/bin/look")
-       ((file-exists-p "/usr/local/bin/look") "/usr/local/bin/look")
-       ((file-exists-p "/usr/bin/look") "/usr/bin/look")
-       (t "look"))
+(defcustom ispell-look-command (executable-find "look")
   "Name of the look command for search processes.
 This must be an absolute file name."
-  :type 'file)
+  :type 'file
+  :version "28.1")
 
-(defcustom ispell-look-p (file-exists-p ispell-look-command)
+(defcustom ispell-look-p (and ispell-look-command
+                              (file-exists-p ispell-look-command))
   "Non-nil means use `look' rather than `grep'.
 Default is based on whether `look' seems to be available."
   :type 'boolean)



reply via email to

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