From: Lars Ingebrigtsen Date: Fri, 2 Sep 2022 11:34:55 +0000 (+0200) Subject: Clean up ispell "look"-related variables X-Git-Tag: emacs-29.0.90~1856^2~793 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3de942542a2618100de13554aaf05a8158017fef;p=emacs.git Clean up ispell "look"-related variables * lisp/textmodes/ispell.el (ispell-look-p): Make obsolete. (ispell-lookup-words): Look up the look command at run time instead (bug#50852). (ispell-have-new-look): Make obsolete. (ispell-look-options): Adjust. Apparently the version of "look" that had a "-r" (regexp interface) never took off -- it's not present in GNU/Linux or Macos, at least, as far as we can tell. --- diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 8e633688091..4b5ed98ecc9 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -262,12 +262,14 @@ This must be an absolute file name." "Non-nil means use `look' rather than `grep'. Default is based on whether `look' seems to be available." :type 'boolean) +(make-obsolete-variable 'ispell-look-p nil "29.1") (defcustom ispell-have-new-look nil "Non-nil means use the `-r' option (regexp) when running `look'." :type 'boolean) +(make-obsolete-variable 'ispell-have-new-look nil "29.1") -(defcustom ispell-look-options (if ispell-have-new-look "-dfr" "-df") +(defcustom ispell-look-options "-df" "String of command options for `ispell-look-command'." :type 'string) @@ -2519,8 +2521,10 @@ if defined." (let* ((process-connection-type ispell-use-ptys-p) (wild-p (string-search "*" word)) - (look-p (and ispell-look-p ; Only use look for an exact match. - (or ispell-have-new-look (not wild-p)))) + (look-p (and ispell-look-command + (file-exists-p ispell-look-command) + ;; Only use look for an exact match. + (not wild-p))) (prog (if look-p ispell-look-command ispell-grep-command)) (args (if look-p ispell-look-options ispell-grep-options)) status results loc)