all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jari Aalto <jari.aalto@cante.net>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 7516@debbugs.gnu.org
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	[thread overview]
Message-ID: <87oc97yd2o.fsf@picasso.cante.net> (raw)
In-Reply-To: <jwv8w0ct2zn.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 29 Nov 2010 13:11:16 -0500")

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

2010-11-29 20:11 Stefan Monnier <monnier@IRO.UMontreal.CA>:
>>         * 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  <jari.aalto@cante.net>

        * startup.el (normal-top-level-add-subdirs-to-load-path): Change
        `member' to `string-match' file test.  Skip all dot-files.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-startup.el-normal-top-level-add-subdirs-to-load-path.patch --]
[-- Type: text/x-diff, Size: 1214 bytes --]

From 77eb2b69e60378fbfd8e1d70630ec136638381cd Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
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 <jari.aalto@cante.net>
---
 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


  reply	other threads:[~2010-11-29 22:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 14:04 bug#7516: [PATCH] lisp/startup.el (normal-top-level-add-subdirs-to-load-path) Exclude more VCS dirs Jari Aalto
2010-11-29 18:11 ` Stefan Monnier
2010-11-29 22:33   ` Jari Aalto [this message]
2010-11-29 22:34   ` Glenn Morris
2010-12-02 12:38     ` jari
2010-12-03 18:58       ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oc97yd2o.fsf@picasso.cante.net \
    --to=jari.aalto@cante.net \
    --cc=7516@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.