emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb 982aee9 271/449: Adjust requires and autoloads


From: Stefan Monnier
Subject: [elpa] externals/gnorb 982aee9 271/449: Adjust requires and autoloads
Date: Fri, 27 Nov 2020 23:15:53 -0500 (EST)

branch: externals/gnorb
commit 982aee9f872a1f77c26e57bfb5e0316714c8e2b1
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Adjust requires and autoloads
    
    * gnorb-bbdb.el: require bbdb
    * gnorb-gnus.el: require gnus and nnir (where appropriate)
    * gnorb-org.el: Require gnorb-gnus from within gnorb-org-view
    * gnorb-utils.el: Require nothing from here
    * gnorb.el: Hide all requires behind eval-after-loads
    * nngnorb.el: require gnus
---
 gnorb-bbdb.el  |  1 +
 gnorb-gnus.el  |  2 ++
 gnorb-org.el   |  1 +
 gnorb-utils.el |  8 +-------
 gnorb.el       | 15 +++++++++------
 nngnorb.el     |  1 +
 6 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/gnorb-bbdb.el b/gnorb-bbdb.el
index 4754f15..058011c 100644
--- a/gnorb-bbdb.el
+++ b/gnorb-bbdb.el
@@ -27,6 +27,7 @@
 (eval-when-compile
   (require 'cl))
 
+(require 'bbdb)
 (require 'gnorb-utils)
 
 (defgroup gnorb-bbdb nil
diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index db8c62b..478c14c 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -27,6 +27,7 @@
 (eval-when-compile
   (require 'cl))
 
+(require 'gnus)
 (require 'gnorb-utils)
 
 (declare-function org-gnus-article-link "org-gnus"
@@ -573,6 +574,7 @@ will all be displayed in an ephemeral group on the 
\"nngnorb\"
 server. There must be an active \"nngnorb\" server for this to
 work."
   (interactive)
+  (require 'nnir)
   (let ((nnir-address
         (or (gnus-method-to-server '(nngnorb))
             (user-error
diff --git a/gnorb-org.el b/gnorb-org.el
index 104ff90..cfb95d6 100644
--- a/gnorb-org.el
+++ b/gnorb-org.el
@@ -649,6 +649,7 @@ This won't work unless you've added a \"nngnorb\" server to
 your gnus select methods."
   ;; this should also work on the active region, if there is one.
   (interactive)
+  (require 'gnorb-gnus)
   (setq gnorb-window-conf (current-window-configuration))
   (move-marker gnorb-return-marker (point))
   (when (eq major-mode 'org-agenda-mode)
diff --git a/gnorb-utils.el b/gnorb-utils.el
index dbe9e99..06d981a 100644
--- a/gnorb-utils.el
+++ b/gnorb-utils.el
@@ -26,13 +26,6 @@
 
 (eval-when-compile
   (require 'cl))
-(require 'mailcap)
-(require 'gnus)
-;(require 'message)
-(require 'bbdb)
-(require 'org)
-(require 'org-bbdb)
-(require 'org-gnus)
 
 (mailcap-parse-mimetypes)
 
@@ -104,6 +97,7 @@ with `gnorb-window-conf'.")
             (mapconcat
              'identity ign-headers-list "|")))))
 
+;;;###autoload
 (defun gnorb-restore-layout ()
   "Restore window layout and value of point after a Gnorb command.
 
diff --git a/gnorb.el b/gnorb.el
index c9d0da0..6238623 100644
--- a/gnorb.el
+++ b/gnorb.el
@@ -30,12 +30,15 @@
 
 ;;; Code:
 
-(require 'gnorb-utils)
-(require 'nngnorb)
-(require 'gnorb-gnus)
-(require 'gnorb-bbdb)
-(require 'gnorb-org)
-(require 'gnorb-registry)
+(with-eval-after-load 'gnus
+ (require 'nngnorb)
+ (require 'gnorb-gnus)
+ (require 'gnorb-registry))
+(with-eval-after-load 'bbdb
+  (require 'gnorb-bbdb))
+(with-eval-after-load 'org
+ (require 'gnorb-org))
+
 
 (provide 'gnorb)
 ;;; gnorb.el ends here
diff --git a/nngnorb.el b/nngnorb.el
index 912a64c..bce7600 100644
--- a/nngnorb.el
+++ b/nngnorb.el
@@ -39,6 +39,7 @@
 
 ;;; Code:
 
+(require 'gnus)
 (eval-and-compile
   (require 'nnheader)
   (require 'nnir))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]