From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Why does save-match-data do what it does? Date: Wed, 07 Mar 2018 11:40:02 +0100 Message-ID: <87efkw2mpp.fsf@mbork.pl> References: <87fu5ctr2u.fsf@mbork.pl> <87woyonrau.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520419166 9210 195.159.176.226 (7 Mar 2018 10:39:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Mar 2018 10:39:26 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: Help Gnu Emacs mailing list To: Robert Pluim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 07 11:39:22 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etWTM-0007Qf-6n for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Mar 2018 11:39:00 +0100 Original-Received: from localhost ([::1]:60653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etWVO-0006TH-NR for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Mar 2018 05:41:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etWUp-0006Si-2Z for help-gnu-emacs@gnu.org; Wed, 07 Mar 2018 05:40:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etWUl-0006YI-UZ for help-gnu-emacs@gnu.org; Wed, 07 Mar 2018 05:40:31 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:52556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etWUl-0006Y6-Mk for help-gnu-emacs@gnu.org; Wed, 07 Mar 2018 05:40:27 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 75DBBE670A; Wed, 7 Mar 2018 11:40:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mOSJFNxQjKw0; Wed, 7 Mar 2018 11:40:18 +0100 (CET) Original-Received: from localhost (188.47.41.75.ipv4.supernova.orange.pl [188.47.41.75]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 3C4A2E66FB; Wed, 7 Mar 2018 11:40:18 +0100 (CET) In-reply-to: <87woyonrau.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:116124 Archived-At: On 2018-03-07, at 10:55, Robert Pluim wrote: > Marcin Borkowski writes: > >> Hi all, >> >> save-match-data works by assigning the current match data to a temporary >> variable, doing its stuff and restoring it again. Why not this? >> >> (defmacro save-match-data-icmd (&rest body) >> "An alternative definition of `save-match-data'." >> (declare (indent 0) (debug t)) >> `(let ((inhibit-changing-match-data t)) >> ,@body)) > > What if body want to use match data? What is the offical ascii art for a person clapping their forehead with their palm? Thanks! -- Marcin Borkowski http://mbork.pl