Skip to content

Commit

Permalink
Improve move logic
Browse files Browse the repository at this point in the history
Detect it the tag is a function, reuse srefactor--insert-function
instead of simply yank the tag copied from senator-yank-tag.
  • Loading branch information
tuhdo committed Apr 23, 2015
1 parent 54dcf29 commit 0ce5561
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions srefactor.el
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,13 @@ namespace.
(insert (srefactor--function-to-function-pointer refactor-tag))
(insert ";"))
(newline 1)
(yank)
(indent-according-to-mode))
(newline-and-indent))
(if (eq class 'function)
(srefactor--insert-function refactor-tag (if (semantic-tag-prototype-p refactor-tag)
'gen-func-proto
'gen-func-proto))
(yank)
(indent-according-to-mode)
(newline-and-indent))))
(t (senator-yank-tag)))))
(goto-char (point-max))
(cond
Expand Down

0 comments on commit 0ce5561

Please sign in to comment.