On Wed, 2011-05-11 at 07:23 +0000, Vijay Kumar B. wrote:
> Kenneth Gonsalves <lawgon@...> writes:
> > thanks - works well, but one more thing - sometimes the strings are
> > marked with '' and not "" - how to handle this case?
>
> The following code handles both the quoting styles.
>
> ------
> (defun py-mark-trans ()
> (interactive)
> (save-excursion
> (re-search-backward "[\"']")
> (insert "_(")
> (re-search-forward "[\"']")
> (re-search-forward "[\"']")
> (insert ")")))
coolness
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc