[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/ada-xref.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/ada-xref.el |
Date: |
Tue, 13 May 2003 17:15:44 -0400 |
Index: emacs/lisp/progmodes/ada-xref.el
diff -c emacs/lisp/progmodes/ada-xref.el:1.15
emacs/lisp/progmodes/ada-xref.el:1.16
*** emacs/lisp/progmodes/ada-xref.el:1.15 Sun May 4 15:54:00 2003
--- emacs/lisp/progmodes/ada-xref.el Tue May 13 17:15:44 2003
***************
*** 477,527 ****
(defun ada-xref-update-project-menu ()
"Update the menu Ada->Project, with the list of available project files."
! (let (submenu)
!
! ;; Create the standard items
! (set 'submenu (list (cons 'Load (cons "Load..."
! 'ada-set-default-project-file))
! (cons 'New (cons "New..." 'ada-prj-new))
! (cons 'Edit (cons "Edit..." 'ada-prj-edit))
! (cons 'sep (cons "---" nil))))
!
! ;; Add the new items
! (mapcar
! (lambda (x)
! (let ((name (or (car x) "<default>"))
! (command `(lambda ()
! "Change the active project file."
! (interactive)
! (ada-parse-prj-file ,(car x))
! (set 'ada-prj-default-project-file ,(car x))
! (ada-xref-update-project-menu))))
! (set 'submenu
! (append submenu
! (list (cons (intern name)
! (list
! 'menu-item
! (if (string= (file-name-extension name)
! ada-project-file-extension)
! (file-name-sans-extension
! (file-name-nondirectory name))
! (file-name-nondirectory name))
! command
! :button (cons
! :toggle
! (equal ada-prj-default-project-file
! (car x))
! ))))))))
!
! ;; Parses all the known project files, and insert at least the default
! ;; one (in case ada-xref-project-files is nil)
! (or ada-xref-project-files '(nil)))
!
! (if (not (featurep 'xemacs))
! (if (lookup-key ada-mode-map [menu-bar Ada Project])
! (setcdr (lookup-key ada-mode-map [menu-bar Ada Project])
! submenu)))
! ))
;;-------------------------------------------------------------
--- 477,518 ----
(defun ada-xref-update-project-menu ()
"Update the menu Ada->Project, with the list of available project files."
! ;; Create the standard items.
! (let ((submenu
! `("Project"
! ["Load..." ada-set-default-project-file t]
! ["New..." ada-prj-new t]
! ["Edit..." ada-prj-edit t]
! "---"
! ;; Add the new items
! ,@(mapcar
! (lambda (x)
! (let ((name (or (car x) "<default>"))
! (command `(lambda ()
! "Change the active project file."
! (interactive)
! (ada-parse-prj-file ,(car x))
! (set 'ada-prj-default-project-file ,(car x))
! (ada-xref-update-project-menu))))
! (vector
! (if (string= (file-name-extension name)
! ada-project-file-extension)
! (file-name-sans-extension
! (file-name-nondirectory name))
! (file-name-nondirectory name))
! command
! :button (cons
! :toggle
! (equal ada-prj-default-project-file
! (car x))
! ))))
!
! ;; Parses all the known project files, and insert at
! ;; least the default one (in case
! ;; ada-xref-project-files is nil)
! (or ada-xref-project-files '(nil))))))
!
! (easy-menu-add-item ada-mode-menu '() submenu)))
;;-------------------------------------------------------------
***************
*** 1042,1048 ****
(message "Cross-referencing information is not up-to-date. Please
recompile.")
)))))))
! (defun ada-goto-declaration-other-frame (pos &optional other-frame)
"Display the declaration of the identifier around POS.
The declation is shown in another frame if `ada-xref-other-buffer' is
non-nil."
(interactive "d")
--- 1033,1039 ----
(message "Cross-referencing information is not up-to-date. Please
recompile.")
)))))))
! (defun ada-goto-declaration-other-frame (pos)
"Display the declaration of the identifier around POS.
The declation is shown in another frame if `ada-xref-other-buffer' is
non-nil."
(interactive "d")
***************
*** 1251,1262 ****
(if (or arg ada-xref-confirm-compile)
(set 'cmd (read-from-minibuffer "enter command to debug: " cmd)))
! (let ((old-comint-exec (symbol-function 'comint-exec))
! comint-exec
! in-post-mode
! gud-gdb-massage-args)
;; Do not add -fullname, since we can have a 'rsh' command in front.
(fset 'gud-gdb-massage-args (lambda (file args) args))
(set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator))
--- 1242,1251 ----
(if (or arg ada-xref-confirm-compile)
(set 'cmd (read-from-minibuffer "enter command to debug: " cmd)))
! (let ((old-comint-exec (symbol-function 'comint-exec)))
;; Do not add -fullname, since we can have a 'rsh' command in front.
+ ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef
(fset 'gud-gdb-massage-args (lambda (file args) args))
(set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator))
***************
*** 1265,1276 ****
(set 'post-cmd (mapconcat 'identity post-cmd "\n"))
(if post-cmd
! (set 'post-cmd (concat post-cmd "\n")))
;; Temporarily replaces the definition of `comint-exec' so that we
;; can execute commands before running gdb.
! (make-local-variable 'comint-exec)
(fset 'comint-exec
`(lambda (buffer name command startfile switches)
(let (compilation-buffer-name-function)
--- 1254,1265 ----
(set 'post-cmd (mapconcat 'identity post-cmd "\n"))
(if post-cmd
! (set 'post-cmd (concat post-cmd "\n")))
;; Temporarily replaces the definition of `comint-exec' so that we
;; can execute commands before running gdb.
! ;; FIXME: This is evil and not temporary !!! -stef
(fset 'comint-exec
`(lambda (buffer name command startfile switches)
(let (compilation-buffer-name-function)