in reply to xemacs el code to check for ";"

Use cperl-mode. That is the best advice you can get. It automatically check the syntax (in most cases). It has syntax hilighting. So if you haven't typed ';' at the end, it will reflect in instant visibility.

Read more at C-perl mode on emacs wiki.