[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/logos 6338ecf599: Implement logos-focus-mode-map and do
From: |
ELPA Syncer |
Subject: |
[elpa] externals/logos 6338ecf599: Implement logos-focus-mode-map and document it |
Date: |
Mon, 20 Jun 2022 02:57:39 -0400 (EDT) |
branch: externals/logos
commit 6338ecf599d254cc7b2db46cabc651099c546d6d
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Implement logos-focus-mode-map and document it
---
README.org | 9 +++++++++
logos.el | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/README.org b/README.org
index 35b4f84e14..22301c0524 100644
--- a/README.org
+++ b/README.org
@@ -118,6 +118,12 @@ buffers (~logos-variable-pitch~), make the buffer read-only
~fringe~ face (~logos-hide-fringe~). All these variables are
buffer-local.
+#+vindex: logos-focus-mode-map
+Furthermore, the ~logos-focus-mode~ establishes a bespoke keymap, which
+can be used to, for example, bind the arrow keys to page motions. The
+keymap is ~logos-focus-mode-map~ and is empty by default (we do not
+define any keys and trust the user to pick their own).
+
Logos is the familiar word derived from Greek (watch my presentation on
philosophy about Cosmos, Logos, and the living universe:
<https://protesilaos.com/books/2022-02-05-cosmos-logos-living-universe/>),
@@ -233,6 +239,9 @@ changes out-of-the-box
([[#h:2bb57369-352a-43bf-afe3-0bed2fcc7359][Extra tweaks]
(define-key map [remap forward-page] #'logos-forward-page-dwim)
(define-key map [remap backward-page] #'logos-backward-page-dwim)
(define-key map (kbd "<f9>") #'logos-focus-mode))
+
+;; Also consider adding keys to `logos-focus-mode-map'. They will take
+;; effect when `logos-focus-mode' is enabled.
#+end_src
* Extra tweaks
diff --git a/logos.el b/logos.el
index 8ace6a8cad..1bc66282d9 100644
--- a/logos.el
+++ b/logos.el
@@ -356,6 +356,9 @@ alternate, thus toggling MODE."
(make-local-variable var)
(push (lambda () (kill-local-variable var)) logos--restore)))))
+(defvar logos-focus-mode-map (make-sparse-keymap)
+ "The keymap of `logos-focus-mode'.")
+
(define-minor-mode logos-focus-mode
"Buffer-local mode for focused editing.
When enabled it sets the buffer-local value of these user
@@ -364,6 +367,7 @@ options: `logos-scroll-lock', `logos-variable-pitch',
`logos-buffer-read-only', `logos-olivetti', `logos-hide-fringe'."
:init-value nil
:global nil
+ :keymap logos-focus-mode-map
:lighter " Λ" ; lambda majuscule
(mapc #'funcall logos--restore)
(logos--remove-fringe-remap)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/logos 6338ecf599: Implement logos-focus-mode-map and document it,
ELPA Syncer <=