diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-09-09 01:21:28 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-09-09 01:21:28 +0000 |
commit | aae0d98c635749a202a3a3ae4b3f028250ae71a0 (patch) | |
tree | 5070b781eba603df2e3d11eab9d88f04a6f31909 /lisp/woman.el | |
parent | 27cbe30179397abbb0bcc9aaeb76f48c0d4b747f (diff) | |
download | emacs-aae0d98c635749a202a3a3ae4b3f028250ae71a0.tar.gz |
(woman-file-name): Provide a default, not initial input.
Diffstat (limited to 'lisp/woman.el')
-rw-r--r-- | lisp/woman.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/woman.el b/lisp/woman.el index cfc6da83e8e..39a033e5267 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> -;; Maintainer: Francis J. Wright <F.J.Wright@qmul.ac.uk> +;; Maintainer: FSF ;; Keywords: help, unix ;; Adapted-By: Eli Zaretskii <eliz@gnu.org> ;; Version: see `woman-version' @@ -1221,7 +1221,8 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." ;; completions, but to return only a case-sensitive match. This ;; does not seem to work properly by default, so I re-do the ;; completion if necessary. - (let (files) + (let (files + (default (current-word))) (or (stringp topic) (and (eq t (if (boundp 'woman-topic-at-point) @@ -1233,13 +1234,15 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." (assoc topic woman-topic-all-completions)) (setq topic (completing-read - "Manual entry: " + (if default + (format "Manual entry (default `%s'): " default) + "Manual entry: ") woman-topic-all-completions nil 1 - ;; Initial input suggestion (was nil), with - ;; cursor at left ready to kill suggestion!: + nil + 'woman-topic-history + ;; Default topic. (and woman-topic-at-point - (cons (or (current-word) "") 0)) ; nearest word - 'woman-topic-history))) + default)))) ;; Note that completing-read always returns a string. (if (= (length topic) 0) nil ; no topic, so no file! |