[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/ada-prj.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/ada-prj.el |
Date: |
Thu, 20 Jun 2002 13:17:32 -0400 |
Index: emacs/lisp/progmodes/ada-prj.el
diff -c emacs/lisp/progmodes/ada-prj.el:1.8 emacs/lisp/progmodes/ada-prj.el:1.9
*** emacs/lisp/progmodes/ada-prj.el:1.8 Tue Apr 9 14:56:34 2002
--- emacs/lisp/progmodes/ada-prj.el Thu Jun 20 13:17:32 2002
***************
*** 1,9 ****
;;; ada-prj.el --- easy editing of project files for the ada-mode
! ;; Copyright (C) 1998, 99, 2000, 2001 Free Software Foundation, Inc.
;; Author: Emmanuel Briot <address@hidden>
! ;; Ada Core Technologies's version: $Revision: 1.8 $
;; Keywords: languages, ada, project file
;; This file is part of GNU Emacs.
--- 1,10 ----
;;; ada-prj.el --- easy editing of project files for the ada-mode
! ;; Copyright (C) 1998, 99, 2000, 2001, 2002
! ;; Free Software Foundation, Inc.
;; Author: Emmanuel Briot <address@hidden>
! ;; Ada Core Technologies's version: Revision: 1.55.2.2 (GNAT 3.15)
;; Keywords: languages, ada, project file
;; This file is part of GNU Emacs.
***************
*** 81,92 ****
"Editing the project file associated with the current Ada buffer.
If there is none, opens a new project file"
(interactive)
! (let ((file (ada-prj-find-prj-file)))
! (if file
! (progn
! (ada-reread-prj-file file)
! (ada-customize))
! (ada-prj-new))))
(defun ada-prj-add-keymap ()
"Add new keybindings for ada-prj."
--- 82,90 ----
"Editing the project file associated with the current Ada buffer.
If there is none, opens a new project file"
(interactive)
! (if ada-prj-default-project-file
! (ada-customize)
! (ada-prj-new)))
(defun ada-prj-add-keymap ()
"Add new keybindings for ada-prj."
***************
*** 236,243 ****
(defun ada-prj-load-directory (field &optional file-name)
"Append the content of FILE-NAME to FIELD in the current project file.
If FILE-NAME is nil, ask the user for the name."
! (unless file-name
! (set 'file-name (read-file-name "Root directory: " nil nil t)))
(set 'ada-prj-current-values
(plist-put ada-prj-current-values
--- 234,245 ----
(defun ada-prj-load-directory (field &optional file-name)
"Append the content of FILE-NAME to FIELD in the current project file.
If FILE-NAME is nil, ask the user for the name."
!
! ;; Do not use an external dialog for this, since it wouldn't allow
! ;; the user to select a directory
! (let ((use-dialog-box nil))
! (unless file-name
! (set 'file-name (read-file-name "Root directory: " nil nil t))))
(set 'ada-prj-current-values
(plist-put ada-prj-current-values
***************
*** 500,526 ****
(let ((ada-buffer (current-buffer))
(inhibit-read-only t))
! (ada-require-project-file)
!
! (switch-to-buffer "*Customize Ada Mode*")
! (kill-all-local-variables)
! (ada-xref-set-default-prj-values 'ada-prj-default-values ada-buffer)
! (ada-prj-initialize-values 'ada-prj-current-values ada-buffer filename)
!
! (set (make-local-variable 'ada-prj-ada-buffer) ada-buffer)
!
! (use-local-map (copy-keymap custom-mode-map))
! (local-set-key "\C-x\C-s" 'ada-prj-save)
!
! (make-local-variable 'widget-keymap)
! (define-key widget-keymap "\C-x\C-s" 'ada-prj-save)
!
! (set (make-local-variable 'ada-old-cross-prefix)
! (ada-xref-get-project-field 'cross-prefix))
!
! (ada-prj-display-page 1)
! ))
;; ---------------- Utilities --------------------------------
--- 502,542 ----
(let ((ada-buffer (current-buffer))
(inhibit-read-only t))
! ;; We can only edit interactively the standard ada-mode project files. If
! ;; the user is using other formats for the project file (through hooks in
! ;; `ada-load-project-hook', we simply edit the file
! (if (and (not new-file)
! (or ada-prj-default-project-file filename)
! (string= (file-name-extension
! (or filename ada-prj-default-project-file))
! "gpr"))
! (progn
! (find-file ada-prj-default-project-file)
! (add-hook 'after-save-hook 'ada-reread-prj-file t t)
! )
!
! ;; Else start the interactive editor
! (switch-to-buffer "*Customize Ada Mode*")
! (kill-all-local-variables)
!
! (ada-xref-set-default-prj-values 'ada-prj-default-values ada-buffer)
! (ada-prj-initialize-values
! 'ada-prj-current-values ada-buffer filename)
!
! (set (make-local-variable 'ada-prj-ada-buffer) ada-buffer)
!
! (use-local-map (copy-keymap custom-mode-map))
! (local-set-key "\C-x\C-s" 'ada-prj-save)
!
! (make-local-variable 'widget-keymap)
! (define-key widget-keymap "\C-x\C-s" 'ada-prj-save)
!
! (set (make-local-variable 'ada-old-cross-prefix)
! (ada-xref-get-project-field 'cross-prefix))
!
! (ada-prj-display-page 1)
! )))
;; ---------------- Utilities --------------------------------
***************
*** 544,551 ****
(setq ada-file (buffer-file-name)))
(save-excursion
- (set-buffer (get-file-buffer ada-file))
-
(let ((prj-file (ada-prj-find-prj-file t)))
(if (or (not prj-file)
(not (file-exists-p prj-file))
--- 560,565 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/ada-prj.el,
Stefan Monnier <=