[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 1d496daeb7 014/173: internal: Move minor mod
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 1d496daeb7 014/173: internal: Move minor mode to the top |
Date: |
Fri, 28 Jan 2022 16:57:55 -0500 (EST) |
branch: externals/org-remark
commit 1d496daeb7bcafa8e847e1c57514870214076f34
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
internal: Move minor mode to the top
Align the sequence of commands with how they appear in the readme, etc.
---
org-marginalia.el | 64 +++++++++++++++++++++++++++----------------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/org-marginalia.el b/org-marginalia.el
index 43d86aedbe..2125179482 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -180,6 +180,38 @@ It is meant to exist only one of these in each Emacs
session.")
;;;; Commands
+;;;###autoload
+(define-minor-mode org-marginalia-mode
+ "Toggle Org-marginalia minor mode.
+It is a local minior mode to lets you write margin notes for any
+text file in Org Mode.
+
+It loads your saved highlighters from the marginalia file, and
+enables automatic saving of highlights.
+
+The automatic saving is achieved via function `om/save' added
+to `after-save-hook'.
+
+Interactively with no argument, this command toggles the mode. A
+positive prefix argument enables the mode, any other prefix
+argument disables it. From Lisp, argument omitted or nil enables
+the mode, `toggle' toggles the state."
+ :init-value nil
+ :lighter " marginalia"
+ :global nil
+ :keymap (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "C-c n o") #'om/open)
+ (define-key map (kbd "C-c m") #'om/mark)
+ map)
+ (cond
+ (org-marginalia-mode
+ ;; Activate
+ (om/load)
+ (add-hook 'after-save-hook #'om/save nil t))
+ (t
+ ;; Deactivate
+ (remove-hook 'after-save-hook #'om/save t))))
+
;;;###autoload
(defun om/mark (beg end &optional id)
"Highlight the selected region (BEG and END) when used interactively.
@@ -330,38 +362,6 @@ marginalia, but will keep the headline and notes."
(defun om/previous ()
"WIP.")
-;;;###autoload
-(define-minor-mode org-marginalia-mode
- "Toggle Org-marginalia minor mode.
-It is a local minior mode to lets you write margin notes for any
-text file in Org Mode.
-
-It loads your saved highlighters from the marginalia file, and
-enables automatic saving of highlighters.
-
-The automatic saving is achieved via function `om/save' added
-to `after-save-hook'.
-
-Interactively with no argument, this command toggles the mode. A
-positive prefix argument enables the mode, any other prefix
-argument disables it. From Lisp, argument omitted or nil enables
-the mode, `toggle' toggles the state."
- :init-value nil
- :lighter " marginalia"
- :global nil
- :keymap (let ((map (make-sparse-keymap)))
- (define-key map (kbd "C-c n o") #'om/open)
- (define-key map (kbd "C-c m") #'om/mark)
- map)
- (cond
- (org-marginalia-mode
- ;; Activate
- (om/load)
- (add-hook 'after-save-hook #'om/save nil t))
- (t
- ;; Deactivate
- (remove-hook 'after-save-hook #'om/save t))))
-
;;;; Functions
;;;;; Private
- [elpa] branch externals/org-remark created (now 7226f4d01e), ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 2b6773a911 016/173: doc: Update marginalia, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 1abcfe0881 005/173: doc: Add license badge and link to LICENSE, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 211c2ccb05 013/173: break: Change om/open-at-point to om/open, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 4e694b8562 010/173: doc: Fix doc string, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark ec76d6e82f 006/173: doc: Fix the badge display, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark bb321f57f5 001/173: Initial commit for GH, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 794d9e5169 008/173: doc: Fix the badge display, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6038ab7c30 009/173: fix: align highlight and position, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark f5905ac735 004/173: admin: Add LICENSE, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 1d496daeb7 014/173: internal: Move minor mode to the top,
ELPA Syncer <=
- [elpa] externals/org-remark e96941d8c2 002/173: doc: minor spelling correction, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark d58e8f256c 012/173: break: Change om/save-all to om/save, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 3d6207ae20 011/173: doc: Update doc, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 22d7d373bc 003/173: doc: Replace wrong images; minior spelling fix, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 8762fdad61 024/173: fix: defface for highlighter, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 5511d32062 026/173: doc: Add title image, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 13f36d7241 020/173: internal: Fix the macro expansion, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 66da9a3fb9 028/173: doc: Update title image; add its source files, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark de889ea114 030/173: doc: marginalia.org for the program, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6aa087a6d0 034/173: doc: Add a limitatino of moving files, ELPA Syncer, 2022/01/28