unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: patch for woman (woman-topic-at-point)
Date: Mon, 29 Aug 2005 09:08:48 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICAECFCMAA.drew.adams@oracle.com> (raw)
In-Reply-To: <85d5nxx3ax.fsf@lola.goethe.zz>

    > 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.

  reply	other threads:[~2005-08-29 16:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-25 18:48 patch for woman (woman-topic-at-point) Emilio Lopes
2005-08-25 19:51 ` David Kastrup
2005-08-26 12:03 ` Richard M. Stallman
2005-08-26 15:21   ` Emilio Lopes
2005-08-26 18:05     ` Stefan Monnier
2005-08-27 18:57       ` Emilio Lopes
2005-08-28 19:35         ` David Kastrup
2005-08-29 16:08           ` Drew Adams [this message]
2005-08-30 16:13             ` Emilio Lopes
2005-08-29 18:08           ` Emilio Lopes
2005-08-29 20:56             ` Stefan Monnier
2005-08-29 22:15               ` Thien-Thi Nguyen
2005-08-31  2:28                 ` Stefan Monnier
2005-08-28  2:45     ` Richard M. Stallman
2005-09-02 11:11       ` Dr Francis J Wright
2005-08-26 15:23   ` Emilio Lopes
2005-08-26 16:25   ` Dr Francis J Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICAECFCMAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).