[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/devil aaee73457d 23/49: Remove load calls in configuration
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/devil aaee73457d 23/49: Remove load calls in configuration examples |
Date: |
Mon, 15 May 2023 12:59:32 -0400 (EDT) |
branch: elpa/devil
commit aaee73457dd34970ab35982c22dbac6bbc802f88
Author: Susam Pal <susam@susam.net>
Commit: Susam Pal <susam@susam.net>
Remove load calls in configuration examples
---
README.md | 49 +++++++++++++++++++++++++------------------------
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/README.md b/README.md
index 9fd1962280..749508cc33 100644
--- a/README.md
+++ b/README.md
@@ -390,11 +390,11 @@ Custom Configuration Examples
-----------------------------
In the examples presented below, the `(require 'devil)` calls may be
-safely omitted if Devil has been installed from MELPA. There are
-appropriate autoloads in place in the Devil package that would ensure
-that it is loaded automatically on enabling Devil mode. However, the
-`require` calls have been included in the examples below for the sake
-of completeness.
+omitted if Devil has been installed from MELPA. There are appropriate
+autoloads in place in the Devil package that would ensure that it is
+loaded automatically on enabling Devil mode. However, the `require`
+calls have been included in the examples below for the sake of
+completeness.
### Local Mode
@@ -405,7 +405,6 @@ Here is an example initialization code that enables Devil
locally only
in text buffers.
```elisp
-(add-to-list 'load-path "/path/to/devil/")
(require 'devil)
(add-hook 'text-mode-hook 'devil-mode)
(global-set-key (kbd "C-,") 'devil-mode)
@@ -425,7 +424,6 @@ The following initialization code shows how we can
customise Devil to
show a Devil smiley (😈) in the modeline and the echo area.
```elisp
-(add-to-list 'load-path "/path/to/devil/")
(require 'devil)
(setq devil-lighter " \U0001F608")
(setq devil-prompt "\U0001F608 %t")
@@ -446,8 +444,8 @@ The following initialization code shows how we can
customise Devil to
use a different Devil key.
```elisp
-(add-to-list 'load-path "/path/to/devil/")
-(setq devil-key "<left>")
+(defvar devil-key "<left>")
+(defvar devil-special-keys '(("%k %k" . (lambda () (interactive)
(devil-run-key "%k")))))
(require 'devil)
(global-devil-mode)
(global-set-key (kbd "C-<left>") 'global-devil-mode)
@@ -457,9 +455,12 @@ The above example sets the Devil key to the left arrow
key, perhaps
another dubious choice for the Devil key. With this configuration, we
can use `<left> x <left> f` and have Devil translate it to `C-x C-f`.
-To customise the special keys, translation rules, and repeatable keys,
-see the variables `devil-special-keys`, `devil-translations`, and
-`devil-repeatable-keys`, respectively.
+Additionally, the above example defines the `devil-special-keys`
+variable to have a single entry that allows typing `<left> <left>` to
+produce the same effect as the original `<left>`. It removes the other
+entries, so that `<left> SPC` is no longer reserved as a special key.
+Thus `<left> SPC` can now be used to set a mark like one would
+normally expect.
### Multiple Devil Keys
@@ -479,12 +480,12 @@ requirements:
(define-key map (kbd ",") #'devil)
(define-key map (kbd ".") #'devil)
map))
+(defvar devil-special-keys '((", ," . (lambda () (insert ",")))
+ (". ." . (lambda () (insert ".")))))
+(defvar devil-translations '(("," . "C-")
+ ("." . "M-")))
(require 'devil)
(global-devil-mode)
-(setq devil-special-keys '((", ," . (lambda () (insert ",")))
- (". ." . (lambda () (insert ".")))))
-(setq devil-translations '(("," . "C-")
- ("." . "M-")))
```
With this configuration, we can type `, x , f` for `C-x C-f` like
@@ -492,14 +493,14 @@ before. But now we can also type `. x` for `M-x`.
Similarly, we can
type `, . s` for `C-M-s` and so on. Further, `, ,` inserts a literal
comma and `. .` inserts a literal dot.
-Note that by default, Devil configures only one activation key, i.e.,
-the comma (`,`) because the more activation keys we add, the more
-intrusive Devil becomes during regular editing tasks. Each key we
-reserve to activate Devil key loses its default function and then we
-need workarounds to somehow invoke the default function associated
-with that key (like repeating `.` twice to type a single `.` in the
-above example). Therefore, it is a good idea to keep the number of
-Devil keys to be as small as possible.
+Note that by default Devil configures only one activation key (`,`)
+because the more activation keys we add, the more intrusive Devil
+becomes during regular editing tasks. Every key that we reserve for
+activating Devil loses its default function and then we need
+workarounds to somehow invoke the default function associated with
+that key (like repeating `.` twice to insert a single `.` in the above
+example). Therefore, it is a good idea to keep the number of Devil
+keys as small as possible.
Why?
- [nongnu] elpa/devil deddb5cade 04/49: Remove stray message call, (continued)
- [nongnu] elpa/devil deddb5cade 04/49: Remove stray message call, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil e03a679297 06/49: Fix typos, spelling, and punctuation, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 943578f33f 07/49: Use a smaller screenshot to show Devil smiley, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil c11dd68394 08/49: Use the term activation to describe the Devil key, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil e52262afdd 01/49: Add Devil, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 7bf4345acc 05/49: Use <kbd> instead of <code> for "ctrl", ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 4924f32560 12/49: Describe how multiple Devil keys can be configured, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 331bf12bb2 17/49: Add more examples of repeatable keys to README, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil b32ded26d4 19/49: Add command devil-show-version, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil d98018356c 22/49: Add section to compare Devil mode with God mode, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil aaee73457d 23/49: Remove load calls in configuration examples,
ELPA Syncer <=
- [nongnu] elpa/devil 2cc21ac252 26/49: Set version to 0.2.0, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 83e96bcfce 15/49: Fix typo in function name: s/repetable/repeatable/, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 2ccbcb04f4 27/49: * devil.el: Update header with more information, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 483ce72f48 35/49: Convert .md files to .org files, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 5ae5957fc5 37/49: Improve package description, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 98064ffed4 49/49: Remove superfluous exclamation mark, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 1cee55eaa3 41/49: Use sharp-quotes consistently for function names, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil c6db405df4 14/49: Address code review comments offered on MELPA, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil f57adb4860 03/49: Set version to 0.1.0, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil a98cb1a7bd 09/49: Automatically detect the activation key, ELPA Syncer, 2023/05/15