diff options
Diffstat (limited to 'lisp/ediff-util.el')
-rw-r--r-- | lisp/ediff-util.el | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 4583e754793..3bc82dd4daf 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -4071,28 +4071,25 @@ Mail anyway? (y or n) ") ) )) -(cond ((fboundp 'nuke-selective-display) - ;; XEmacs has nuke-selective-display - (defalias 'ediff-nuke-selective-display 'nuke-selective-display)) - (t - (defun ediff-nuke-selective-display () - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (let ((mod-p (buffer-modified-p)) - buffer-read-only end) - (and (eq t selective-display) - (while (search-forward "\^M" nil t) - (end-of-line) - (setq end (point)) - (beginning-of-line) - (while (search-forward "\^M" end t) - (delete-char -1) - (insert "\^J")))) - (set-buffer-modified-p mod-p) - (setq selective-display nil))))) - )) +(defun ediff-nuke-selective-display () + (if (featurep 'xemacs) + (nuke-selective-display) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (let ((mod-p (buffer-modified-p)) + buffer-read-only end) + (and (eq t selective-display) + (while (search-forward "\^M" nil t) + (end-of-line) + (setq end (point)) + (beginning-of-line) + (while (search-forward "\^M" end t) + (delete-char -1) + (insert "\^J")))) + (set-buffer-modified-p mod-p) + (setq selective-display nil)))))) ;; The next two are modified versions from emerge.el. |