diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index fa8c5cb4599..b34810ac85c 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -748,7 +748,6 @@ wants to review the package prior to installation. See `package-review'." (declare-function mail-text "sendmail" ()) (declare-function message-goto-body "message" (&optional interactive)) -(declare-function diff-no-select "diff" (old new &optional switches no-async buf)) (defun package-review (pkg-desc pkg-dir old-desc) "Review the package specified PKG-DESC which is about to be installed. @@ -781,7 +780,6 @@ attached." (package-desc-full-name pkg-desc))))) t) (?m - (require 'diff) ;for `diff-no-select' (with-temp-buffer (diff-no-select (package-desc-dir old-desc) pkg-dir diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index b71ed4c2473..6ff8599bd2f 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -1013,8 +1013,6 @@ Show wall-clock time elapsed during execution of COMMAND.") ((string-match "[^[:blank:]]" string) string) (nil))) -(autoload 'diff-no-select "diff") - (defun eshell/diff (&rest args) "Alias \"diff\" to call Emacs `diff' function." (let ((orig-args (eshell-stringify-list (flatten-tree args)))) diff --git a/lisp/files.el b/lisp/files.el index d4b3dd490c5..c52aad373bf 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6351,9 +6351,6 @@ Before and after saving the buffer, this function runs (setq buffer-backed-up nil))))))) setmodes)) -(declare-function diff-no-select "diff" - (old new &optional switches no-async buf)) - (defvar save-some-buffers--switch-window-callback nil) (defvar save-some-buffers-action-alist @@ -6384,7 +6381,6 @@ Before and after saving the buffer, this function runs (?d ,(lambda (buf) (if (null (buffer-file-name buf)) (message "Not applicable: no file") - (require 'diff) ;for diff-no-select. (let ((diffbuf (diff-no-select (buffer-file-name buf) buf nil 'noasync))) (if (not enable-recursive-minibuffers) diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 2ae42aea358..68cc1abdbe3 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -154,6 +154,7 @@ Possible values are: (call-process diff-command nil t nil "--help")) (if (search-backward "--label" nil t) t)))))) +;;;###autoload (defun diff-no-select (old new &optional switches no-async buf) ;; Noninteractive helper for creating and reverting diff buffers "Compare the OLD and NEW file/buffer.