Function: ede-config-get-configuration
ede-config-get-configuration is a byte-compiled function defined in
config.el.gz.
Signature
(ede-config-get-configuration ARG &rest ARGS)
Implementations
((proj ede-project-with-config) &optional loadask) in `ede/config.el'.
Return the configuration for the project PROJ. If optional LOADASK is non-nil, then if a project file exists, and if the directory isn't on the `safe' list, ask to add it to the safe list.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/ede/config.el.gz
;;; Project Methods for configuration
(cl-defmethod ede-config-get-configuration ((proj ede-project-with-config) &optional loadask)
"Return the configuration for the project PROJ.
If optional LOADASK is non-nil, then if a project file exists, and if
the directory isn't on the `safe' list, ask to add it to the safe list."
(let ((config (oref proj config)))
;; If the request is coming at a time when we want to ask the user,
;; and there already is a configuration, AND the last time we ignored
;; the on-file version we did so automatically (without asking) then
;; in theory there are NO mods to this config, and we should re-ask,
;; and possibly re-load.
(when (and loadask config (eq (oref config ignored-file) 'auto))
(setq config nil))
(when (not config)
(let* ((top (oref proj directory))
(fname (expand-file-name (oref proj config-file-basename) top))
(class (oref proj config-class))
(ignore-type nil))
(if (and (file-exists-p fname)
(or (ede-directory-safe-p top)
;; Only force the load if someone asked.
(and loadask (ede-check-project-directory top))))
;; Load in the configuration
(setq config (eieio-persistent-read fname class))
;; If someone said not to load stuff from here then
;; pop up a warning.
(when (file-exists-p fname)
(message "Ignoring EDE config file for now and creating a new one. Use C-c . g to load it.")
;; Set how it was ignored.
(if loadask
(setq ignore-type 'manual)
(setq ignore-type 'auto))
)
;; Create a new one.
(setq config (make-instance class
"Configuration"
:file fname))
(oset config ignored-file ignore-type)
;; Set initial values based on project.
(ede-config-setup-configuration proj config))
;; Link things together.
(oset proj config config)
(oset config project proj)))
config))