diff options
| author | Dan Nicolaescu | 2008-11-19 13:25:43 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-11-19 13:25:43 +0000 |
| commit | 35f0d8ce8f2c9fba86a00f889ccb4fc5bc489748 (patch) | |
| tree | 349337f691bcbfcd335406fd95360d8b88e5304f | |
| parent | 667df88c0dddc0b42230b4f7d3b93d20fd2adb01 (diff) | |
| download | emacs-35f0d8ce8f2c9fba86a00f889ccb4fc5bc489748.tar.gz emacs-35f0d8ce8f2c9fba86a00f889ccb4fc5bc489748.zip | |
(project-settings-file): Remove.
(project-find-settings-file): Undo previous change that added the
use of project-settings-file.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/files.el | 41 |
2 files changed, 22 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a13050b45da..949271cfec9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-11-19 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * files.el (project-settings-file): Remove. | ||
| 4 | (project-find-settings-file): Undo previous change that added the | ||
| 5 | use of project-settings-file. | ||
| 6 | |||
| 1 | 2008-11-19 Glenn Morris <rgm@gnu.org> | 7 | 2008-11-19 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * proced.el (proced, proced-format-time): Doc fixes. | 9 | * proced.el (proced, proced-format-time): Doc fixes. |
diff --git a/lisp/files.el b/lisp/files.el index 5ed3ffae29a..347f9563d06 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3208,14 +3208,6 @@ LIST. The list is processed in order. | |||
| 3208 | (setcdr elt settings) | 3208 | (setcdr elt settings) |
| 3209 | (push (cons class settings) project-class-alist)))) | 3209 | (push (cons class settings) project-class-alist)))) |
| 3210 | 3210 | ||
| 3211 | (defcustom project-settings-file ".dir-settings.el" | ||
| 3212 | "Settings file for per-project settings. | ||
| 3213 | Set this to nil if you don't want to load project-specific settings." | ||
| 3214 | :type '(choice | ||
| 3215 | (const :tag "Ignore" nil) | ||
| 3216 | (file :tag "File")) | ||
| 3217 | :group 'files) | ||
| 3218 | |||
| 3219 | (defun project-find-settings-file (file) | 3211 | (defun project-find-settings-file (file) |
| 3220 | "Find the settings file for FILE. | 3212 | "Find the settings file for FILE. |
| 3221 | This searches upward in the directory tree. | 3213 | This searches upward in the directory tree. |
| @@ -3223,23 +3215,22 @@ If a settings file is found, the file name is returned. | |||
| 3223 | If the file is in a registered project, a cons from | 3215 | If the file is in a registered project, a cons from |
| 3224 | `project-directory-alist' is returned. | 3216 | `project-directory-alist' is returned. |
| 3225 | Otherwise this returns nil." | 3217 | Otherwise this returns nil." |
| 3226 | (when project-settings-file | 3218 | (setq file (expand-file-name file)) |
| 3227 | (setq file (expand-file-name file)) | 3219 | (let ((settings (locate-dominating-file file ".dir-settings.el")) |
| 3228 | (let ((settings (locate-dominating-file file project-settings-file)) | 3220 | (pda nil)) |
| 3229 | (pda nil)) | 3221 | ;; `locate-dominating-file' may have abbreviated the name. |
| 3230 | ;; `locate-dominating-file' may have abbreviated the name. | 3222 | (when settings |
| 3231 | (when settings | 3223 | (setq settings (expand-file-name ".dir-settings.el" settings))) |
| 3232 | (setq settings (expand-file-name project-settings-file settings))) | 3224 | (dolist (x project-directory-alist) |
| 3233 | (dolist (x project-directory-alist) | 3225 | (when (and (eq t (compare-strings file nil (length (car x)) |
| 3234 | (when (and (eq t (compare-strings file nil (length (car x)) | 3226 | (car x) nil nil)) |
| 3235 | (car x) nil nil)) | 3227 | (> (length (car x)) (length (car pda)))) |
| 3236 | (> (length (car x)) (length (car pda)))) | 3228 | (setq pda x))) |
| 3237 | (setq pda x))) | 3229 | (if (and settings pda) |
| 3238 | (if (and settings pda) | 3230 | (if (> (length (file-name-directory settings)) |
| 3239 | (if (> (length (file-name-directory settings)) | 3231 | (length (car pda))) |
| 3240 | (length (car pda))) | 3232 | settings pda) |
| 3241 | settings pda) | 3233 | (or settings pda)))) |
| 3242 | (or settings pda))))) | ||
| 3243 | 3234 | ||
| 3244 | (defun project-define-from-project-file (settings-file) | 3235 | (defun project-define-from-project-file (settings-file) |
| 3245 | "Load a settings file and register a new project class and instance. | 3236 | "Load a settings file and register a new project class and instance. |