From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: next emacs version? Date: Sun, 21 Mar 2010 21:22:12 -0400 Message-ID: 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 X-Trace: dough.gmane.org 1269221073 12586 80.91.229.12 (22 Mar 2010 01:24:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Mar 2010 01:24:33 +0000 (UTC) Cc: 'Eli Zaretskii' , emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 22 02: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 1NtWNQ-0005kK-MD for ged-emacs-devel@m.gmane.org; Mon, 22 Mar 2010 02:24:21 +0100 Original-Received: from localhost ([127.0.0.1]:51778 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtWNP-0002RI-Rf for ged-emacs-devel@m.gmane.org; Sun, 21 Mar 2010 21:24:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NtWLT-0001M5-C7 for emacs-devel@gnu.org; Sun, 21 Mar 2010 21:22:19 -0400 Original-Received: from [140.186.70.92] (port=47874 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtWLR-0001Ks-Tt for emacs-devel@gnu.org; Sun, 21 Mar 2010 21:22:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NtWLR-0007yQ-19 for emacs-devel@gnu.org; Sun, 21 Mar 2010 21:22:17 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46679 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NtWLO-0007xv-JS; Sun, 21 Mar 2010 21:22:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAI9jpkvO+IPa/2dsb2JhbACbOXS5IYR9BIsd X-IronPort-AV: E=Sophos;i="4.51,284,1267419600"; d="scan'208";a="58773759" Original-Received: from 206-248-131-218.dsl.teksavvy.com (HELO ceviche.home) ([206.248.131.218]) by ironport2-out.pppoe.ca with ESMTP; 21 Mar 2010 21:22:13 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id F2D47660C4; Sun, 21 Mar 2010 21:22:12 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Sat, 20 Mar 2010 16:09:23 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:122436 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. Stefan