emacs-devel
[Top][All Lists]
Advanced

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

Re: Why (substring "abc" 0 4) does not return "abc" instead of an error?


From: Bastien
Subject: Re: Why (substring "abc" 0 4) does not return "abc" instead of an error?
Date: Mon, 16 Jul 2012 18:22:29 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> Would it be handy? Sometimes, perhaps. At other times, having
>>> substring check that TO is indeed in range is quite useful. 
>> I would be happy with a third optional argument FAIL-SILENTLY.
>
> We have general functionality when you want to ignore some errors, such
> as condition-case.

I know, thanks.  My idea is that preventing this error is expected
enough to deserve a new optional argument.  Just as `re-search-forward'
has one, for example.

I can live with the current `substring', but I was being curious.

-- 
 Bastien



reply via email to

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