conditional execution based on major mode version