emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/files.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/files.el,v
Date: Thu, 13 Nov 2008 15:17:50 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/11/13 15:17:49

Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1007
retrieving revision 1.1008
diff -u -b -r1.1007 -r1.1008
--- files.el    30 Oct 2008 04:32:22 -0000      1.1007
+++ files.el    13 Nov 2008 15:17:48 -0000      1.1008
@@ -3202,6 +3202,13 @@
        (setcdr elt list)
       (push (cons class list) project-class-alist))))
 
+(defcustom project-settings-file ".dir-settings.el"
+  "Settings file for per-project settings. Set this to nil if you dont want  
to load project-specific settings."
+  :type '(choice
+       (const  :tag "Ignore" nil)
+       (file :tag "File"))
+:group 'files)
+
 (defun project-find-settings-file (file)
   "Find the settings file for FILE.
 This searches upward in the directory tree.
@@ -3209,8 +3216,9 @@
 If the file is in a registered project, a cons from
 `project-directory-alist' is returned.
 Otherwise this returns nil."
+  (when project-settings-file
   (setq file (expand-file-name file))
-  (let* ((settings (locate-dominating-file file ".dir-settings.el"))
+    (let* ((settings (locate-dominating-file file project-settings-file))
          (pda nil))
     ;; `locate-dominating-file' may have abbreviated the name.
     (if settings (setq settings (expand-file-name ".dir-settings.el" 
settings)))
@@ -3223,7 +3231,7 @@
         (if (> (length (file-name-directory settings))
                (length (car pda)))
             settings pda)
-      (or settings pda))))
+       (or settings pda)))))
 
 (defun project-define-from-project-file (settings-file)
   "Load a settings file and register a new project class and instance.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]