From a5c7df1a4bb8cf7efe5acc7313667a63d7f660c5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 23 May 2013 00:10:05 -0700 Subject: [PATCH] Silence ediff compilation * lisp/vc/ediff-diff.el, lisp/vc/ediff-merg.el: Require ediff-util at run-time. * lisp/vc/ediff-mult.el: Adjust requires. (ediff-directories-internal, ediff-directory-revisions-internal) (ediff-patch-file-internal): Declare. * lisp/vc/ediff-ptch.el: Adjust requires. (ediff-use-last-dir, ediff-buffers-internal): Declare. (ediff-find-file): Autoload. * lisp/vc/ediff-util.el: No need to load ediff when compiling. (ediff-regions-internal): Declare. * lisp/vc/ediff-wind.el: Adjust requires. (ediff-compute-toolbar-width): Define when compiling. (ediff-setup-control-buffer, ediff-make-bottom-toolbar): Declare. * lisp/vc/ediff.el: No need to load dired, ediff-ptch when compiling. (dired-get-filename, dired-get-marked-files) (ediff-last-dir-patch, ediff-patch-default-directory) (ediff-get-patch-buffer, ediff-dispatch-file-patching-job) (ediff-patch-buffer-internal): Declare. --- lisp/ChangeLog | 18 ++++++++++++++++++ lisp/vc/ediff-diff.el | 4 +--- lisp/vc/ediff-merg.el | 5 +---- lisp/vc/ediff-mult.el | 21 ++++++++++++++------- lisp/vc/ediff-ptch.el | 13 ++++++++----- lisp/vc/ediff-util.el | 6 +++--- lisp/vc/ediff-wind.el | 17 ++++++++++------- lisp/vc/ediff.el | 20 +++++++++++++++----- 8 files changed, 70 insertions(+), 34 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ffd7e13ea5..992c6e9f42c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,23 @@ 2013-05-23 Glenn Morris + * vc/ediff-diff.el, vc/ediff-merg.el: Require ediff-util at run-time. + * vc/ediff-mult.el: Adjust requires. + (ediff-directories-internal, ediff-directory-revisions-internal) + (ediff-patch-file-internal): Declare. + * vc/ediff-ptch.el: Adjust requires. + (ediff-use-last-dir, ediff-buffers-internal): Declare. + (ediff-find-file): Autoload. + * vc/ediff-util.el: No need to load ediff when compiling. + (ediff-regions-internal): Declare. + * vc/ediff-wind.el: Adjust requires. + (ediff-compute-toolbar-width): Define when compiling. + (ediff-setup-control-buffer, ediff-make-bottom-toolbar): Declare. + * vc/ediff.el: No need to load dired, ediff-ptch when compiling. + (dired-get-filename, dired-get-marked-files) + (ediff-last-dir-patch, ediff-patch-default-directory) + (ediff-get-patch-buffer, ediff-dispatch-file-patching-job) + (ediff-patch-buffer-internal): Declare. + * emacs-lisp/checkdoc.el: No need to load ispell when compiling. (ispell-process, ispell-buffer-local-words, lm-summary) (lm-section-start, lm-section-end): Declare. diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index b4d986fb036..3e64250d1a7 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -27,10 +27,8 @@ (provide 'ediff-diff) -(eval-when-compile - (require 'ediff-util)) - (require 'ediff-init) +(require 'ediff-util) (defgroup ediff-diff nil "Diff related utilities." diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index dea872bd142..a1f4d4f5d78 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -32,11 +32,8 @@ (defvar ediff-merge-window-share) (defvar ediff-window-config-saved) -(eval-when-compile - (require 'ediff-util)) -;; end pacifier - (require 'ediff-init) +(require 'ediff-util) (defcustom ediff-quit-merge-hook 'ediff-maybe-save-and-delete-merge "Hooks to run before quitting a merge job. diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 3e3bc6c9663..58e10819a30 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -110,14 +110,11 @@ :prefix "ediff-" :group 'ediff) - -;; compiler pacifier -(eval-when-compile - (require 'ediff-ptch) - (require 'ediff)) -;; end pacifier - (require 'ediff-init) +(require 'ediff-diff) +(require 'ediff-wind) +(require 'ediff-util) + ;; meta-buffer (ediff-defvar-local ediff-meta-buffer nil "") @@ -1795,6 +1792,14 @@ all marked sessions must be active." )) (error "The patch buffer wasn't found")))) +(declare-function ediff-directories-internal "ediff" + (dir1 dir2 dir3 regexp action jobname + &optional startup-hooks merge-autostore-dir)) + +(declare-function ediff-directory-revisions-internal "ediff" + (dir1 regexp action jobname + &optional startup-hooks merge-autostore-dir)) + ;; This function executes in meta buffer. It knows where event happened. (defun ediff-filegroup-action () @@ -2360,6 +2365,8 @@ If this is a session registry buffer then just bury it." (setq point (point-min))) point)))) +(autoload 'ediff-patch-file-internal "ediff-ptch") + ;; this is the action invoked when the user selects a patch from the meta ;; buffer. (defun ediff-patch-file-form-meta (file &optional startup-hooks) diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 64f4ee4a6ac..e22b31ed048 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -33,12 +33,8 @@ :prefix "ediff-" :group 'ediff) -;; compiler pacifier -(eval-when-compile - (require 'ediff)) -;; end pacifier - (require 'ediff-init) +(require 'ediff-util) (defcustom ediff-patch-program "patch" "Name of the program that applies patches. @@ -472,6 +468,8 @@ are two possible targets for this patch. However, these files do not exist." (set-window-buffer ediff-window-B ediff-patch-diagnostics)) (t (display-buffer ediff-patch-diagnostics 'not-this-window)))) +(defvar ediff-use-last-dir) + ;; prompt for file, get the buffer (defun ediff-prompt-for-patch-file () (let ((dir (cond (ediff-use-last-dir ediff-last-dir-patch) @@ -642,6 +640,11 @@ optional argument, then use it." ;;; (eq code 0) ;;; (not (eq code 2)))) +(autoload 'ediff-find-file "ediff") +(declare-function ediff-buffers-internal "ediff" + (buf-a buf-b buf-c startup-hooks job-name + &optional merge-buffer-file)) + (defun ediff-patch-file-internal (patch-buf source-filename &optional startup-hooks) (setq source-filename (expand-file-name source-filename)) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 81146c0c931..ec227f44e8f 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -42,9 +42,6 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) -(eval-when-compile - (require 'ediff)) - ;; end pacifier @@ -3477,6 +3474,9 @@ Without an argument, it saves customized diff argument, if available (if (window-live-p ediff-control-window) (select-window ediff-control-window))) +(declare-function ediff-regions-internal "ediff" + (buffer-a beg-a end-a buffer-b beg-b end-b + startup-hooks job-name word-mode setup-parameters)) (defun ediff-inferior-compare-regions () "Compare regions in an active Ediff session. diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 81109906262..124bdbd26df 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -42,17 +42,16 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) -(eval-when-compile - (require 'ediff-util) - (require 'ediff-help)) +(require 'ediff-init) +(require 'ediff-help) ;; end pacifier -(require 'ediff-init) ;; be careful with ediff-tbar -(if (featurep 'xemacs) - (require 'ediff-tbar) - (defun ediff-compute-toolbar-width () 0)) +(eval-and-compile + (if (featurep 'xemacs) + (require 'ediff-tbar) + (defun ediff-compute-toolbar-width () 0))) (defgroup ediff-window nil "Ediff window manipulation." @@ -358,6 +357,8 @@ into icons, regardless of the window manager." (ediff-setup-windows-plain-compare buffer-A buffer-B buffer-C control-buffer))) +(autoload 'ediff-setup-control-buffer "ediff-util") + (defun ediff-setup-windows-plain-merge (buf-A buf-B buf-C control-buffer) ;; skip dedicated and unsplittable frames (ediff-destroy-control-frame control-buffer) @@ -908,6 +909,8 @@ into icons, regardless of the window manager." (not (ediff-frame-has-dedicated-windows (window-frame wind))) ))) +(declare-function ediff-make-bottom-toolbar "ediff-util" (&optional frame)) + ;; Prepare or refresh control frame (defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame) (let ((window-min-height 1) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 4a4aab75144..7a8f399a6ce 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -116,11 +116,7 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) - -(eval-when-compile - (require 'dired) - (require 'ediff-util) - (require 'ediff-ptch)) +(require 'ediff-util) ;; end pacifier (require 'ediff-init) @@ -154,6 +150,11 @@ (ediff-with-current-buffer ediff-buffer-A (setq buffer-read-only t))) +(declare-function dired-get-filename "dired" + (&optional localp no-error-if-not-filep)) +(declare-function dired-get-marked-files "dired" + (&optional localp arg filter distinguish-one-marked)) + ;; Return a plausible default for ediff's first file: ;; In dired, return the file number FILENO (or 0) in the list ;; (all-selected-files, filename under the cursor), where directories are @@ -1345,6 +1346,12 @@ buffer." rev1 rev2 ancestor-rev startup-hooks merge-buffer-file))) ;;; Apply patch +(defvar ediff-last-dir-patch) +(defvar ediff-patch-default-directory) +(declare-function ediff-get-patch-buffer "ediff-ptch" + (&optional arg patch-buf)) +(declare-function ediff-dispatch-file-patching-job "ediff-ptch" + (patch-buf filename &optional startup-hooks)) ;;;###autoload (defun ediff-patch-file (&optional arg patch-buf) @@ -1373,6 +1380,9 @@ buffer. If odd -- assume it is in a file." source-dir nil nil (ediff-get-default-file-name))) (ediff-dispatch-file-patching-job patch-buf source-file))) +(declare-function ediff-patch-buffer-internal "ediff-ptch" + (patch-buf buf-to-patch-name &optional startup-hooks)) + ;;;###autoload (defun ediff-patch-buffer (&optional arg patch-buf) "Run Ediff by patching the buffer specified at prompt. -- 2.11.4.GIT