3 |
;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> |
;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> |
6 |
;; Maintainer: Francis J. Wright <F.J.Wright@qmul.ac.uk> |
;; Maintainer: FSF |
7 |
;; Keywords: help, unix |
;; Keywords: help, unix |
8 |
;; Adapted-By: Eli Zaretskii <eliz@gnu.org> |
;; Adapted-By: Eli Zaretskii <eliz@gnu.org> |
9 |
;; Version: see `woman-version' |
;; Version: see `woman-version' |
1221 |
;; completions, but to return only a case-sensitive match. This |
;; completions, but to return only a case-sensitive match. This |
1222 |
;; does not seem to work properly by default, so I re-do the |
;; does not seem to work properly by default, so I re-do the |
1223 |
;; completion if necessary. |
;; completion if necessary. |
1224 |
(let (files) |
(let (files |
1225 |
|
(default (current-word))) |
1226 |
(or (stringp topic) |
(or (stringp topic) |
1227 |
(and (eq t |
(and (eq t |
1228 |
(if (boundp 'woman-topic-at-point) |
(if (boundp 'woman-topic-at-point) |
1234 |
(assoc topic woman-topic-all-completions)) |
(assoc topic woman-topic-all-completions)) |
1235 |
(setq topic |
(setq topic |
1236 |
(completing-read |
(completing-read |
1237 |
"Manual entry: " |
(if default |
1238 |
|
(format "Manual entry (default `%s'): " default) |
1239 |
|
"Manual entry: ") |
1240 |
woman-topic-all-completions nil 1 |
woman-topic-all-completions nil 1 |
1241 |
;; Initial input suggestion (was nil), with |
nil |
1242 |
;; cursor at left ready to kill suggestion!: |
'woman-topic-history |
1243 |
|
;; Default topic. |
1244 |
(and woman-topic-at-point |
(and woman-topic-at-point |
1245 |
(cons (or (current-word) "") 0)) ; nearest word |
default)))) |
|
'woman-topic-history))) |
|
1246 |
;; Note that completing-read always returns a string. |
;; Note that completing-read always returns a string. |
1247 |
(if (= (length topic) 0) |
(if (= (length topic) 0) |
1248 |
nil ; no topic, so no file! |
nil ; no topic, so no file! |