• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/progmodes/

Lines Matching defs:project

79 current directory.  This only has an impact if you are not using project files,
112 the filename at the end. This is the same syntax as in the project file."
120 the filename at the end. This is the same syntax as in the project file."
131 This is the same syntax as in the project file."
134 (defcustom ada-prj-default-project-file ""
135 "*Name of the current project file.
136 Emacs will not try to use the search algorithm to find the project file if
137 this string is not empty. It is set whenever a project file is found."
142 This has the same syntax as in the project file (with variable substitution)."
145 (defcustom ada-always-ask-project nil
146 "*If nil, use default values when no project file was found.
147 Otherwise, ask the user for the name of the project file to use."
162 of sources, since it will search in all the files in your project."
165 (defvar ada-load-project-hook nil
166 "Hook that is run when loading a project file.
168 the project file to load.
169 This hook should be used to support new formats for the project files.
173 project files, and return that buffer. (The usual \"src_dir=\" or \"obj_dir=\"
174 lines.) It should return nil if it doesn't know how to convert that project
180 "Name of the last project file entered by the user.")
183 "The extension used for project files.")
217 (defvar ada-xref-project-files '()
218 "Associative list of project files with properties.
219 It has the format: (project project ...)
220 A project has the format: (project-file . project-plist)
223 The current project is retrieved with `ada-xref-current-project'.
224 Properties are retrieved with `ada-xref-get-project-field', set with
225 `ada-xref-set-project-field'. If project properties are accessed with no
226 project file, a (nil . default-properties) entry is created.")
328 Assumes project exists.
343 (setq value (ada-xref-get-project-field (intern name))))))
372 ;; Try hard to find a project file, even if the current
376 (ada-prj-default-project-file
377 ada-prj-default-project-file)
381 "and no default project "
416 (defun ada-xref-get-project-field (field)
417 "Extract the value of FIELD from the current project file.
424 (let* ((project-plist (cdr (ada-xref-current-project)))
427 (set 'value (plist-get project-plist field))
447 (let ((build-dir (ada-xref-get-project-field 'build_dir)))
452 (ada-get-absolute-dir-list (ada-xref-get-project-field 'src_dir)
462 (let ((build-dir (ada-xref-get-project-field 'build_dir)))
467 (ada-get-absolute-dir-list (ada-xref-get-project-field 'obj_dir)
473 (defun ada-xref-set-project-field (field value)
474 "Set FIELD to VALUE in current project. Assumes project exists."
475 ;; same algorithm to find project-plist as ada-xref-current-project
476 (let* ((file-name (ada-xref-current-project-file))
477 (project-plist (cdr (assoc file-name ada-xref-project-files))))
479 (setq project-plist (plist-put project-plist field value))
480 (setcdr (assoc file-name ada-xref-project-files) project-plist)))
482 (defun ada-xref-update-project-menu ()
483 "Update the menu Ada->Project, with the list of available project files."
487 ["Load..." ada-set-default-project-file t]
496 "Change the active project file."
499 (set 'ada-prj-default-project-file ,(car x))
500 (ada-xref-update-project-menu))))
510 (equal ada-prj-default-project-file
514 ;; Parses all the known project files, and insert at
516 ;; ada-xref-project-files is nil)
517 (or ada-xref-project-files '(nil))))))
536 defined in the project file."
568 (defun ada-require-project-file ()
569 "If the current project does not exist, load or create a default one.
571 (if (not (ada-xref-current-project t))
574 (defun ada-xref-current-project-file (&optional no-user-question)
575 "Return the current project file name; never nil unless NO-USER-QUESTION.
577 `ada-require-project-file' first if a project must exist."
578 (if (not (string= "" ada-prj-default-project-file))
579 ada-prj-default-project-file
582 (defun ada-xref-current-project (&optional no-user-question)
583 "Return the current project; nil if none.
585 `ada-require-project-file' first if a project must exist."
586 (let* ((file-name (ada-xref-current-project-file no-user-question)))
587 (assoc file-name ada-xref-project-files)))
589 (defun ada-show-current-project ()
590 "Display current project file name in message buffer."
592 (message (ada-xref-current-project-file)))
597 (message "ada-mode main_unit: %s" (ada-xref-get-project-field 'main_unit)))
620 (defun ada-set-default-project-file (name &optional keep-existing)
621 "Set the file whose name is NAME as the default project file.
622 If KEEP-EXISTING is true and a project file has already been loaded, nothing
624 a project file unless the user has already loaded one."
627 (not ada-prj-default-project-file)
628 (equal ada-prj-default-project-file ""))
630 (setq ada-prj-default-project-file name)
633 ;; ------ Handling the project file -----------------------------
636 "Find the project file associated with FILE (or the current buffer if nil).
638 return `ada-prj-default-project-file'. Otherwise, search for a file with
653 (if (and ada-prj-default-project-file
654 (not (string= ada-prj-default-project-file "")))
655 (setq selected ada-prj-default-project-file)
682 ;; Exactly one project file was found in the current directory
686 ;; multiple project files in current directory, ask the user
689 (princ "There are more than one possible project file.\n")
712 ;; No project file in the current directory; ask user
713 (unless (or no-user-question (not ada-always-ask-project))
716 (concat "project file [" ada-last-prj-file "]:")
727 "Read PRJ-FILE, set it as the active project."
730 (let (project src_dir obj_dir make_cmd comp_cmd check_cmd casing
735 ;; Set the project file as the active one.
736 (setq ada-prj-default-project-file prj-file)
738 ;; Initialize the project with the default values
739 (ada-xref-set-default-prj-values 'project (current-buffer))
749 'ada-load-project-hook prj-file)))
757 ;; Now overrides these values with the project file
772 (set 'project
773 (plist-put project 'build_dir
789 (set 'project (plist-put project (intern (match-string 1))
793 (if src_dir (set 'project (plist-put project 'src_dir
795 (if obj_dir (set 'project (plist-put project 'obj_dir
797 (if casing (set 'project (plist-put project 'casing
799 (if make_cmd (set 'project (plist-put project 'make_cmd
801 (if comp_cmd (set 'project (plist-put project 'comp_cmd
803 (if check_cmd (set 'project (plist-put project 'check_cmd
805 (if run_cmd (set 'project (plist-put project 'run_cmd
807 (if debug_post_cmd (set 'project (plist-put project 'debug_post_cmd
809 (if debug_pre_cmd (set 'project (plist-put project 'debug_pre_cmd
815 ;; Else the file wasn't readable (probably the default project).
821 (set 'project
822 (plist-put project 'src_dir
827 (set 'project
828 (plist-put project 'obj_dir
836 ;; Delete the default project file from the list, if it is there.
837 ;; Note that in that case, this default project is the only one in
839 (if (assoc nil ada-xref-project-files)
840 (setq ada-xref-project-files nil))
842 ;; Memorize the newly read project file
843 (if (assoc prj-file ada-xref-project-files)
844 (setcdr (assoc prj-file ada-xref-project-files) project)
845 (add-to-list 'ada-xref-project-files (cons prj-file project)))
863 (ada-xref-update-project-menu)
881 (ada-require-project-file)
917 (ada-require-project-file)
928 (switches (ada-xref-get-project-field 'gnatfind_opt))
938 ;; If a project file is defined, use it
939 (if (and ada-prj-default-project-file
940 (not (string= ada-prj-default-project-file "")))
941 (if (string-equal (file-name-extension ada-prj-default-project-file)
943 (setq command (concat command " -P" ada-prj-default-project-file))
944 (setq command (concat command " -p" ada-prj-default-project-file))))
967 (defalias 'ada-change-prj (symbol-function 'ada-set-default-project-file))
973 (ada-require-project-file)
1039 (ada-require-project-file)
1077 (let ((machine (ada-xref-get-project-field 'remote_machine)))
1095 project file."
1098 (build-dir (ada-xref-get-project-field 'build_dir)))
1106 (ada-xref-get-project-field 'src_dir)
1112 (ada-xref-get-project-field 'obj_dir)
1118 "Compile the application, using the command found in the project file.
1121 (ada-require-project-file)
1122 (let ((cmd (ada-xref-get-project-field 'make_cmd))
1128 ;; If no project file was found, ask the user
1148 "Set main_unit and main project variables to current buffer, build main."
1150 (ada-require-project-file)
1161 (ada-xref-set-project-field 'main main)
1162 (ada-xref-set-project-field 'main_unit main)
1168 PRJ-FIELD is the name of the field to use in the project file to get the
1171 (ada-require-project-file)
1173 (cmd (ada-xref-get-project-field field))
1186 ;; If no project file was found, ask the user
1202 (ada-require-project-file)
1204 (let ((machine (ada-xref-get-project-field 'cross_prefix)))
1208 (let ((command (ada-xref-get-project-field 'run_cmd)))
1249 project file."
1251 (ada-require-project-file)
1256 (ada-xref-get-project-field 'debug_cmd))
1257 pre-cmd (ada-xref-get-project-field 'debug_pre_cmd)
1258 post-cmd (ada-xref-get-project-field 'debug_post_cmd))
1260 ;; If the command was not given in the project file, start a bare gdb
1354 "Reread either the current project, or FILENAME if non-nil."
1362 (or (ada-xref-get-project-field 'cross_prefix) ""))
1420 "Find the ali file FILE, searching obj_dir for the current project.
1426 "Find the source file FILE, searching src_dir for the current project.
1434 the project file."
1543 Search in project file for possible paths."
1548 ;; project file, otherwise load the file and its project file
2136 (ada-require-project-file)
2217 (ada-require-project-file)
2229 ;; if for instance the user was asked for a project file)
2284 (ada-xref-update-project-menu)
2298 "File not found in src-dir (check project file): ")