Substantial improvement in short-term pain following carpal tunnel surgery for patients with moderate preoperative electromyography findings is diminished with diabetes and smoking.