Hi,

when the cursor is outside a parameter list, e.g. in a function name
identifier, then ada-format-paramlist raises an exception and prints
message "Wrong type argument: ...", which is not very intuitive.

The exception is propagated from a call to ada-goto-open-paren, just
at the very beginning of ada-fromat-paramlist. A draft patch attached.

-- 
Piotr Trojanek
#
# old_revision [634122ee17275b302ff7dad2cd6061b9f1a3306c]
#
# patch "ada-mode.el"
#  from [3bbae91f1d063c33868baaea7c9025a9a92546f1]
#    to [eb87b3997108d11661a1441c7bb970831c87c135]
#
============================================================
--- ada-mode.el 3bbae91f1d063c33868baaea7c9025a9a92546f1
+++ ada-mode.el eb87b3997108d11661a1441c7bb970831c87c135
@@ -636,7 +636,9 @@ Function is called with one optional arg
 (defun ada-format-paramlist ()
   "Reformat the parameter list point is in."
   (interactive)
-  (ada-goto-open-paren)
+  (condition-case nil
+      (ada-goto-open-paren)
+    (error (user-error "Not in parameter list")))
   (funcall indent-line-function); so new list is indented properly
 
   (let* ((begin (point))
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to