[Emacs-ada-mode] for info: ada-mode bug reported though emacs ...

WAROQUIERS Philippe philippe.waroquiers at eurocontrol.int
Thu Aug 9 05:37:14 PDT 2007


With emacs 22, I encountered a bug in the ada-mode. I reported this
bug through emacs Help -> Report Bug.

In the meantime, here is some direct copied info on the ada-mode mailing
list.

How to reproduce:
 compile an Ada file with gcc gnat compiler
 open this Ada file
 position on an identifier 
 C-c l   (list local references)
 position on another identifier
 C-u C-c l (list local references, but asking to add to the ref list
            by using the C-u prefix argument)

with emacs 21: the second list of references is appended 
with emacs 22: the second list of references replaces instead of
appending

To fix the bug:

Add the below function in front of ada-find-any-references:
***********************************************************

(defun gnatfind-buffer-name (mode)
  "Returns the name of the buffer to list Ada references"
  "*gnatfind*")

Replace the end of ada-find-any-references by:
**********************************************

    (let ((compilation-error "reference"))
      (compilation-start command 'compilation-mode
'gnatfind-buffer-name))

    ;;  Hide the "Compilation" menu
    (save-excursion
      (set-buffer "*gnatfind*")
      (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)))))
    )
  )

____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.




More information about the Emacs-ada-mode mailing list