From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: next emacs version? Date: Mon, 22 Mar 2010 00:22:13 -0700 Message-ID: <351651D70D0E4A4A808A80FBF0119C4C@us.oracle.com> References: <56D10E2523764AC98D99CEBC55DBAD93@us.oracle.com><83iq8sigyq.fsf@gnu.org><83d3z0i3nu.fsf@gnu.org><911BA1D06CEB4306924D0069BA2D3DFF@us.oracle.com><83bpeki18a.fsf@gnu.org> <85D696D9907C42A389AA65E4BC83CDD7@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269242675 27430 80.91.229.12 (22 Mar 2010 07:24:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Mar 2010 07:24:35 +0000 (UTC) Cc: 'Eli Zaretskii' , emacs-devel@gnu.org To: "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 22 08:24:28 2010 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 1NtbzR-00049a-5M for ged-emacs-devel@m.gmane.org; Mon, 22 Mar 2010 08:24:28 +0100 Original-Received: from localhost ([127.0.0.1]:50735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ntbz9-0001UY-Sp for ged-emacs-devel@m.gmane.org; Mon, 22 Mar 2010 03:23:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ntbye-0001U8-1y for emacs-devel@gnu.org; Mon, 22 Mar 2010 03:23:08 -0400 Original-Received: from [140.186.70.92] (port=59762 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtbyX-0001SP-Rj for emacs-devel@gnu.org; Mon, 22 Mar 2010 03:23:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ntbxy-0000Gu-A0 for emacs-devel@gnu.org; Mon, 22 Mar 2010 03:22:27 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:57748) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ntbxx-0000Gp-QD; Mon, 22 Mar 2010 03:22:26 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o2M7MChm012901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Mar 2010 07:22:24 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o2M73To1027805; Mon, 22 Mar 2010 07:22:10 GMT Original-Received: from abhmt003.oracle.com by acsmt355.oracle.com with ESMTP id 99405511269242528; Mon, 22 Mar 2010 00:22:08 -0700 Original-Received: from dradamslap1 (/24.5.179.75) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 22 Mar 2010 00:22:08 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcrJXhuPHkpvDfRaR4aUq3TLwBE+dwALxVkw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4BA71AA3.0195:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:122455 Archived-At: > >>> That would involve my code with the bug-fix code (logic). > >> > >> Not at all. It simply amounts to writing the unit-test that checks > >> whether the bug is fixed: (string-match > >> ) It's simple and robust. > > > That's precisely what I mean by involving my code with the bug-fix > > code: adding a unit-test for an unrelated bug fix in the middle of > > font-lock keywords. Extra code-coupling. > > > *Why* the regexp is the way it is (better support for file > > names that include ISO dates, or whatever) is unimportant for > > the font-lock code logic. That code should not care how the > > regexp does its job of matching a date and file-name or which > > formats are currently supported. All that the font-lock code > > cares about is picking up the correct regexp group for the > > date+time info. > > Now that you say what you want, I can even agree that there's a better > solution which is to just check what you want: > > (list dired-move-to-filename-regexp > (let ((test "")) > (when (string-match dired-move-to-filename-regexp test) > (list > (cond > ((equal (match-string 2 test) "") 2) > ((equal (match-string 1 test) "") 1)) > 'diredp-date-time t t))) > (list 1 'diredp-date-time t t)) > (list "\\(.+\\)$" nil nil ; File w/o suffix > (list 0 diredp-file-name 'keep t))) > > You could even loop through all submatches to find the one > which matches the date. Yes, that code gets closer to expressing the real requirement. It gets away from the bug and the bug-fix, which have no business being in this font-lock code. My point before was that trying to manifest the bug in order to choose the proper code path would be misguided and fragile (if it even worked in all cases), especially since the bug is platform-dependent.