From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: which-function => DEFUN? Date: Mon, 10 May 2010 19:34:26 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273512910 20413 80.91.229.12 (10 May 2010 17:35:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 May 2010 17:35:10 +0000 (UTC) Cc: Lennart Borgman , Emacs-Devel devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 10 19:35:09 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OBWsl-00085X-1z for ged-emacs-devel@m.gmane.org; Mon, 10 May 2010 19:35:08 +0200 Original-Received: from localhost ([127.0.0.1]:40526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBWsj-00033r-4w for ged-emacs-devel@m.gmane.org; Mon, 10 May 2010 13:35:05 -0400 Original-Received: from [140.186.70.92] (port=42720 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBWsW-00031b-Gi for emacs-devel@gnu.org; Mon, 10 May 2010 13:34:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBWsR-00008R-9p for emacs-devel@gnu.org; Mon, 10 May 2010 13:34:52 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.152]:11759) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBWsR-00008K-5H for emacs-devel@gnu.org; Mon, 10 May 2010 13:34:47 -0400 Original-Received: by fg-out-1718.google.com with SMTP id e12so2092383fga.12 for ; Mon, 10 May 2010 10:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=rS9vWNh4JcrplQTNJE+EyJ/FLt0JKba0TzKGFgV2jtE=; b=uySbd1Gkmf4igk53J0Git++tbspfPpHxL+d9q13I/2gA9e7pWk2SaYLYm4l4bzL9Dq bWbopOFTwhRKB0+/1XqF0DvUIK2I6IgjbbVscQM5WM98AEc7CmcAbtIVx1EdTJP3ZfgH jsfMQANnZU/uLtMV1IYsSejJ3TiILzTPlbVhE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=xER8iJNbiHyBf7bkCT8GUY5iP006hq/HLsb5835LHckiYbqernpH0yIr55Ac4Hq9Ts mgCfWS1CoyaehRmeX+oJa5jEf9JVhIe/sWZp+zz/qQkv25XB154PQQQck+zv3tqoCtIQ 7t2lzaxXD6RChw+rNebGRtRGpaSEdoU77r4yo= Original-Received: by 10.204.152.13 with SMTP id e13mr2645423bkw.30.1273512886147; Mon, 10 May 2010 10:34:46 -0700 (PDT) Original-Received: by 10.204.84.81 with HTTP; Mon, 10 May 2010 10:34:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124672 Archived-At: On Mon, May 10, 2010 at 17:42, Stefan Monnier wr= ote: > The rule for where to place a save-match-data is: > > =C2=A0around the code run between "looking-at" and > =C2=A0"match-string-no-properties". > > In this case (as in 99% of the cases) this code is empty, so the > save-match-data can be dropped. The save-match-data is not there to protect the code between `looking-at' and `match-string-no-properties', because as you point out, that is an empty set. It is there to protect the caller of which-func-identify-DEFUN. > If your save-match-data were needed, which-func-functions should say > so explicitly. Yes, I know. As I said, in code for my own use I tend to err on the side of caution. Juanma