[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help create function alias
From: |
Adam |
Subject: |
Re: help create function alias |
Date: |
Wed, 08 Dec 2010 15:28:59 -0000 |
User-agent: |
KNode/0.9.2 |
Marc Mientki wrote:
> Am 20.09.2010 12:43, schrieb Adam:
>> (defun id ()
>> "insert date"
>> (interactive "P")
>> (insert-date t))
>>
>
> There two errors:
>
> 1. You say (interactive "P") but not provide argument to id.
> When you use "P", then you must write:
> (defun if (arg) ...
>
> or
>
> (defun if (&optional arg) ...
>
> But actualy you don't need "P" in your example. So you can write:
>
> (defun id ()
> "insert date"
> (interactive)
> (insert-date t))
>
> 2. Function insert-date is not defined, at least not in my emacs.
>
> HTH
> Marc
Thanks. It does help.
In my .emacs I walked right past an (insert-date) function which
I picked up from somewhere. It uses an ISO date format, includes
the "P" for alternate formatting from the argument.
Thanks.
- help create function alias, Adam, 2010/12/09
- Re: help create function alias, Marc Mientki, 2010/12/08
- Re: help create function alias,
Adam <=
- Re: help create function alias, Adam, 2010/12/09
- Re: help create function alias, Pascal J. Bourguignon, 2010/12/08
- Re: help create function alias, Adam, 2010/12/09
- Re: help create function alias, Andreas Politz, 2010/12/08
- Re: help create function alias, Adam, 2010/12/09
- Re: help create function alias, Barry Margolin, 2010/12/08
- Re: help create function alias, Pascal J. Bourguignon, 2010/12/08
Re: help create function alias, Stefan Monnier, 2010/12/08