From: "T.V. Raman" <tv.raman.tv@gmail.com>
To: emacs-devel@gnu.org
Subject: files.el: Patch to make project-settings optional/customizable
Date: Thu, 13 Nov 2008 07:29:55 -0700 [thread overview]
Message-ID: <5f0ff9220811130629t505badf9kb1bcc380df89a08f@mail.gmail.com> (raw)
Introduces a defcustom for project-settings-file -- rather than
hard-coding the name,
and if set to nil, arranges for function
project-find-settings-file to do nothing.
Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1007
diff -u -r1.1007 files.el
--- files.el 30 Oct 2008 04:32:22 -0000 1.1007
+++ files.el 13 Nov 2008 04:53:05 -0000
@@ -3201,6 +3201,12 @@
(if elt
(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.
@@ -3209,8 +3215,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 +3230,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.
--
Best Regards,
--raman
Email: raman@users.sf.net
WWW: http://emacspeak.sf.net/raman/
AIM: emacspeak GTalk: tv.raman.tv@gmail.com
PGP: http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman
IRC: irc://irc.freenode.net/#emacs
next reply other threads:[~2008-11-13 14:29 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 14:29 T.V. Raman [this message]
2008-11-13 15:20 ` files.el: Patch to make project-settings optional/customizable Chong Yidong
2008-11-13 16:07 ` Dan Nicolaescu
2008-11-13 16:19 ` Dan Nicolaescu
2008-11-13 16:45 ` Tom Tromey
2008-11-13 17:14 ` Chong Yidong
2008-11-13 17:28 ` Dan Nicolaescu
2008-11-13 17:55 ` Juanma Barranquero
2008-11-13 17:59 ` Dan Nicolaescu
2008-11-13 19:13 ` Juanma Barranquero
2008-11-13 19:00 ` Tom Tromey
2008-11-13 19:15 ` Juanma Barranquero
2008-11-13 18:26 ` Chong Yidong
2008-11-13 18:48 ` Dan Nicolaescu
2008-11-18 16:36 ` Dan Nicolaescu
2008-11-18 22:04 ` Juri Linkov
2008-11-18 22:15 ` Dan Nicolaescu
2008-11-18 22:42 ` Juanma Barranquero
2008-11-18 23:18 ` Dan Nicolaescu
2008-11-18 23:41 ` Juanma Barranquero
2008-11-18 22:59 ` Stefan Monnier
2008-11-18 23:31 ` Juri Linkov
2008-11-18 23:33 ` Chong Yidong
2008-11-18 23:41 ` Dan Nicolaescu
2008-11-18 23:50 ` Juanma Barranquero
2008-11-19 0:14 ` Dan Nicolaescu
2008-11-19 1:48 ` Chong Yidong
2008-11-19 8:26 ` Juanma Barranquero
2008-11-19 12:52 ` Richard M. Stallman
2008-11-18 23:37 ` Juanma Barranquero
2008-11-19 2:01 ` Stefan Monnier
2008-11-19 8:39 ` Juanma Barranquero
2008-11-19 13:27 ` Dan Nicolaescu
2008-11-19 22:45 ` Juri Linkov
2008-11-19 22:58 ` Tom Tromey
2008-11-20 2:18 ` Stefan Monnier
2008-11-22 19:08 ` Juri Linkov
2008-11-22 19:40 ` Dan Nicolaescu
2008-11-22 19:51 ` Juri Linkov
2008-11-22 20:20 ` Dan Nicolaescu
2008-11-22 22:03 ` Juanma Barranquero
2008-11-23 3:34 ` Miles Bader
2008-11-23 5:27 ` Stefan Monnier
2008-11-23 5:36 ` Juanma Barranquero
2008-11-23 5:58 ` Stefan Monnier
2008-11-23 8:10 ` Dan Nicolaescu
2008-11-23 10:45 ` Juri Linkov
2008-11-23 12:10 ` Dan Nicolaescu
2008-11-23 12:41 ` Juanma Barranquero
2008-11-23 17:16 ` Dan Nicolaescu
2008-11-23 17:45 ` Juanma Barranquero
2008-11-23 21:21 ` Dan Nicolaescu
2008-11-24 2:14 ` Stephen J. Turnbull
2008-11-24 3:06 ` Dan Nicolaescu
2008-11-24 5:35 ` Chong Yidong
2008-11-22 4:03 ` Kevin Rodgers
2008-11-19 4:07 ` Stephen J. Turnbull
2008-11-13 19:04 ` Tom Tromey
2008-11-13 19:23 ` Tom Tromey
2008-11-13 19:55 ` Juanma Barranquero
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=5f0ff9220811130629t505badf9kb1bcc380df89a08f@mail.gmail.com \
--to=tv.raman.tv@gmail.com \
--cc=emacs-devel@gnu.org \
/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.