[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: patch for woman (woman-topic-at-point)
From: |
Drew Adams |
Subject: |
RE: patch for woman (woman-topic-at-point) |
Date: |
Mon, 29 Aug 2005 09:08:48 -0700 |
> is there a more elegant way of writing the following?
> (and word-at-point
> (test-completion word-at-point woman-topic-all-completions)
> word-at-point)
(when (and word-at-point
(test-completion word-at-point woman-topic-all-completions))
word-at-point)
It's more verbose, but brings across the purpose somewhat better.
Why don't we let `test-completion' return the completion (string) argument,
whenever the return value is non-nil?
This would then be simply:
(and word-at-point
(test-completion word-at-point woman-topic-all-completions))
This is a common use case - most uses of `test-completion' will want to use
the string, but only if it is a completion. And a return value of `t' is not
particularly useful.
- patch for woman (woman-topic-at-point), Emilio Lopes, 2005/08/25
- Re: patch for woman (woman-topic-at-point), David Kastrup, 2005/08/25
- Re: patch for woman (woman-topic-at-point), Richard M. Stallman, 2005/08/26
- Re: patch for woman (woman-topic-at-point), Emilio Lopes, 2005/08/26
- Re: patch for woman (woman-topic-at-point), Emilio Lopes, 2005/08/26
- Re: patch for woman (woman-topic-at-point), Emilio Lopes, 2005/08/29
- Re: patch for woman (woman-topic-at-point), Stefan Monnier, 2005/08/29
- Re: patch for woman (woman-topic-at-point), Thien-Thi Nguyen, 2005/08/29
- Re: patch for woman (woman-topic-at-point), Stefan Monnier, 2005/08/30
- Re: patch for woman (woman-topic-at-point), Richard M. Stallman, 2005/08/27
RE: patch for woman (woman-topic-at-point), Dr Francis J Wright, 2005/08/26