[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] scratch/project 106e023: Add new `project' package, an
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] scratch/project 106e023: Add new `project' package, and use it in xref |
Date: |
Tue, 07 Jul 2015 23:44:14 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> +(defvar project-functions '(project-try-vc
> + project-try-ede
> + project-ask-user)
I think I'd prefer a slightly more verbose name for this variable.
Also, I'd suggest you use (list #'foo ... #'bar) so that we
automatically check that those functions are known.
> +(cl-defgeneric project-root (project)
> + "Return the root directory of the current project.")
This should specify that it's an absolute file name.
> +(cl-defgeneric project-source-directories (project)
> + "Return the list of source directories.
> +Including any where source (or header, etc) files used by the
> +current project may be found. Including those outside of the
> +project tree."
> + (project-directories project))
Same here: we should explicitly say if relative file names can appear or
not in the output.
> +(defvar project-vc-root-files '(".git" ".hg" ".bzr"))
I'd appreciate if this could be better integrated with VC (so it
automatically picks up other names for other supported backends).
> +(defun project-try-ede (dir)
> + (when (featurep 'ede)
> + (cons 'ede (ede-directory-get-open-project dir 'ROOT))))
Why use a cons cell with the car's symbol standing for a type tag, when
the carried object is already properly self-describing (IIUC it's an
EIEIO object)?
Stefan
- Re: [Emacs-diffs] scratch/project 106e023: Add new `project' package, and use it in xref,
Stefan Monnier <=