(let ((old "old") (new "new") (target (get-buffer-create "*My Diff*")) (labels (and (diff-check-labels) (mapcar 'shell-quote-argument (list "--label" "*old revision*" "--label" "*new revision*"))))) (if labels (let ((diff-use-labels nil) (sw (nconc labels (if (listp diff-switches) diff-switches (list diff-switches))))) (diff-no-select old new switches nil target)) (diff-no-select old new nil nil target)))