#18 insert grouping comments //@{ problem

version 1.5.0
closed-fixed
5
2005-04-13
2004-07-13
No

When inserting a grouping comment around the region in
emacs 21.3.1 the trailing //@} is misplaced.

This is because the function is given start and end and
then inserts 'x' chars. It then goto-char end (which is
now wrong by x chars) and inserts the closing grouping
comment.

Reversing the grouping comment insertion order fixes this:

(defun doxymacs-insert-grouping-comments (start end)
"Inserts doxygen grouping comments around the current
region."
(interactive "*r")
(save-excursion
(goto-char end)
(end-of-line)
(doxymacs-call-template "group-end-comment")
(goto-char start)
(beginning-of-line)
(doxymacs-call-template "group-begin-comment")))

David Greaves

Discussion

  • Ryan T. Sammartino

    Logged In: YES
    user_id=152677

    There's definitely a bug here, but your suggestion doesn't
    seem to work for me (xemacs-21.4.15).

    Investigating...

     
  • Ryan T. Sammartino

    Logged In: YES
    user_id=152677

    I have a patch which I will commit shortly.

     
  • Ryan T. Sammartino

    Patch to fix this bug.

     
  • Ryan T. Sammartino

    • status: open --> closed-fixed
     

Log in to post a comment.