changeset 64965:008b8c9ce315

(lookup-words): Cope with case where ARGS is empty.
author Richard M. Stallman <rms@gnu.org>
date Mon, 15 Aug 2005 01:37:41 +0000
parents b65391e165d4
children 155edc67bca3
files lisp/textmodes/ispell.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el	Sun Aug 14 23:55:03 2005 +0000
+++ b/lisp/textmodes/ispell.el	Mon Aug 15 01:37:41 2005 +0000
@@ -2150,9 +2150,13 @@
 	    (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)