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

[xyzzy:03650] Re: 小ネタ還元



サイトウです。

逸見さん、

>  (while
>     (progn 
>        (if (string= (buffer-substring (point) (+ (point) (length str))) str) 
>           (delete-region (point) (+ (point) (length str)))) 
>                (forward-line 1))
>           (goto-bol))
> 
> こうとか。

なるほど。
試してみました。うまく行ってるみたいですね。

最初は下の方法をイメージしていたのですが、
上の progn を使うの方法に perlの 
open("file") or die;
みたいな魅力を感じ、採用させて頂きました。

> (while t 
>     なんちゃら
>     (if なんちゃら (return 値))
>     ほんちゃら
> )
> とか、

LISPだとブロックを抜けるときも return だったんですね。

-----------------------------------
サイトウ ヒロシ
HiroshiSaito@xxxxxxx

Index Home