[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 5871b26 2/2: Ensure kotl-autoloads.el is load
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 5871b26 2/2: Ensure kotl-autoloads.el is loaded when Hyperbole is initialized |
Date: |
Sun, 16 May 2021 00:57:09 -0400 (EDT) |
branch: externals/hyperbole
commit 5871b26fe443bce431c9e831ebfe0aa67d61123c
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
Ensure kotl-autoloads.el is loaded when Hyperbole is initialized
---
ChangeLog | 8 +++++++-
hyperbole.el | 17 +++++++++++++++--
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f635554..3717a03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2021-05-15 Bob Weiner <rsw@gnu.org>
+2021-05-16 Bob Weiner <rsw@gnu.org>
+
+* hyperbole.el (hyperb:maybe-load-autoloads): Add and call from hyperb:init.
+
+* Makefile (hyperbole-autoloads.el, kotl/kotl-autoloads.el):
+ hyperbole.el (hyperb:generate-autoloads): Suppress find-file-hooks
+ during autoload generation so no file headers are added.
* kotl/kotl-mode.el: Change mistaken '(when arg...)' updates to
proper '(unless arg...)'.
diff --git a/hyperbole.el b/hyperbole.el
index 71bd08b..a0c0f5f 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -641,9 +641,11 @@ If FLAG is nil then text is shown, while if FLAG is t the
text is hidden."
(concat (user-login-name) (hypb:domain-name)))))
;;
;; When running from git source and not a release package, ensure
- ;; auto-autoload.el files are already generated or generate them.
+ ;; *-autoloads.el files are already generated or generate them.
+ ;; Then ensure they are loaded.
(unless noninteractive
(hyperb:maybe-generate-autoloads))
+ (hyperb:maybe-load-autoloads)
;;
;; Modify syntactic character pairs for use with implicit button activations.
(hbut:modify-syntax)
@@ -680,9 +682,10 @@ This is used only when running from git source and not a
package release."
(hyperb:generate-autoloads)))
(defun hyperb:generate-autoloads ()
- "Renerate Hyperbole *-autoload.el files whether they already exist or not."
+ "Renerate Hyperbole *-autoloads.el files whether they already exist or not."
(let* ((default-directory hyperb:dir)
(backup-inhibited t)
+ (find-file-hooks) ;; Prevent header insertion
(al-file (expand-file-name "hyperbole-autoloads.el")))
;; (make-local-variable 'generated-autoload-file)
(with-current-buffer (find-file-noselect al-file)
@@ -693,6 +696,16 @@ This is used only when running from git source and not a
package release."
(unless (hyperb:autoloads-exist-p)
(error (format "Hyperbole failed to generate autoload files; try running
'make src' in a shell in %s" hyperb:dir))))
+(defun hyperb:maybe-load-autoloads ()
+ "Load Hyperbole autoload files that have not already been loaded."
+ (let* ((default-directory hyperb:dir)
+ (hypb-autoloads (expand-file-name "hyperbole-autoloads.el"))
+ (kotl-autoloads (expand-file-name "kotl/kotl-autoloads.el")))
+ (unless (featurep 'hyperbole-autoloads)
+ (load-file hypb-autoloads))
+ (unless (featurep 'kotl-autoloads)
+ (load-file kotl-autoloads))))
+
;; This call loads the rest of the Hyperbole system.
(require 'hinit)