From: Richard M. Stallman Date: Mon, 15 Aug 2005 01:37:41 +0000 (+0000) Subject: (lookup-words): Cope with case where ARGS is empty. X-Git-Tag: emacs-pretest-22.0.90~7592 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7924c5dfbd466d72beac8d9ead55ed41c285b376;p=emacs.git (lookup-words): Cope with case where ARGS is empty. --- diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 5afdf63ff2a..173d5eb66b2 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2150,9 +2150,13 @@ Optional second argument contains the dictionary to use; the default is (while (search-backward "*" nil t) (insert ".")) (setq word (buffer-string)) (erase-buffer)) - (setq status (if lookup-dict - (call-process prog nil t nil args word lookup-dict) - (call-process prog nil t nil args word))) + (setq status (apply 'call-process prog nil t nil + (nconc (if (and args (> (length args) 0)) + (list args) + (if look-p nil + (list "-e"))) + (list word) + (if lookup-dict (list lookup-dict))))) ;; grep returns status 1 and no output when word not found, which ;; is a perfectly normal thing. (if (stringp status)