summaryrefslogtreecommitdiff
path: root/hyperbole.el
diff options
context:
space:
mode:
authorBob Weiner <rsw@gnu.org>2016-07-22 10:07:23 -0400
committerBob Weiner <rsw@gnu.org>2016-07-22 10:07:23 -0400
commit1a85fe88c5da812ed67647684dde1d899978837b (patch)
tree190d48de3192df3aa9bdb7d4a511b0ac0708f8ae /hyperbole.el
parent90026c9903b810b43a50d406c0fc48563bf80d97 (diff)
* hyperbole.el (hyperbole-koutliner group): Moved definition to ensure comes after
hversion is loaded. * Makefile (pkg): Updated to build kotl/kotl-autoloads.el file because the Emacs Lisp Package Manager (ELPA) does not yet handle generation of autoloads for package subdirectories.
Diffstat (limited to 'hyperbole.el')
-rw-r--r--hyperbole.el94
1 files changed, 52 insertions, 42 deletions
diff --git a/hyperbole.el b/hyperbole.el
index 009c246..2159524 100644
--- a/hyperbole.el
+++ b/hyperbole.el
@@ -55,11 +55,6 @@
"Hyperbole keyboard and mouse key customizations."
:group 'hyperbole)
-(if hyperb:kotl-p
- (defgroup hyperbole-koutliner nil
- "Hyperbole multi-level autonumbered outliner customizations."
- :group 'hyperbole))
-
;; defgroup hyperbole-rolo is in "hyrolo.el".
(defgroup hyperbole-screen nil
@@ -112,6 +107,12 @@ disables/inhibits support."
(message "Hyperbole messaging button support is %s"
(if inhibit-hyperbole-messaging "disabled" "enabled"))))
+;; This must come after "hversion" is loaded for hyperb:kotl-p definition.
+(if hyperb:kotl-p
+ (defgroup hyperbole-koutliner nil
+ "Hyperbole multi-level autonumbered outliner customizations."
+ :group 'hyperbole))
+
;;; ************************************************************************
;;; Other required Elisp libraries
;;; ************************************************************************
@@ -420,44 +421,53 @@ With optional ARG, override them iff ARG is positive."
;;; Autoloads
;;; ************************************************************************
+;; Koutliner autoloads in the kotl/ subdirectory are generated by 'make pkg'.
+;; This next line ensures they are loaded by hyperbole-autoloads whenever
+;; the Hyperbole package is activated in an Emacs session.
+;;;###autoloads (load "kotl/kotl-autoloads")
+
+;; Before the 6.0.1 release, Hyperbole used to patch the package-generate-autoloads
+;; function to ensure that kotl/ subdirectories were autoloaded. This
+;; is no longer used but is left here temporarily for reference.
+;;
;; Ensure Koutliner autoloads in kotl/ subdirectory are generated and loaded.
-(unless (or (fboundp 'kotl-mode)
- (and (load "hyperbole-autoloads" t t)
- (fboundp 'kotl-mode)))
- (defun hyperb:package-autoloads-subdirectories-p ()
- (require 'package)
- (let ((func (symbol-function 'package-generate-autoloads)))
- ;; If this function contains a call to apply, then it is patched
- ;; with support for finding autoloads in subdirectories and
- ;; nothing more need be done.
- (if (byte-code-function-p func)
- (delq nil (mapcar (lambda (item) (eq item 'apply)) (aref func 2)))
- (string-match "(apply " (prin1-to-string func)))))
-
- (unless (hyperb:package-autoloads-subdirectories-p)
- ;; Function is not patched, so define it here, call it, and then load
- ;; the generated autoloads. This will happen maximally only once
- ;; per installation of a Hyperbole release.
- (if (not (file-writable-p (expand-file-name "hyperbole-autoloads.el" hyperb:dir)))
- (error "(Hyperbole): Failure loading, need write permission to \"%s\"" hyperb:dir))
- (defun package-generate-autoloads (name pkg-dir)
- (let* ((auto-name (format "%s-autoloads.el" name))
- (generated-autoload-file (expand-file-name auto-name pkg-dir))
- ;; Silence `autoload-generate-file-autoloads'.
- (noninteractive t)
- (backup-inhibited t)
- (version-control 'never))
- (package-autoload-ensure-default-file generated-autoload-file)
- (apply #'update-directory-autoloads pkg-dir
- (delq nil (mapcar (lambda (f) (and (file-directory-p f)
- (not (file-symlink-p f))
- f))
- (directory-files pkg-dir t "[a-zA-Z].*" nil))))
- (let ((buf (find-buffer-visiting generated-autoload-file)))
- (when buf (kill-buffer buf)))
- auto-name))
- (package-generate-autoloads "hyperbole" hyperb:dir))
- (load "hyperbole-autoloads"))
+;; (unless (or (fboundp 'kotl-mode)
+;; (and (load "hyperbole-autoloads" t t)
+;; (fboundp 'kotl-mode)))
+;; (defun hyperb:package-autoloads-subdirectories-p ()
+;; (require 'package)
+;; (let ((func (symbol-function 'package-generate-autoloads)))
+;; ;; If this function contains a call to apply, then it is patched
+;; ;; with support for finding autoloads in subdirectories and
+;; ;; nothing more need be done.
+;; (if (byte-code-function-p func)
+;; (delq nil (mapcar (lambda (item) (eq item 'apply)) (aref func 2)))
+;; (string-match "(apply " (prin1-to-string func)))))
+
+;; (unless (hyperb:package-autoloads-subdirectories-p)
+;; ;; Function is not patched, so define it here, call it, and then load
+;; ;; the generated autoloads. This will happen maximally only once
+;; ;; per installation of a Hyperbole release.
+;; (if (not (file-writable-p (expand-file-name "hyperbole-autoloads.el" hyperb:dir)))
+;; (error "(Hyperbole): Failure loading, need write permission to \"%s\"" hyperb:dir))
+;; (defun package-generate-autoloads (name pkg-dir)
+;; (let* ((auto-name (format "%s-autoloads.el" name))
+;; (generated-autoload-file (expand-file-name auto-name pkg-dir))
+;; ;; Silence `autoload-generate-file-autoloads'.
+;; (noninteractive t)
+;; (backup-inhibited t)
+;; (version-control 'never))
+;; (package-autoload-ensure-default-file generated-autoload-file)
+;; (apply #'update-directory-autoloads pkg-dir
+;; (delq nil (mapcar (lambda (f) (and (file-directory-p f)
+;; (not (file-symlink-p f))
+;; f))
+;; (directory-files pkg-dir t "[a-zA-Z].*" nil))))
+;; (let ((buf (find-buffer-visiting generated-autoload-file)))
+;; (when buf (kill-buffer buf)))
+;; auto-name))
+;; (package-generate-autoloads "hyperbole" hyperb:dir))
+;; (load "hyperbole-autoloads"))
;; Menu items could call this function before Info is loaded.
(autoload 'Info-goto-node "info" "Jump to specific Info node." t)