On 28 Dec 2013, at 16:11, [email protected] wrote: > Emacs Ada mode 5.0 is now in Gnu ELPA.
My fingers are used to C-c ; for comment selection, and C-c : for uncomment. I see that commenting/uncommenting are supported on the editing menu; commenting is fine, but uncommenting fails with “Wrong number of arguments: (2.3), 1”. I think this is because "Uncomment selection” is bound to (comment-region t), which doesn’t match comment-region’s profile. While checking this out, I found this at http://www.emacswiki.org/emacs/CommentingCode: (defun comment-eclipse () (interactive) (let ((start (line-beginning-position)) (end (line-end-position))) (when (region-active-p) (setq start (save-excursion (goto-char (region-beginning)) (beginning-of-line) (point)) end (save-excursion (goto-char (region-end)) (end-of-line) (point)))) (comment-or-uncomment-region start end))) and (global-set-key "\M-;" 'comment-eclipse) but probably we could just use something like this, from the same place: (defun uncomment-region (beg end) "Like `comment-region' invoked with a C-u prefix arg." (interactive "r") (comment-region beg end -1)) _______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
