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

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

Re: byte-opt.el: byte-optimize-backward-word


From: Andreas Schwab
Subject: Re: byte-opt.el: byte-optimize-backward-word
Date: Sun, 10 Oct 2004 16:28:32 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

address@hidden writes:

> In byte-opt.el:
>
> (put 'backward-word 'byte-optimizer 'byte-optimize-backward-word)
> (defun byte-optimize-backward-word (form)
>   (cond ((and (= 2 (safe-length form))
>             (numberp (nth 1 form)))
>        (list 'forward-word (eval (- (nth 1 form)))))
>       ((= 1 (safe-length form))
>        '(forward-char -1))
> ;-------------^
>         (t form)))
>
> Shouldn't that be (forward-word -1)?

Yes, you are right.  Looks like a pasto.  And a rather old one.

> Also, backward-word requires an argument;

Not any more.  The argument is now optional in CVS.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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