[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/hyperbole 4955db1c2d 2/2: * hyperbole.el: Preload `kotl-a
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/hyperbole 4955db1c2d 2/2: * hyperbole.el: Preload `kotl-autoloads` |
Date: |
Mon, 1 May 2023 18:30:29 -0400 (EDT) |
branch: scratch/hyperbole
commit 4955db1c2d5a36b989cd5a0bacf3f299403394b1
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* hyperbole.el: Preload `kotl-autoloads`
(hyperbole-mode): Remove redundant keywords.
---
hyperbole.el | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/hyperbole.el b/hyperbole.el
index a9fc5f0cf3..8ce098ed28 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -78,6 +78,9 @@
;;; Start Initializations
;;; ************************************************************************
+;; FIXME: Just loading `hyperbole-autoloads.el' eagerly loads `hhist.el',
+;; `set.el', and `hact.el'.
+
(defconst hyperbole-loading t
"Temporary constant available for testing while Hyperbole is loading.")
@@ -154,9 +157,7 @@ Info documentation at \"(hyperbole)Top\".
\\{hyperbole-mode-map}"
:global t
- :keymap 'hyperbole-mode-map
:lighter hyperbole-mode-lighter
- :require 'hyperbole
(if hyperbole-mode
(hyperbole--enable-mode)
(hyperbole--disable-mode)))
@@ -562,6 +563,19 @@ frame, those functions by default still return the prior
frame."
(makunbound 'hyperbole-loading)
+;; Autoload this form so that when `package.el' activates Hyperbole's autoloads
+;; it also sets up Kotl's autoloads.
+;;;###autoload
+(when (fboundp 'macroexp-file-name)
+ (let ((us (macroexp-file-name)))
+ (when us
+ ;; FIXME: Contrary to the usual ELPA autoloads files, `kotl-autoloads'
+ ;; does not add its directory to `load-path', so let's do it here by
+ ;; hand.
+ (add-to-list 'load-path
+ (expand-file-name "kotl" (file-name-directory us)))
+ (require 'kotl-autoloads nil t))))
+
(provide 'hyperbole)
;;; hyperbole.el ends here