From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help 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 Message-ID: <83ziu2e1gr.fsf@gnu.org> References: <56E59AD0.5070302@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1457889860 12082 80.91.229.3 (13 Mar 2016 17:24:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2016 17:24:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 13 18:24:20 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1af9kX-0000Ai-CB for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Mar 2016 18:24:17 +0100 Original-Received: from localhost ([::1]:36924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af9kW-0004LC-Rm for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Mar 2016 13:24:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af9kL-0004L5-Ox for help-gnu-emacs@gnu.org; Sun, 13 Mar 2016 13:24:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1af9kI-0005aN-Ir for help-gnu-emacs@gnu.org; Sun, 13 Mar 2016 13:24:05 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af9kI-0005aH-FF for help-gnu-emacs@gnu.org; Sun, 13 Mar 2016 13:24:02 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4574 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1af9kH-00089d-Jf for help-gnu-emacs@gnu.org; Sun, 13 Mar 2016 13:24:02 -0400 In-reply-to: (message from Tom on Sun, 13 Mar 2016 16:56:23 +0000 (UTC)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109560 Archived-At: > From: Tom > 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.