I'm finally working on polishing the code for a release!

One thing left is mouse operations.

Ada 4.01 has this on the context menu that is popped up by right-click:

    ["Goto Declaration/Body" ada-point-and-xref
     :included ada-contextual-menu-on-identifier]
    ["Goto Body" ada-point-and-xref-body
     :included ada-contextual-menu-on-identifier]
    ["Goto Previous Reference" ada-xref-goto-previous-reference]
    ["List References" ada-find-references
     :included ada-contextual-menu-on-identifier]
    ["List Local References" ada-find-local-references
      :included ada-contextual-menu-on-identifier]
    ["-"                nil nil]
    ["Other File"       ff-find-other-file]
    ["Goto Parent Unit" ada-goto-parent]))

Some are shown only if the right click is on an identifier; that makes
sense.

Ada mode 5.0 has an empty context menu.

In my view, context menus should _only_ have entries that are affected
by where the mouse is clicked. So things like "goto other file" don't
belong there. 

I could be persuaded to include other operations; the obvious choice would be
all of the Ada menu.

"Goto Declaration/Body" is ada-goto-declaration; easy to add here.

"Goto Body" is a special case of ada-goto-declaration; I'd leave it out.

"Goto Previous Reference" was implemented with an Ada-mode specific
queue of places. 'previous-error' is good enough, and this doesn't belong on
a context menu anyway; leave it out.

"List References" is ada-show-references; easy to add here.


"List Local References" restricts references found to the current file.
This uses a gnatfind feature not provided by gnatinspect, so I'd rather
not implement it.

"Other File" doesn't belong on a context menu.

"Goto Parent Unit" goes to the parent unit of the current file. In 5.0,
this is handled by ada-find-other-file, but only when point is on a
subunit declaration. Is this useful when point is elsewhere? If so, it
should also go on the main menu.

Opinions?

-- 
-- Stephe

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to