help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to put this in a macro


From: José A . Romero L .
Subject: Re: How to put this in a macro
Date: Tue, 04 May 2010 15:45:00 -0000
User-agent: G2/1.0

On 17 Kwi, 13:07, Cecil Westerhof <Ce...@decebal.nl> wrote:
> José A. Romero L. <escherdra...@gmail.com> writes:
(...)
> >          (progn
> >            (set ,start-sym (or start (point-min)))
> >            (set ,end-sym (or end (point-max))))))
>
> Almost. It looks like the following does what I want:
(...)
>          (progn
>            (set ,start-sym (or ,start-sym (point-min)))
>            (set ,end-sym (or ,end-sym (point-max))))))
>
> In the or's the parameter is used instead of the hard variables start
> and end.

Oops, sorry, that was a mind shortcut happening too soon. In any case
it should be rather:

(...)
    (progn
      (set ,start-sym (or (symbol-value ,start-sym) (point-min)))
      (set ,start-sym (or (symbol-value ,end-sym) (point-max))))

as you won't be passing nil as one of the arguments to the macro.

Cheers,
--
José A. Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)


reply via email to

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