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

Lines Matching +refs:bs +refs:current +refs:list

77 You can also add `-I-' if you do not want the current directory to be included.
79 current directory. This only has an impact if you are not using project files,
111 Emacs will substitute the current filename for ${full_current}, or add
119 Emacs will substitute the current filename for ${full_current}, or add
135 "*Name of the current project file.
211 "Number of positions kept in the list `ada-xref-pos-ring'.")
218 "Associative list of project files with properties.
222 See `ada-xref-set-default-prj-values' for the list of valid properties.
223 The current project is retrieved with `ada-xref-current-project'.
234 (defmacro ada-name-of (identlist) (list 'aref identlist 0))
235 (defmacro ada-line-of (identlist) (list 'aref identlist 1))
236 (defmacro ada-column-of (identlist) (list 'aref identlist 2))
237 (defmacro ada-file-of (identlist) (list 'aref identlist 3))
238 (defmacro ada-ali-index-of (identlist) (list 'aref identlist 4))
239 (defmacro ada-declare-file-of (identlist) (list 'aref identlist 5))
240 (defmacro ada-references-of (identlist) (list 'aref identlist 6))
241 (defmacro ada-on-declaration (identlist) (list 'aref identlist 7))
243 (defmacro ada-set-name (identlist name) (list 'aset identlist 0 name))
244 (defmacro ada-set-line (identlist line) (list 'aset identlist 1 line))
245 (defmacro ada-set-column (identlist col) (list 'aset identlist 2 col))
246 (defmacro ada-set-file (identlist file) (list 'aset identlist 3 file))
247 (defmacro ada-set-ali-index (identlist index) (list 'aset identlist 4 index))
248 (defmacro ada-set-declare-file (identlist file) (list 'aset identlist 5 file))
249 (defmacro ada-set-references (identlist ref) (list 'aset identlist 6 ref))
250 (defmacro ada-set-on-declaration (ident value) (list 'aset ident 7 value))
296 (add-to-list 'ada-xref-runtime-library-specs-path ".")
297 (add-to-list 'ada-xref-runtime-library-specs-path
310 (add-to-list 'ada-xref-runtime-library-ali-path ".")
311 (add-to-list 'ada-xref-runtime-library-ali-path
329 As a special case, ${current} is replaced with the name of the current
337 ((string= name "current")
372 ;; Try hard to find a project file, even if the current
374 (list 'filename (expand-file-name
385 'src_dir (list ".")
386 'obj_dir (list ".")
389 (list ada-case-exception-file))
405 'comp_cmd (list ada-prj-default-comp-cmd)
406 'check_cmd (list ada-prj-default-check-cmd)
407 'make_cmd (list ada-prj-default-make-cmd)
408 'run_cmd (list (concat "./${main}" (if is-windows ".exe")))
409 'debug_pre_cmd (list (concat ada-cd-command " ${build_dir}"))
412 'debug_post_cmd (list nil)))
417 "Extract the value of FIELD from the current project file.
424 (let* ((project-plist (cdr (ada-xref-current-project)))
450 (list build-dir)
452 (ada-get-absolute-dir-list (ada-xref-get-project-field 'src_dir)
465 (list build-dir)
467 (ada-get-absolute-dir-list (ada-xref-get-project-field 'obj_dir)
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))
483 "Update the menu Ada->Project, with the list of available project files."
538 (let (list
543 (set 'list (append list (file-name-all-completions string (car dirs)))))
546 (assoc string list))
548 list)
551 (mapcar (lambda (x) (cons x 1)) list)
559 (list (completing-read "File: " 'ada-do-file-completion)))
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.
582 (defun ada-xref-current-project (&optional no-user-question)
583 "Return the current project; nil if none.
586 (let* ((file-name (ada-xref-current-project-file no-user-question)))
589 (defun ada-show-current-project ()
590 "Display current project file name in message buffer."
592 (message (ada-xref-current-project-file)))
594 (defun ada-show-current-main ()
595 "Display current main unit name in message buffer."
601 (setq ada-xref-pos-ring (cons (list position filename) ada-xref-pos-ring))
636 "Find the project file associated with FILE (or the current buffer if nil).
641 in the current directory; if several are found, and NO-USER-QUESTION
650 ;; Not in an Ada buffer, or current buffer not associated
660 (let* ((current-file (or file (buffer-file-name)))
662 (file-name-sans-extension current-file)
664 (dir (file-name-directory current-file))
682 ;; Exactly one project file was found in the current directory
686 ;; multiple project files in current directory, ask the user
688 (with-output-to-temp-buffer "*choice list*"
712 ;; No project file in the current directory; ask user
732 (ada-buffer (current-buffer)))
739 (ada-xref-set-default-prj-values 'project (current-buffer))
764 (add-to-list 'src_dir
767 (add-to-list 'obj_dir
776 (add-to-list 'make_cmd (match-string 2)))
778 (add-to-list 'comp_cmd (match-string 2)))
780 (add-to-list 'check_cmd (match-string 2)))
782 (add-to-list 'run_cmd (match-string 2)))
784 (add-to-list 'debug_pre_cmd (match-string 2)))
786 (add-to-list 'debug_post_cmd (match-string 2)))
816 ;; We initialize it with the current environment variables.
820 ;; current buffer is.
824 (list command-line-default-directory)
826 (list "." default-directory))))
830 (list command-line-default-directory)
832 (list "." default-directory))))
836 ;; Delete the default project file from the list, if it is there.
838 ;; the list
845 (add-to-list 'ada-xref-project-files (cons prj-file project)))
851 ;; Set the casing exceptions file list
868 ;; current directory, and only then in the current file's directory. This
869 ;; current file is assumed at this point to be in the common source
871 (setq compilation-search-path (list nil default-directory))
879 If LOCAL-ONLY is t, only the declarations in the current file are returned."
890 (if (or (buffer-modified-p (current-buffer))
912 If LOCAL-ONLY is t, then list only the references in FILE, which
977 (let* ((curbuf (current-buffer))
1085 (defun ada-get-absolute-dir-list (dir-list root-dir)
1086 "Return the list of absolute directories found in DIR-LIST.
1088 (mapcar (lambda (x) (expand-file-name x root-dir)) dir-list))
1132 ;; Make a single command from the list of commands, including the
1148 "Set main_unit and main project variables to current buffer, build main."
1151 (let* ((file (buffer-file-name (current-buffer)))
1154 (error "No file for current buffer")
1165 (defun ada-compile-current (&optional arg prj-field)
1166 "Recompile the current file.
1182 ;; Make a single command from the list of commands, including the
1192 (defun ada-check-current (&optional arg)
1193 "Check the current file for syntax errors.
1196 (ada-compile-current arg 'check_cmd))
1212 (set 'command (list (file-name-sans-extension (buffer-name)))))
1229 (start-process "run" (current-buffer) shell-file-name
1252 (let ((buffer (current-buffer))
1338 (process-send-string (get-buffer-process (current-buffer)) post-cmd)
1354 "Reread either the current project, or FILENAME if non-nil."
1367 (defun ada-xref-current (file &optional ali-file-name)
1394 (ada-compile-current)
1407 (defun ada-find-file-in-dir (file dir-list)
1410 (while (and (not found) dir-list)
1411 (set 'found (concat (file-name-as-directory (car dir-list))
1416 (set 'dir-list (cdr dir-list)))
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.
1439 ;; 1- replace the extension of the current file with .ali,
1525 (concat (file-name-sans-extension (ada-xref-current file))
1534 (ada-xref-current file ali-file-name)))
1574 The returned list represents the entity, and can be manipulated through the
1624 (number-to-string (1+ (current-column))))
1641 ;; the "^X ..." line for the current file, and before the next "^X" line
1730 (let ((current-line (buffer-substring
1736 (set 'current-line (concat current-line (match-string 1)))
1757 (ada-set-references identlist current-line)
1762 "Find the matching position for IDENTLIST in the current ali buffer.
1777 (ali-buffer (current-buffer)))
1792 ;; construct a list with the file names and the positions within
1794 (add-to-list
1795 'declist (list line-ali (match-string 1) line-ada col-ada))
1805 (kill-buffer (current-buffer))
1814 ;; more than one => display choice list
1817 (with-output-to-temp-buffer "*choice list*"
1870 (set 'locations (list (list (match-string 1 ali-line) ;; line
1895 (set 'locations (append locations (list (list line col file)))))
1899 (set 'locations (append locations (list (car locations))))
1924 (kill-buffer (current-buffer))
1946 (let (list
1982 (set 'file (list (match-string 1) line column))
1986 (unless (member file list)
1987 (set 'list (append list (list file))))))))
1993 ;; Now display the list of possible matches
1997 ((null list)
2001 ((= (length list) 1)
2002 (set 'file (ada-find-src-file-in-dir (caar list)))
2005 (string-to-number (nth 1 (car list)))
2006 (string-to-number (nth 2 (car list)))
2009 (error (concat (caar list) " not found in src_dir")))
2016 (with-output-to-temp-buffer "*choice list*"
2023 (while (< counter (length list))
2026 (nth 0 (nth counter list))
2027 (nth 1 (nth counter list))
2028 (nth 2 (nth counter list))
2036 (> choice (length list)))
2042 (kill-buffer "*choice list*")
2044 (set 'file (ada-find-src-file-in-dir (car (nth choice list))))
2047 (string-to-number (nth 1 (nth choice list)))
2048 (string-to-number (nth 2 (nth choice list)))
2051 (signal 'error-file-not-found (car (nth choice list))))
2132 ;; Find the parent library file of the current file
2145 (re-search-forward "^U \\([^ \t%]+\\)%[bs][ \t]+\\([^ \t]+\\)")
2175 (kill-buffer (current-buffer))
2212 "Create an Ada package body in the current buffer.
2214 If INTERACTIVE is nil, kill the current buffer.
2221 ;; If the current buffer is the body (as is the case when calling this
2225 (kill-buffer (current-buffer)))
2228 ;; Make sure the current buffer is the spec (this might not be the case
2231 (unless (buffer-file-name (car (buffer-list)))
2232 (set-buffer (cadr (buffer-list))))
2236 (filename (buffer-file-name (car (buffer-list))))
2282 (add-to-list 'completion-ignored-extensions ".ali")