[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode ea9b60f 71/87: Make the bash bindings wo
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode ea9b60f 71/87: Make the bash bindings work |
Date: |
Wed, 14 Apr 2021 18:47:10 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit ea9b60fafd19fb1917116acc9c1c5c96d25c5508
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>
Make the bash bindings work
---
ergoemacs-theme-engine.el | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 6933a07..3ecdd73 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -635,16 +635,16 @@ See also `find-function-recenter-line' and
`find-function-after-hook'."
(defvar ergoemacs-theme-create-bash-functions
'((backward-char)
(forward-char)
- (previous-history)
- (next-history)
- (beginning-of-line ergoemacs-beginning-of-line-or-what)
- (end-of-line ergoemacs-end-of-line-or-what)
- (backward-word subward-backward backward-sexp)
- (forward-word subword-forward forward-sexp)
- (kill-line ergoemacs-cut-line-or-region)
+ (previous-history previous-line)
+ (next-history next-line)
+ (beginning-of-line move-beginning-of-line)
+ (end-of-line move-end-of-line)
+ (backward-word)
+ (forward-word)
+ (kill-line)
(backward-kill-word)
(kill-word)
- (backward-delete-char)
+ (backward-delete-char backward-delete-char-untabify)
(delete-char)
(undo undo-tree-undo)
(kill-region ergoemacs-cut-line-or-region)
@@ -663,14 +663,29 @@ See also `find-function-recenter-line' and
`find-function-after-hook'."
# place this file in your home dir. e.g. ~/.inputrc
# restart your terminal. Then, bash's keybinding for editing
# should be like ErgoEmacs.
-# If no key works, try replace all \\e to \\M-. That's means change Esc to
Meta key.
+# If none of the keys work, try replacing all instances of \\e with \\M-.
+# That's means changing Esc to Meta key.
\nset editing-mode emacs") tmp)
(with-temp-buffer
(dolist (cmds ergoemacs-theme-create-bash-functions)
(dolist (cmd cmds)
- (when (setq tmp (where-is-internal cmd nil t))
- (setq ret (concat ret "\n\"\\" (key-description tmp) "\": "
- (symbol-name (nth 0 cmds)))))) t))
+ (dolist (key-cmd (where-is-internal cmd nil))
+ (setq key-string (key-description key-cmd))
+ ;; Only set up the Meta bindings, not the regular arrow or
+ ;; Control bindings. That would require more complicated
+ ;; logic to get right.
+ (if (string-prefix-p "M-" key-string)
+ (setq ret (concat ret "\n\"\\"
+ (replace-regexp-in-string "M-" "e"
key-string t)
+ "\": "
+ (symbol-name (nth 0 cmds))
+ )
+ )
+ )
+ )
+ )
+ t)
+ )
(with-temp-file "~/.inputrc"
(insert ret)
(insert "\n"))
- [elpa] externals/ergoemacs-mode 4e188fd 46/87: Escape quotes on use as characters in, (continued)
- [elpa] externals/ergoemacs-mode 4e188fd 46/87: Escape quotes on use as characters in, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 131b3fb 62/87: Fix command-loop errors, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 2091646 65/87: Merge pull request #497 from wlandry/space_in_filenames, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode dc2f666 54/87: Add info on how to get system-wide Ergoemacs bindings in macOS, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 4a6ba06 55/87: Merge pull request #488 from marlonrichert/macos, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode aa649b2 52/87: Add hooks to ergoemacs-map-properties--modify-run-mode-hooks-excluded, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode ade132c 67/87: Remap ergoemacs-paste to calc-yank in calc-mode, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 26c2150 68/87: Merge pull request #498 from wlandry/calc_yank, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 8b437ad 70/87: Merge pull request #500 from wlandry/term_fixes, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode c7907aa 69/87: In term-mode, modify both term-raw-map and current-local-map, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode ea9b60f 71/87: Make the bash bindings work,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode 72b0292 72/87: Make ergoemacs-handle-ctl-c-or-ctl-x==only-C-c-and-C-x work, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode bd805c3 80/87: More suppression of warnings, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 081fcbd 84/87: Fix #503, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode f3f7b10 42/87: Add keyboard layout; See Issue #462, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 67e8c66 60/87: Merge pull request #494 from wlandry/master, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 823b73a 32/87: Added Portuguese QWERTY keyboard layout., Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 9a5b97f 57/87: Removed commented out code, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode a5d4665 50/87: Remove emojify-emojify-mode-line mu4e-update-mail-and-index from modify, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode b61ece8 74/87: Merge remote-tracking branch 'elpa/externals/ergoemacs-mode', Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 543bc98 78/87: Silence ergoemacs-functions byte compile warnings, Stefan Monnier, 2021/04/14