Function: projection-type-p
projection-type-p is a byte-compiled function defined in
projection-core-type.el.
Signature
(projection-type-p OBJ)
Documentation
Return non-nil if OBJ is an object of type projection-type(var)/projection-type(fun).
Source Code
;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-core-type.el
(defclass projection-type ()
((name
:initarg :name
:custom symbol
:reader projection-type--name
:documentation "Identifier for the current project type.
This should be unique within the body of the variable `projection-project-types'.
A special name of default is accepted when no specialised project type is applicable.")
(predicate
:initarg :predicate
:custom (choice
(const t :tag "Always supported")
(function :tag "Predicate function")
(string :tag "Marker file for project")
(repeat (string :tag "Marker files for project")))
:documentation "Predicate used to assert whether the current project matches this project type.
Predicate can be a string matching a file-name accessible from the root of the
project or for more complicated project types it should be a function returning a
boolean. You can also supply a list of either of these and if a project matches any
of them then PROJECT will be matched.")
;; Compilation commands
(configure
:initarg :configure
:initform nil
:custom (choice
(const nil :tag "Project does not support configure.")
(string :tag "Shell command to invoke.")
(function :tag "Either a command or a function returning a valid command type."))
:documentation "Compilation command used to configure this project.
When nil the project is interpreted as not supporting this command type. When a
string that string will be passed to `compile' as a shell command. When a function
then the behaviour depends on the type of function. If the function is interactive
(`commandp') it will be called interactively as a command. Otherwise the function
will be called and the result should be one of the other supported command types.")
(build
:initarg :build
:initform nil
:custom (choice
(const nil :tag "Project does not support build.")
(string :tag "Shell command to invoke.")
(function :tag "Either a command or a function returning a valid command type."))
:documentation "Compilation command used to build this project.
This is of the same type and semantics as the configure slot.")
(test
:initarg :test
:initform nil
:custom (choice
(const nil :tag "Project does not support test.")
(string :tag "Shell command to invoke.")
(function :tag "Either a command or a function returning a valid command type."))
:documentation "Command used to test project.
This is of the same type and semantics as the configure slot.")
(run
:initarg :run
:initform nil
:custom (choice
(const nil :tag "Project does not support run.")
(string :tag "Shell command to invoke.")
(function :tag "Either a command or a function returning a valid command type."))
:documentation "Command used to run project.
This is of the same type and semantics as the configure slot.")
(package
:initarg :package
:initform nil
:custom (choice
(const nil :tag "Project does not support package.")
(string :tag "Shell command to invoke.")
(function :tag "Either a command or a function returning a valid command type."))
:documentation "Command used to package project.
This is of the same type and semantics as the configure slot.")
(install
:initarg :install
:initform nil
:custom (choice
(const nil :tag "Project does not support install.")
(string :tag "Shell command to invoke.")
(function :tag "Either a command or a function returning a valid command type."))
:documentation "Command used to install project.
This is of the same type and semantics as the configure slot.")
;; File navigation
(src-dir :initarg :src-dir :initform nil :documentation "Currently unused.")
(test-dir :initarg :test-dir :initform nil :documentation "Currently unused.")
(test-prefix
:initarg :test-prefix
:initform nil
:custom (choice
(string :tag "Test file prefix")
(repeat (string :tag "Test file prefixes")))
:documentation "Possible prefixes for a file to treat as a test file.
For example foo.cpp could have a related test at test_foo.cpp file with the prefix
being test_.")
(test-suffix
:initarg :test-suffix
:initform nil
:custom (choice
(string :tag "Test file prefix")
(repeat (string :tag "Test file prefixes")))
:documentation "Possible suffixes for a file to treat as a test file.
For example foo.cpp could have a related test foo_test.cpp file with the suffix being
_test.")
(artifacts-list
:initarg :artifacts-list
:initform nil
:custom '(choice
function
(list (repeat function)))
:documentation "Function used to query available artifacts for this project type.
See `projection-artifacts'.")
;; `projection-customize-compilation'
(compilation-search-paths
:initarg :compilation-search-paths
:initform nil
:custom '(choice
string
function
(list (repeat (choice string function))))
:documentation "List of search paths to add to `compilation-search-path' for this project.
If defined as a function the function will be invoked to return either a path or list of paths.")
(compilation-error-regexp-alist
:initarg :compilation-error-regexp-alist
:initform nil
:custom '(list (cons (symbol :tag "Pattern name")
(sexp :tag "Value for `compilation-error-regexp-alist'")))
:documentation "List of search paths to add to `compilation-error-regexp-alist' for this project.
This is intentionally written like an entry in
`compilation-error-regexp-alist-alist' but will be added
`compilation-error-regexp-alist' instead.")
;; `projection-multi-compile'
(compile-multi-targets
:initarg :compile-multi-targets
:initform nil
:custom '(choice
function
(list (repeat function)))
:documentation "Supported `compile-multi' targets for the current project type.
This is only used with the optional `projection-multi' package. The value is any action
supported by `compile-multi-config'."))
"Base class for a supported project type in `projection'.")