emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: table.el


From: Miles Bader
Subject: Re: table.el
Date: 26 Nov 2001 18:20:57 +0900

Perhaps there ought to be a function to abstract this, for instance:

   (defvar prompt-with-default-format "%s: (default `%s') ")
   (defvar prompt-without-default-format "%s: ")

   (defun make-prompt (message &optional default)
      (if default
          (format prompt-with-default-format message default)
        (format prompt-without-default-format message)))

Then the code which currently does

    (format "Foo bar: (default %s) " default)

would be written as:

    (make-prompt "Foo bar" default)

and the formats used could even be customizable.

-Miles
-- 
I have seen the enemy, and he is us.  -- Pogo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]