[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redefining functions and variables
From: |
Elena |
Subject: |
Re: Redefining functions and variables |
Date: |
Wed, 08 Dec 2010 15:21:46 -0000 |
User-agent: |
G2/1.0 |
On Jul 29, 10:03 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> the "..." are only used to display the list when print-length or
> eval-expression-print-length are not nil. See also print-level and
> eval-expression-print-level.
Didn't know about this. Thanks.
> %s can format symbols too:
>
> (format ">> %s <<" 'example)
> ;; --> ">> example <<"
>
> And you had your the old defun inside the when!
Gosh! What an oversight... Sorry.
> Note: while name is known at macroexpansion time, you should refrain
> to insert it in the string like this:
>
> (message ,(format "Warning: %s is being redefined in %%s." name)
> load-file-name)
>
> since name could contain percents and then you'd have build a wrong
> format string for message.
I don't understand this. Doc about `message' says:
> Note: Use (message "%s" VALUE) to print the value of expressions and
> variables to avoid accidentally interpreting `%' as format specifiers.
And in fact:
(message "%s" 'example%)
correctly outputs:
"example%"
- Re: Redefining functions and variables, (continued)
- Re: Redefining functions and variables, Elena, 2010/12/08
- Re: Redefining functions and variables, Stefan Monnier, 2010/12/08
- Re: Redefining functions and variables, Elena, 2010/12/08
- Re: Redefining functions and variables, Stefan Monnier, 2010/12/08
- Re: Redefining functions and variables, Uday S Reddy, 2010/12/08
- Re: Redefining functions and variables, Andreas Politz, 2010/12/08
- Re: Redefining functions and variables, Johan Bockgård, 2010/12/08
- Re: Redefining functions and variables, Andreas Politz, 2010/12/08
- Re: Redefining functions and variables, Tim X, 2010/12/08
- Re: Redefining functions and variables, Pascal J. Bourguignon, 2010/12/08
- Re: Redefining functions and variables,
Elena <=
- Re: Redefining functions and variables, Pascal J. Bourguignon, 2010/12/08
- Re: Redefining functions and variables, Johan Bockgård, 2010/12/08
- Re: Redefining functions and variables, Tim X, 2010/12/08