Subject: Add missing provide statements

From: Philippe Vaucher <[email-masked]>
Date: Tue, 22 Nov 2016 11:42:18 +0100

Hello,

While correcting misuse of `eval-after-load' in some libraries, we
discovered that `text-mode' does not `provide' itself as a feature.

That forces people to use `eval-after-load' with a string (filename),
instead of a symbol (feature), which is the better form. It is the better
form because with a string, any file named the same way triggers the
eval-after-load which is problematic for custom configurations named after
packages.

Original thread at https://github.com/magnars/expand-region.el/pull/212

I used the following command to figure out which other files might need
additional `provide' statements:

grep -rL '(provide' ~/work/emacs/lisp | xargs egrep 'define-[^ ]+-mode' |
grep -v ChangeLog

Thanks,
Philippe
From b0b8720c4eecf44ab63ec85bcb6b92958ced48cb Mon Sep 17 00:00:00 2001
From: Philippe Vaucher <[email-masked]>
Date: Tue, 22 Nov 2016 09:35:22 +0100
Subject: [PATCH] Add missing provide statements

* lisp/composite.el: add provide statement
* lisp/replace.el: add provide statement
* lisp/textmodes/text-mode.el: add provide statement
---
 lisp/composite.el           | 2 ++
 lisp/replace.el             | 2 ++
 lisp/textmodes/text-mode.el | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lisp/composite.el b/lisp/composite.el
index 94b14df..262f121 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -843,6 +843,8 @@ For more information on Auto Composition mode, see
 
 (defalias 'toggle-auto-composition 'auto-composition-mode)
 
+(provide 'auto-composition-mode)
+
 
 
 ;;; composite.el ends here
diff --git a/lisp/replace.el b/lisp/replace.el
index eb5e0cf..ef15f61 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1823,6 +1823,8 @@ See also `multi-occur'."
      ;; And the second element is the list of context after-lines.
      (if (> nlines 0) after-lines))))
 
+(provide 'occur)
+
 
 ;; It would be nice to use \\[...], but there is no reasonable way
 ;; to make that display both SPC and Y.
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index 731c2d2..51a7bbe 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -232,4 +232,6 @@ The argument NLINES says how many lines to center."
 	   (setq nlines (1+ nlines))
 	   (forward-line -1)))))
 
+(provide 'text-mode)
+
 ;;; text-mode.el ends here
-- 
2.10.2