A 30-year-old man has been observed by others to have episodes of staring blankly and being unresponsive to questions for 1-2 minutes, accompanied by lip-smacking movements, occurring several times a day for the past 6 months. Neurological examination is normal. EEG shows focal spike activity in the right temporal lobe. The diagnosis is: