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

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

Re: Is it obvious that string-match syntax matching is affected by the c


From: Eli Zaretskii
Subject: Re: Is it obvious that string-match syntax matching is affected by the current buffer?
Date: Sun, 13 Mar 2016 19:23:32 +0200

> From: Tom <adatgyujto@gmail.com>
> Date: Sun, 13 Mar 2016 16:56:23 +0000 (UTC)
> 
> But that doesn't change my point that if there is no let then 
> string-match uses the current buffer's syntax table which may
> cause an unintended side effect, making the result of string-match
> dependent on the current buffer.

Forget syntax tables: did you know that 'downcase' and
case-insensitive string match uses the current buffer's
case-conversion table?

IOW, the issue you raise is not the only place in Emacs where
buffer-local settings can change the results.  In many use cases,
using buffer-local settings is what the Lisp code wants; if not, it's
the responsibility of the caller to set up things differently.



reply via email to

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