changeset 52567:22ddccd48cc0

(woman-file-name, woman-follow-word): If current-word returns nil, use "".
author Richard M. Stallman <rms@gnu.org>
date Mon, 22 Sep 2003 15:15:26 +0000
parents 38d8d37f129a
children 993d4afcd6d0
files lisp/woman.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/woman.el	Mon Sep 22 15:11:02 2003 +0000
+++ b/lisp/woman.el	Mon Sep 22 15:15:26 2003 +0000
@@ -1221,7 +1221,7 @@
 		   ;; Was let-bound when file loaded, so ...
 		   (setq woman-topic-at-point woman-topic-at-point-default)))
 	     (setq topic
-		   (current-word t))	; only within or adjacent to word
+		   (or (current-word t) ""))	; only within or adjacent to word
 	     (assoc topic woman-topic-all-completions))
 	(setq topic
 	      (completing-read
@@ -1230,7 +1230,7 @@
 	       ;; Initial input suggestion (was nil), with
 	       ;; cursor at left ready to kill suggestion!:
 	       (and woman-topic-at-point
-		    (cons (current-word) 0)) ; nearest word
+		    (cons (or (current-word) "") 0)) ; nearest word
 	       'woman-topic-history)))
     ;; Note that completing-read always returns a string.
     (if (= (length topic) 0)
@@ -1744,7 +1744,7 @@
 Argument EVENT is the invoking mouse event."
   (interactive "e")			; mouse event
   (goto-char (posn-point (event-start event)))
-  (woman (current-word t)))
+  (woman (or (current-word t) "")))
 
 ;; WoMan menu bar and pop-up menu:
 (easy-menu-define