Improve lambda function in init.el and ext.el