modified diff-mode