# HG changeset patch # User Richard M. Stallman # Date 1126228888 0 # Node ID 71481859776ba5386174fcaace15e87c109faff7 # Parent 66ed969ca7cc21a058b77adb5c0a9e887781ab67 (woman-file-name): Provide a default, not initial input. diff -r 66ed969ca7cc -r 71481859776b lisp/woman.el --- a/lisp/woman.el Fri Sep 09 01:16:05 2005 +0000 +++ b/lisp/woman.el Fri Sep 09 01:21:28 2005 +0000 @@ -3,7 +3,7 @@ ;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Francis J. Wright -;; Maintainer: Francis J. Wright +;; Maintainer: FSF ;; Keywords: help, unix ;; Adapted-By: Eli Zaretskii ;; Version: see `woman-version' @@ -1221,7 +1221,8 @@ ;; 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 @@ (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!