emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/ada-xref.el,v


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/ada-xref.el,v
Date: Mon, 13 Aug 2007 11:10:48 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      07/08/13 11:10:48

Index: ada-xref.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/ada-xref.el,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- ada-xref.el 26 Jul 2007 05:27:23 -0000      1.36
+++ ada-xref.el 13 Aug 2007 11:10:47 -0000      1.37
@@ -71,7 +71,7 @@
   :type 'string :group 'ada)
 
 (defcustom ada-gnatls-args '("-v")
-  "*Arguments to pass to `gnatfind' to find location of the runtime.
+  "*Arguments to pass to `gnatls' to find location of the runtime.
 Typical use is to pass `--RTS=soft-floats' on some systems that support it.
 
 You can also add `-I-' if you do not want the current directory to be included.
@@ -322,7 +322,6 @@
         (reverse ada-xref-runtime-library-ali-path))
     ))
 
-
 (defun ada-treat-cmd-string (cmd-string)
   "Replace meta-sequences like ${...} in CMD-STRING with the appropriate value.
 Assumes project exists.
@@ -345,7 +344,7 @@
       ;; Check if there is an environment variable with the same name
       (if (null value)
          (if (not (setq value (getenv name)))
-             (message "%s" (concat "No environment variable " name " found"))))
+             (message "%s" (concat "No project or environment variable " name 
" found"))))
 
       (cond
        ((null value)
@@ -535,6 +534,11 @@
 Completion is attempted in all the directories in the source path, as
 defined in the project file."
   ;; FIXME: doc arguments
+
+  ;; This function is not itself interactive, but it is called as part
+  ;; of the prompt of interactive functions, so we require a project
+  ;; file.
+  (ada-require-project-file)
   (let (list
        (dirs (ada-xref-get-src-dir-field)))
 
@@ -663,9 +667,6 @@
                            ada-prj-file-extension))
             (dir          (file-name-directory current-file))
 
-            ;; on Emacs 20.2, directory-files does not work if
-            ;; parse-sexp-lookup-properties is set
-            (parse-sexp-lookup-properties nil)
             (prj-files    (directory-files
                            dir t
                            (concat ".*" (regexp-quote
@@ -905,6 +906,8 @@
   (interactive "d\nP")
   (ada-find-references pos arg t))
 
+(defconst ada-gnatfind-buffer-name "*gnatfind*")
+
 (defun ada-find-any-references
   (entity &optional file line column local-only append)
   "Search for references to any entity whose name is ENTITY.
@@ -943,23 +946,25 @@
            (setq command (concat command " -P" ada-prj-default-project-file))
          (setq command (concat command " -p" ada-prj-default-project-file))))
 
-    (if (and append (get-buffer "*gnatfind*"))
+    (if (and append (get-buffer ada-gnatfind-buffer-name))
        (save-excursion
          (set-buffer "*gnatfind*")
          (setq old-contents (buffer-string))))
 
     (let ((compilation-error "reference"))
-      (compilation-start command))
+      (compilation-start command 'compilation-mode (lambda (mode) 
ada-gnatfind-buffer-name)))
 
     ;;  Hide the "Compilation" menu
     (save-excursion
-      (set-buffer "*gnatfind*")
+      (set-buffer ada-gnatfind-buffer-name)
       (local-unset-key [menu-bar compilation-menu])
 
       (if old-contents
          (progn
            (goto-char 1)
+           (set 'buffer-read-only nil)
            (insert old-contents)
+           (set 'buffer-read-only t)
            (goto-char (point-max)))))
     )
   )
@@ -1940,7 +1945,7 @@
 anywhere in the object path.
 This command requires the external `egrep' program to be available.
 
-This works well when one is using an external librarie and wants to find
+This works well when one is using an external library and wants to find
 the declaration and documentation of the subprograms one is using."
 ;; FIXME: what does this function do?
   (let (list




reply via email to

[Prev in Thread] Current Thread [Next in Thread]