From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jari Aalto Newsgroups: gmane.emacs.bugs Subject: bug#7516: [PATCH] lisp/startup.el (normal-top-level-add-subdirs-to-load-path) Exclude more VCS dirs Date: Tue, 30 Nov 2010 00:33:51 +0200 Organization: Private Message-ID: <87oc97yd2o.fsf@picasso.cante.net> References: <877hfwz0mu.fsf@picasso.cante.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1291070713 10208 80.91.229.12 (29 Nov 2010 22:45:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Nov 2010 22:45:13 +0000 (UTC) Cc: 7516@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 29 23:45:09 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1PNCT7-0004oh-3m for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Nov 2010 23:45:09 +0100 Original-Received: from localhost ([127.0.0.1]:50217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNCT6-0008Gw-Ky for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Nov 2010 17:45:08 -0500 Original-Received: from [140.186.70.92] (port=44673 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNCSz-0008Fq-3C for bug-gnu-emacs@gnu.org; Mon, 29 Nov 2010 17:45:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNCSx-0005Ji-SF for bug-gnu-emacs@gnu.org; Mon, 29 Nov 2010 17:45:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNCSx-0005Je-Qd for bug-gnu-emacs@gnu.org; Mon, 29 Nov 2010 17:44:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PNCDW-00083n-FY; Mon, 29 Nov 2010 17:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jari Aalto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Nov 2010 22:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7516 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 7516-submit@debbugs.gnu.org id=B7516.129106970630929 (code B ref 7516); Mon, 29 Nov 2010 22:29:02 +0000 Original-Received: (at 7516) by debbugs.gnu.org; 29 Nov 2010 22:28:26 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNCCu-00082o-IP for submit@debbugs.gnu.org; Mon, 29 Nov 2010 17:28:24 -0500 Original-Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNCCs-00082U-5R for 7516@debbugs.gnu.org; Mon, 29 Nov 2010 17:28:23 -0500 Original-Received: from saunalahti-vams (vs3-11.mail.saunalahti.fi [62.142.5.95]) by emh04-2.mail.saunalahti.fi (Postfix) with SMTP id D78A613BDA0; Tue, 30 Nov 2010 00:33:54 +0200 (EET) Original-Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by vs3-11.mail.saunalahti.fi ([62.142.5.95]) with SMTP (gateway) id A039D9CFB47; Tue, 30 Nov 2010 00:33:54 +0200 Original-Received: from picasso.cante.net (a91-155-187-216.elisa-laajakaista.fi [91.155.187.216]) by emh04.mail.saunalahti.fi (Postfix) with ESMTP id 6200D41BE3; Tue, 30 Nov 2010 00:33:51 +0200 (EET) In-Reply-To: (Stefan Monnier's message of "Mon, 29 Nov 2010 13:11:16 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) X-Antivirus: VAMS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 29 Nov 2010 17:29:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42012 Archived-At: --=-=-= Content-Type: text/plain 2010-11-29 20:11 Stefan Monnier : >> * startup.el: (normal-top-level-add-subdirs-to-load-path): Exclude >> more VCS directories: .svn, .hg, .bzr, .git and .mtn (monotone). > > Wouldn't it make more sense to skip anything that starts with a dot? Sure. See below. Jari 2010-11-29 Jari Aalto * startup.el (normal-top-level-add-subdirs-to-load-path): Change `member' to `string-match' file test. Skip all dot-files. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-startup.el-normal-top-level-add-subdirs-to-load-path.patch >From 77eb2b69e60378fbfd8e1d70630ec136638381cd Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 29 Nov 2010 15:52:58 +0200 Subject: [PATCH] startup.el: (normal-top-level-add-subdirs-to-load-path): Skip all dot files. Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- lisp/startup.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index da0264d..5b9b62b 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -419,7 +419,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (push attrs normal-top-level-add-subdirs-inode-list) (dolist (file contents) ;; The lower-case variants of RCS and CVS are for DOS/Windows. - (unless (member file '("." ".." "RCS" "CVS" "rcs" "cvs")) + ;; Skip all dot-files. + (unless (let ((case-fold-search t)) + (string-match "^\\(RCS\\|CVS\\|\\..*\\)$" file)) (when (and (string-match "\\`[[:alnum:]]" file) ;; Avoid doing a `stat' when it isn't necessary ;; because that can cause trouble when an NFS server -- 1.7.2.3 --=-=-=--